Bug 30097

Summary: Cataloguing - advanced editor not loading
Product: Koha Reporter: David Nind <david>
Component: CatalogingAssignee: Bugs List <koha-bugs>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: m.de.rooy
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29973
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Screenshot - Loading message fro advanced cataloguing editor

Description David Nind 2022-02-14 18:02:02 UTC
Created attachment 130556 [details]
Screenshot - Loading message fro advanced cataloguing editor

When accessing the advanced editor for cataloguing it does not load - see the screenshot.

The screen says "Loading, please wait.."
Comment 1 David Nind 2022-02-14 18:09:44 UTC
Browser console errors when trying to load the advanced cataloguing editor in master:

1. Internal server error - see also bug 29973:

06:56:33.005 GEThttp://127.0.0.1:8081/cgi-bin/koha/svc/cataloguing/framework?frameworkcode=&callback=define
[HTTP/1.1 500 Internal Server Error 107ms]
	
GET
	http://127.0.0.1:8081/cgi-bin/koha/svc/cataloguing/framework?frameworkcode=&callback=define
Status
500
Internal Server Error
VersionHTTP/1.1
Transferred15.05 KB (14.85 KB size)
Referrer Policystrict-origin-when-cross-origin
....

2. Loading failed error:

06:56:33.114 Loading failed for the <script> with source “http://127.0.0.1:8081/cgi-bin/koha/svc/cataloguing/framework?frameworkcode=&callback=define”. editor.pl:1:1

3. Uncaught error:

06:56:33.114 Uncaught Error: Script error for: /cgi-bin/koha/svc/cataloguing/framework?frameworkcode=&callback=define
http://requirejs.org/docs/errors.html#scripterror
    A http://127.0.0.1:8081/intranet-tmpl/lib/require_21.1200015.js:8
    onScriptError http://127.0.0.1:8081/intranet-tmpl/lib/require_21.1200015.js:29
    load http://127.0.0.1:8081/intranet-tmpl/lib/require_21.1200015.js:33
    load http://127.0.0.1:8081/intranet-tmpl/lib/require_21.1200015.js:29
    load http://127.0.0.1:8081/intranet-tmpl/lib/require_21.1200015.js:18
    .....

Not sure what any of these mean though....
Comment 2 Owen Leonard 2022-02-14 18:55:35 UTC
If you access the svc URL directly you can see the error:

http://127.0.0.1:8081/cgi-bin/koha/svc/cataloguing/framework?frameworkcode=&callback=define

The method Koha::Libraries->branchcode is not covered by tests!

Trace begun at /kohadevbox/koha/Koha/Objects.pm line 572
Koha::Objects::AUTOLOAD('Koha::Libraries=HASH(0x5586f6325250)') called at /kohadevbox/koha/svc/cataloguing/framework line 33
eval {...} at /kohadevbox/koha/svc/cataloguing/framework line 2
Comment 3 David Nind 2022-05-31 04:46:46 UTC
The advanced cataloguing editor now loads as expected (in master on 31 May 2022), so closing this bug.