Bug 23396 - Rancor fails to load: insert_copyright is not defined
Summary: Rancor fails to load: insert_copyright is not defined
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Installation and upgrade (web-based installer) (show other bugs)
Version: 19.05
Hardware: All All
: P5 - low critical (vote)
Assignee: Nick Clemens
QA Contact: Tomás Cohen Arazi
URL:
Keywords:
Depends on: 17178 21411
Blocks:
  Show dependency treegraph
 
Reported: 2019-07-29 15:26 UTC by Cori Lynn Arnold
Modified: 2019-08-09 13:14 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
19.11.00,19.05.03


Attachments
Screenshot from Chrome (129.15 KB, image/jpeg)
2019-07-29 15:26 UTC, Cori Lynn Arnold
Details
Bug 23396: Add keyboard_shortcuts.sql to C4/Installer.pm (1.19 KB, patch)
2019-07-30 13:39 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 23396: Add keyboard_shortcuts.sql to C4/Installer.pm (1.24 KB, patch)
2019-07-30 20:57 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23396: Add keyboard_shortcuts.sql to C4/Installer.pm (1.30 KB, patch)
2019-08-02 18:55 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 23396: (QA follow-up) Add atomic update (1.66 KB, patch)
2019-08-02 18:55 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Cori Lynn Arnold 2019-07-29 15:26:48 UTC
Created attachment 91854 [details]
Screenshot from Chrome

The Advanced Editor fails to load on 19.05 with the error message:

marc-editor.js:140 Uncaught ReferenceError: insert_copyright is not defined
    at marc-editor.js:140
    at Object.execCb (require_19.0502000.js:29)
    at X.check (require_19.0502000.js:18)
    at X.<anonymous> (require_19.0502000.js:23)
    at require_19.0502000.js:8
    at require_19.0502000.js:23
    at y (require_19.0502000.js:7)
    at X.emit (require_19.0502000.js:23)
    at X.check (require_19.0502000.js:19)
    at X.<anonymous> (require_19.0502000.js:23)

used Chrome and Firefox.
Comment 1 Owen Leonard 2019-07-29 16:43:35 UTC
This bug only happened for me when starting with a blank database. I tested with 16.11.x and 18.11.x databases and didn't get the error.
Comment 2 Nick Clemens 2019-07-30 13:39:51 UTC
Created attachment 91873 [details] [review]
Bug 23396: Add keyboard_shortcuts.sql to C4/Installer.pm

To test:
1 - Back up your DB if you want to save it
2 - sudo koha-mysql kohadev
    DROP database koha_kohadev;
    CREATE database koha_kohadev;
3 - http://localhost:8081
4 - Go through the web installer
5 - Enable AdvancedCatalogingEditor
6 - Try to load it, fails with JS console error: insert_copyright is not defined
7 - Apply patch
8 - Repeat
9 - This time editor loads
Comment 3 Katrin Fischer 2019-07-30 20:57:27 UTC
Created attachment 91886 [details] [review]
Bug 23396: Add keyboard_shortcuts.sql to C4/Installer.pm

To test:
1 - Back up your DB if you want to save it
2 - sudo koha-mysql kohadev
    DROP database koha_kohadev;
    CREATE database koha_kohadev;
3 - http://localhost:8081
4 - Go through the web installer
5 - Enable AdvancedCatalogingEditor
6 - Try to load it, fails with JS console error: insert_copyright is not defined
7 - Apply patch
8 - Repeat
9 - This time editor loads

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Katrin Fischer 2019-08-02 05:54:23 UTC
Should we add an update database entry to fix this for existing installations?
Comment 5 Katrin Fischer 2019-08-02 05:56:52 UTC
(In reply to Katrin Fischer from comment #4)
> Should we add an update database entry to fix this for existing
> installations?

I think we should. We already got people installing 19.05 for production use and we could just repeat the initial database update from introducing the feature with a check for data already being there.
Comment 6 Tomás Cohen Arazi 2019-08-02 18:55:53 UTC
Created attachment 91937 [details] [review]
Bug 23396: Add keyboard_shortcuts.sql to C4/Installer.pm

To test:
1 - Back up your DB if you want to save it
2 - sudo koha-mysql kohadev
    DROP database koha_kohadev;
    CREATE database koha_kohadev;
3 - http://localhost:8081
4 - Go through the web installer
5 - Enable AdvancedCatalogingEditor
6 - Try to load it, fails with JS console error: insert_copyright is not defined
7 - Apply patch
8 - Repeat
9 - This time editor loads

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 7 Tomás Cohen Arazi 2019-08-02 18:55:57 UTC
Created attachment 91938 [details] [review]
Bug 23396: (QA follow-up) Add atomic update

New installs before the fix won't have the table populated, this patch
adds a fix for that, including the shortcut added by bug 17178.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 8 Martin Renvoize 2019-08-05 10:40:23 UTC
Nice work!

Pushed to master for 19.11.00
Comment 9 Fridolin SOMERS 2019-08-09 13:14:36 UTC
Pushed to 19.05.x for 19.05.03

Since Bug 17178 is not in 19.05.x I have added a commit :
  Bug 23396: (19.05.x) remove toggle_keyboard comming from Bug 17178