Codbmirror enqueued on all pages breaks other plugins scripts
-
Hi there ??
We discovered an issue with Advanced File Manager when using codemirror.
Advanced File Manager enqueues the codemirror everywhere in the WordPress Admin, not only on the admin-pages that Advanced File Manager creates.
That potentially conflicts with other plugins using Codemirror on their particular admin-pages.This happens in
\file-manager-advanced\application\class_fma_main.php
:
wp_enqueue_script( 'codemirror', plugins_url('library/codemirror/lib/codemirror.js', __FILE__ ));
Later this can result in conflicts that show as errors as below:
Uncaught TypeError: CodeMirror.overlayMode is not a function
, orUncaught TypeError: Cannot read property 'hasClass' of undefined
.What we suggest is to first register the scripts and then only enqueue them where the Advanced File Manager Plugin needs them.
Currently users affected by such conflicts can deregister the script in the “conflict” pages of other software (which also load Codemirror) but that is the wrong solution and just a workaround.
If you are interested in how to replicate this, please contact us thru the email composed of
beda.s
and@onthegosystems.com
(Unfortunately I could not find your direct contact in the Plugins File header…)
I can provide particular steps and even a copy of an affected site.Thanks a lot!
- This topic was modified 5 years ago by .
- This topic was modified 5 years ago by .
The page I need help with: [log in to see the link]
- The topic ‘Codbmirror enqueued on all pages breaks other plugins scripts’ is closed to new replies.