tl;dr it seems form error handling can break it. (when not ticking a record to import) == Test plan == 1. stage a marc record 2. acquisitions: have a basket 3. click on "Add to basket" 4. "From a staged file" 5. "Add orders" button 6. Optional open JavaScript console - You see twice the error "$ is not defined" - not sure if related though 7. Don't tick the record 8. Save (at least try) 9. You should see an expected error message 10. Tick the record 11. Choose a fund 12. Save (at least try) 13. Nothing happens :<
So basically we have the plugin (cataloguing/value_builder/dateaccessioned.pl) that is using the jQuery selector '$' but it is not defined yet as we have it at the bottom (jsinclude). This can be a serious problems for other pages as well.
Caused by 22734 in which I moved JavaScript to the footer, ignoring the work I did in Bug 21989, in which I moved JavaScript OUT of the footer because it broke JavaScript.
Created attachment 104878 [details] [review] Bug 25473: Move JavaScript out of the footer of addorderiso2709.tt This patch undoes the move of the JavaScript block to the footer made in Bug 22734. The item information tab can include embedded JavaScript for cataloging plugins, and these don't currently work with JS in the footer. To test, apply the patch and test the JavaScript driven features of the "Add to basket from a staged file" page: - Acquisitions -> Vendor -> Basket -> Add to basket from a staged file - MARC and Card previews, select all/clear all - Item information tab: Cataloging plugins for fields like date acquired, barcode - Default accounting details tab: Show inactive control
After testing. == Good news == No more JS errors :D == Some things couldn't be tested. == > Item information tab: Cataloging plugins for fields like date acquired, barcode - date acquired ok - barcode: nothing happens, no error. Does it depends on other data/config? > Default accounting details tab: Show inactive control I couldn't find how to make a fund inactive ^^" == Bad news == test plan of comment 0 fails
> > Item information tab: Cataloging plugins for fields like > date acquired, barcode > > - date acquired ok > - barcode: nothing happens, no error. Does it depends on other data/config? This one depends on the AutoBarcode system preference. You possible need to activate the feature first - it's off by default. > > Default accounting details tab: Show inactive control > > I couldn't find how to make a fund inactive ^^" Go to: Acquisition > Budets Edit the budget to set it not active (first checkbox, not the locked one)
Thanks Katrin :) Issue of comment 0 is still happening unfortunately.
(but the rest is fixed, nice catch Owen for the cataloging plugins, they indeed where broken)
(In reply to Victor Grousset/tuxayo from comment #6) > Issue of comment 0 is still happening unfortunately. This is something different, see bug 25563.
Created attachment 105174 [details] [review] Bug 25473: Move JavaScript out of the footer of addorderiso2709.tt This patch undoes the move of the JavaScript block to the footer made in Bug 22734. The item information tab can include embedded JavaScript for cataloging plugins, and these don't currently work with JS in the footer. To test, apply the patch and test the JavaScript driven features of the "Add to basket from a staged file" page: - Acquisitions -> Vendor -> Basket -> Add to basket from a staged file - MARC and Card previews, select all/clear all - Item information tab: Cataloging plugins for fields like date acquired, barcode - Default accounting details tab: Show inactive control Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
I guess this can be safely ignored here? :) FAIL js_in_body A <script> tag found inside head, must be moved to the body (see bug 17858)
Created attachment 105178 [details] [review] Bug 25473: Move JavaScript out of the footer of addorderiso2709.tt This patch undoes the move of the JavaScript block to the footer made in Bug 22734. The item information tab can include embedded JavaScript for cataloging plugins, and these don't currently work with JS in the footer. To test, apply the patch and test the JavaScript driven features of the "Add to basket from a staged file" page: - Acquisitions -> Vendor -> Basket -> Add to basket from a staged file - MARC and Card previews, select all/clear all - Item information tab: Cataloging plugins for fields like date acquired, barcode - Default accounting details tab: Show inactive control Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(In reply to Jonathan Druart from comment #8) > (In reply to Victor Grousset/tuxayo from comment #6) > > Issue of comment 0 is still happening unfortunately. > > This is something different, see bug 25563. That was the initial bug report and the title this bug still reflects it XD Anyway, thank you that you moved to bug 25563. So, everything go fixed in the end [U+1F973][U+1F973] Thanks all!
Nice work everyone! Pushed to master for 20.05
backported to 19.11.x for 19.11.07
Backported to 19.05.x branch for 19.05.12