Bug 29693

Summary: CodeMirror broken on additional_contents.tt
Product: Koha Reporter: Lucas Gass <lucas>
Component: ToolsAssignee: Lucas Gass <lucas>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: andrewfh, jonathan.druart, kyle, nugged
Version: masterKeywords: rel_21_11_candidate
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00,21.11.02
Bug Depends on: 29113    
Bug Blocks:    
Attachments: Bug 29693: Make CodeMirror work again
Bug 29693: Make CodeMirror work again

Description Lucas Gass 2021-12-14 15:36:05 UTC
To recreate:

-Go to Tools and open either additional contents ( either News or HTML customization )
-Make sure you open it using CodeMirror and not TinyMCE
-Code mirror is broken
Comment 1 Lucas Gass 2021-12-14 15:46:43 UTC
Created attachment 128513 [details] [review]
Bug 29693: Make CodeMirror work again

To test:
1. Go to Tools > HTML customizations
2. Open or create a new entry with CodeMirror. ( Edit with text editor )
3. CodeMirror doesn't work, you don't see line numbers or syntax highlighting
4. Apply patch
5. Try steps 1 & 2 again. The CodeMirror editor should now load.
6. Make sure it works in both the Default and English(en) tabs.
7. BONUS: install some other language packs and look at the tabs for that language, it should still work.
8. Try 5 and 6 again but with Additional contents (News) instead of HTML customizations
Comment 2 Jonathan Druart 2021-12-15 06:16:35 UTC
Initial step is: turn on UseWYSIWYGinSystemPreferences :)
Comment 3 Jonathan Druart 2021-12-15 06:17:47 UTC
(In reply to Jonathan Druart from comment #2)
> Initial step is: turn on UseWYSIWYGinSystemPreferences :)

Nope, it's AdditionalContentsEditor=text!
Comment 4 Jonathan Druart 2021-12-15 06:20:34 UTC
(In reply to Jonathan Druart from comment #3)
> (In reply to Jonathan Druart from comment #2)
> > Initial step is: turn on UseWYSIWYGinSystemPreferences :)
> 
> Nope, it's AdditionalContentsEditor=text!

Well, it's second step. I totally forgot about that group button. The syspref does not make sense then. Sorry for the noise!
Comment 5 Jonathan Druart 2021-12-15 06:22:36 UTC
Created attachment 128540 [details] [review]
Bug 29693: Make CodeMirror work again

To test:
1. Go to Tools > HTML customizations
2. Open or create a new entry with CodeMirror. ( Edit with text editor )
3. CodeMirror doesn't work, you don't see line numbers or syntax highlighting
4. Apply patch
5. Try steps 1 & 2 again. The CodeMirror editor should now load.
6. Make sure it works in both the Default and English(en) tabs.
7. BONUS: install some other language packs and look at the tabs for that language, it should still work.
8. Try 5 and 6 again but with Additional contents (News) instead of HTML customizations

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Jonathan Druart 2021-12-15 06:23:02 UTC
Trivial fix, skipping QA.
Comment 7 Fridolin Somers 2022-01-04 07:54:27 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 8 Kyle M Hall 2022-01-07 11:22:20 UTC
Pushed to 21.11.x for 21.11.02
Comment 9 Andrew Fuerste-Henry 2022-01-10 16:14:28 UTC
Missing dependency, not backported to 21.05.x