[Bug 25697] New: Tinymce doesn't load in IE 11 (due to Koha adding version number suffix to Javascript)
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25697 Bug ID: 25697 Summary: Tinymce doesn't load in IE 11 (due to Koha adding version number suffix to Javascript) Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: dcook@prosentient.com.au QA Contact: testopia@bugs.koha-community.org Tinymce tries to set its base url by iterating through "script" elements looking for scripts like tinymce.min.js, and uses the baseurl of the script src attribute for its own baseurl. However, we provide something like tinymce.min_19.1106000.js, which will never match. This is OK in browsers like Chrome which support document.currentScript as a fallback. But IE 11 doesn't support document.currentScript. The simple solution is just to provide "suffix" and "base_url" when running tinyMCE.init. It's no big drama, and it means tinymce will work better cross-browser. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25697 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25697 --- Comment #1 from David Cook <dcook@prosentient.com.au> --- Created attachment 105655 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105655&action=edit Bug 25697: Declare base url and suffix in tinymce init This patch declares the base url and suffix in tinymce init, so that tinymce will initialize properly cross-browser. Without this change, tinymce will fail to initialize on IE 11. Test plan: 0. Apply patch 1. Open IE 11 2. Enable "UseWYSIWYGinSystemPreferences" system preference 3. Go to /cgi-bin/koha/admin/preferences.pl?tab=opac and note that tinymce initializes correctly 4. Go to /cgi-bin/koha/tools/koha-news.pl and create/edit a news item, and note that tinymce initializes correctly 5. Go to /cgi-bin/koha/admin/branches.pl and add/edit a library, and note that tinymce initializes correctly for "OPAC info" -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25697 --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Why are the comments in this patch prefixed with "//ejb2020:" ? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25697 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |master Component|Architecture, internals, |Browser compatibility |and plumbing | Assignee|koha-bugs@lists.koha-commun |oleonard@myacpl.org |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25697 --- Comment #3 from David Cook <dcook@prosentient.com.au> --- (In reply to Owen Leonard from comment #2)
Why are the comments in this patch prefixed with "//ejb2020:" ?
Because I'm upstreaming a local fix heh. I'll fix that. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25697 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25697 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |janet.mcgowan@ptfs-europe.c | |om -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25697 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25697 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105655|0 |1 is obsolete| | --- Comment #4 from David Cook <dcook@prosentient.com.au> --- Created attachment 106174 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106174&action=edit Bug 25697: Declare base url and suffix in tinymce init This patch declares the base url and suffix in tinymce init, so that tinymce will initialize properly cross-browser. Without this change, tinymce will fail to initialize on IE 11. Test plan: 0. Apply patch 1. Open IE 11 2. Enable "UseWYSIWYGinSystemPreferences" system preference 3. Go to /cgi-bin/koha/admin/preferences.pl?tab=opac and note that tinymce initializes correctly 4. Go to /cgi-bin/koha/tools/koha-news.pl and create/edit a news item, and note that tinymce initializes correctly 5. Go to /cgi-bin/koha/admin/branches.pl and add/edit a library, and note that tinymce initializes correctly for "OPAC info" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25697 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25697 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #106174|0 |1 is obsolete| | --- Comment #5 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 106208 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106208&action=edit Bug 25697: Declare base url and suffix in tinymce init This patch declares the base url and suffix in tinymce init, so that tinymce will initialize properly cross-browser. Without this change, tinymce will fail to initialize on IE 11. Test plan: 0. Apply patch 1. Open IE 11 2. Enable "UseWYSIWYGinSystemPreferences" system preference 3. Go to /cgi-bin/koha/admin/preferences.pl?tab=opac and note that tinymce initializes correctly 4. Go to /cgi-bin/koha/tools/koha-news.pl and create/edit a news item, and note that tinymce initializes correctly 5. Go to /cgi-bin/koha/admin/branches.pl and add/edit a library, and note that tinymce initializes correctly for "OPAC info" Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25697 Sally <sally.healey@cheshiresharedservices.gov.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sally.healey@cheshireshared | |services.gov.uk Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25697 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com --- Comment #6 from Julian Maurice <julian.maurice@biblibre.com> --- I cannot test with IE, but I confirm that it is still working with Firefox. However, it doesn't make much sense to append koha version to tinymce URLs (tinymce is not updated very often). Wouldn't it be better to have tinymce version in URL ? Like /intranet-tmpl/lib/tinymce/5.0.16/jquery.tinymce.min.js ? If I understood correctly that should also fix the issue. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25697 --- Comment #7 from Julian Maurice <julian.maurice@biblibre.com> --- (In reply to Julian Maurice from comment #6)
I cannot test with IE, but I confirm that it is still working with Firefox.
However, it doesn't make much sense to append koha version to tinymce URLs (tinymce is not updated very often). Wouldn't it be better to have tinymce version in URL ? Like /intranet-tmpl/lib/tinymce/5.0.16/jquery.tinymce.min.js ?
If I understood correctly that should also fix the issue.
I wrote an alternative patch here : https://gitlab.com/jajm/Koha/-/tree/bug/25697-alt (commit https://gitlab.com/jajm/Koha/-/commit/d2ac23957522dac45a5971b9eb4435954c609d...) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25697 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25697 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #106208|0 |1 is obsolete| | --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 106362 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106362&action=edit Bug 25697: Declare base url and suffix in tinymce init This patch declares the base url and suffix in tinymce init, so that tinymce will initialize properly cross-browser. Without this change, tinymce will fail to initialize on IE 11. Test plan: 0. Apply patch 1. Open IE 11 2. Enable "UseWYSIWYGinSystemPreferences" system preference 3. Go to /cgi-bin/koha/admin/preferences.pl?tab=opac and note that tinymce initializes correctly 4. Go to /cgi-bin/koha/tools/koha-news.pl and create/edit a news item, and note that tinymce initializes correctly 5. Go to /cgi-bin/koha/admin/branches.pl and add/edit a library, and note that tinymce initializes correctly for "OPAC info" Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25697 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |In Discussion --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Sorry Julian, I saw your comments too late. You change is the bigger one and I am not sure why we had settled on appending the version in the file name - but maybe it would make sense to use the same method everywhere? Adding Owen and hoping that David will be able to tell us if your patch works with IE (I couldn't test that either) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25697 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |oleonard@myacpl.org --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Owen, could you maybe have a look at David's patch and Julian's alternative? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25697 --- Comment #11 from David Cook <dcook@prosentient.com.au> --- (In reply to Katrin Fischer from comment #9)
Adding Owen and hoping that David will be able to tell us if your patch works with IE (I couldn't test that either)
I haven't tried the patch yet, but it sounds reasonable to me. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25697 --- Comment #12 from David Cook <dcook@prosentient.com.au> --- Actually, in a different patch, I think I said I'm now advocating that all IE 11 users use Edge instead, so I wouldn't mind us closing this as a WONTFIX. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25697 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |WONTFIX Status|In Discussion |RESOLVED --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- We have been discussing IE support at the last general meeting and we will add a note that IE is not supported for the staff interface to the manual and to use Edge based browsers instead: https://meetings.koha-community.org/2020/general_irc_meeting_15_july_2020.20... -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org