Bug 33318 - [21.11] Advanced editor doesn't load
Summary: [21.11] Advanced editor doesn't load
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: 21.11
Hardware: All All
: P5 - low major (vote)
Assignee: Alex Buckley
QA Contact: Testopia
URL:
Keywords:
: 32884 (view as bug list)
Depends on: 31818
Blocks:
  Show dependency treegraph
 
Reported: 2023-03-23 05:44 UTC by Alex Buckley
Modified: 2023-12-28 20:44 UTC (History)
5 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 33318: Fix JS errors on advanced cataloguing editor (2.10 KB, patch)
2023-03-23 23:00 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 33318: Fix JS errors on advanced cataloguing editor (2.15 KB, patch)
2023-04-16 18:34 UTC, David Nind
Details | Diff | Splinter Review
Bug 33318: Fix JS errors on advanced cataloguing editor (2.20 KB, patch)
2023-04-28 13:54 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Buckley 2023-03-23 05:44:14 UTC
Since Koha 21.11.14 when bug 31818 was backported the Advanced editor is stuck on 'Loading, please wait'. 

Looking in the console the error is:

"Uncaught TypeError: $.fn.popover.Constructor.DEFAULTS.whiteList is undefined"

If you uncomment the lines added by bug 31818 the 'Keyboard shortcut' modal still displays with content so I am not sure bug 31818 is needed on 21.11.x
Comment 1 Alex Buckley 2023-03-23 23:00:33 UTC
Created attachment 148627 [details] [review]
Bug 33318: Fix JS errors on advanced cataloguing editor

This patch reverts bug 31818

Test plan:
1. Checkout 21.11.x
2. Set the EnableAdvancedCatalogingEditor syspref = 'Enable'
3. Go to Cataloguing > Advanced editor
4. Notice the advanced editor is stuck on 'Loading, please wait'
5. Right click > Inspect > Console
6. Notice there is a JS error: "Uncaught TypeError: $.fn.popover.Constructor.DEFAULTS.whiteList is undefined"
7. Apply patch
8. Restart services
9. Refresh the advanced editor
10. Notice it is not stuck on 'Loading, please wait'
11. Right click > Inspect > Console
12. Notice the JS error is no longer showing
13. Click on 'Keyboard shortcuts' and confirm it contains content - that
is what bug 31818 was aiming to fix

Sponsored-by: Toi Ohomai Institute of Technology, New Zealand
Comment 2 Alex Buckley 2023-03-23 23:01:21 UTC
Ready for testing
Comment 3 David Nind 2023-04-16 18:34:47 UTC
Created attachment 149732 [details] [review]
Bug 33318: Fix JS errors on advanced cataloguing editor

This patch reverts bug 31818

Test plan:
1. Checkout 21.11.x
2. Set the EnableAdvancedCatalogingEditor syspref = 'Enable'
3. Go to Cataloguing > Advanced editor
4. Notice the advanced editor is stuck on 'Loading, please wait'
5. Right click > Inspect > Console
6. Notice there is a JS error: "Uncaught TypeError: $.fn.popover.Constructor.DEFAULTS.whiteList is undefined"
7. Apply patch
8. Restart services
9. Refresh the advanced editor
10. Notice it is not stuck on 'Loading, please wait'
11. Right click > Inspect > Console
12. Notice the JS error is no longer showing
13. Click on 'Keyboard shortcuts' and confirm it contains content - that
is what bug 31818 was aiming to fix

Sponsored-by: Toi Ohomai Institute of Technology, New Zealand

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2023-04-16 18:39:05 UTC
Testing notes (using KTD):

1. Edit .env and change KOHA_IMAGE=21.11
2. For your local git repository, checkout 21.11.x
3. To access the container,[1] ktd --root --shell 

[1] If I didn't do this, and accessed as normal (ktd --shell), I couldn't apply the patch:

git bz apply 33318
Traceback (most recent call last):
  File "/usr/bin/git-bz", line 2716, in <module>
    applied = do_apply(bug_ref)
  File "/usr/bin/git-bz", line 1738, in do_apply
    attachmentdata=True)
  File "/usr/bin/git-bz", line 1473, in load
    bug._load(bug_reference.id, attachmentdata)
  File "/usr/bin/git-bz", line 1229, in _load
    response = self.server.send_request("GET", url)
  File "/usr/bin/git-bz", line 999, in send_request
    cookies = self.get_cookie_string()
  File "/usr/bin/git-bz", line 992, in get_cookie_string
    self.cookies = get_bugzilla_cookies(host)
NameError: global name 'host' is not defined
Comment 5 Nick Clemens 2023-04-28 13:54:31 UTC
Created attachment 150385 [details] [review]
Bug 33318: Fix JS errors on advanced cataloguing editor

This patch reverts bug 31818

Test plan:
1. Checkout 21.11.x
2. Set the EnableAdvancedCatalogingEditor syspref = 'Enable'
3. Go to Cataloguing > Advanced editor
4. Notice the advanced editor is stuck on 'Loading, please wait'
5. Right click > Inspect > Console
6. Notice there is a JS error: "Uncaught TypeError: $.fn.popover.Constructor.DEFAULTS.whiteList is undefined"
7. Apply patch
8. Restart services
9. Refresh the advanced editor
10. Notice it is not stuck on 'Loading, please wait'
11. Right click > Inspect > Console
12. Notice the JS error is no longer showing
13. Click on 'Keyboard shortcuts' and confirm it contains content - that
is what bug 31818 was aiming to fix

Sponsored-by: Toi Ohomai Institute of Technology, New Zealand

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 6 Nick Clemens 2023-04-28 13:55:52 UTC
Moved to oldoldstable queue for Arthur
Comment 7 Pedro Amorim 2023-05-17 08:59:01 UTC
*** Bug 32884 has been marked as a duplicate of this bug. ***