Bug 29567

Summary: Cataloguing plugins are broken on the batch item mod tool
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: ToolsAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: nugged
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00
Bug Depends on: 28445    
Bug Blocks:    
Attachments: Bug 29567: (bug 28445 follow-up) Restore cataloguing plugins
Bug 29567: (bug 28445 follow-up) Restore cataloguing plugins

Description Jonathan Druart 2021-11-24 10:56:49 UTC
Broken by bug 28445.

See also the FIXME from 
  commit 86156da415141e32e16f2090477be32bda241afb
  Bug 28445: Adjust code to handle regexs
Comment 1 Jonathan Druart 2021-11-24 10:58:52 UTC
Created attachment 127973 [details] [review]
Bug 29567: (bug 28445 follow-up) Restore cataloguing plugins

Broken by bug 28445.

See also the FIXME from
  commit 86156da415141e32e16f2090477be32bda241afb
  Bug 28445: Adjust code to handle regexs

The problem is that the cataloguing plugins inject JS code in the DOM BEFORE the footer
in somes page we have all the JS loaded at the end of the DOM
and so $ (jQuery) is not defined

It's working on additem as we don't have the JS in the footer, but the
batch item mod tool has it there.

Test plan:
Batch edit items and confirm that cataloguing are working correctly with
this patch applied.
Comment 2 Andrii Nugged 2021-11-24 12:11:14 UTC
Created attachment 127974 [details] [review]
Bug 29567: (bug 28445 follow-up) Restore cataloguing plugins

Broken by bug 28445.

See also the FIXME from
  commit 86156da415141e32e16f2090477be32bda241afb
  Bug 28445: Adjust code to handle regexs

The problem is that the cataloguing plugins inject JS code in the DOM BEFORE the footer
in somes page we have all the JS loaded at the end of the DOM
and so $ (jQuery) is not defined

It's working on additem as we don't have the JS in the footer, but the
batch item mod tool has it there.

Test plan:
Batch edit items and confirm that cataloguing are working correctly with
this patch applied.

Signed-off-by: Andrew Nugged <nugged@gmail.com>
Comment 3 Jonathan Druart 2021-11-25 08:48:01 UTC
Skipping QA, this needs to be pushed today.
Comment 4 Jonathan Druart 2021-11-25 09:05:19 UTC
Pushed to master for 21.11, thanks to everybody involved!