L&L CodeMirror conflict with Max Mega Menu plugin


Just to point at a conflict between Loops & Logic and the Max Mega Menu Pro plugin, involving CodeMirror:

  • Max Mega Menu uses WP CodeMirror to edit HTML in the backend
  • With L&L enabled, impossible to enter or display existing code in MMM HTML inputs
  • A JS error is returned in the console: Uncaught TypeError: b.verify is not a function
  • The issue disappears once L&L is disabled

Thanks for reporting this. At first glance, what you’re describing sounds similar to this other reported issue which is caused by the HTML Lint library in CodeMirror. We’re working on a fix that should come out in an upcoming release.

Hi @benjamin,

Thanks for your interest, yes it looks like one of the CodeMirror lib loaded by L&L is involved in this conflict.

I temporarily fixed the problem by dequeuing the libs, which allows to edit MMM HTML widget again:

add_action( 'wp_print_scripts', function() {
}, 20 );

i’ll try to limit the dequeuing to the Lint lib you’re pointing at and see if it works.

All the libs above need to be dequeued except tangible-codemirror-jshint that can be kept.
Otherwise, the b.verify is not a function error triggers.

Thank you for the issue report, @avanti. As @ben said, we’ve identified the problem - a conflict with multiple versions of HTML Lint library being loaded - and a fix will be included in the next release.

Great, thank you @eliot !

Hey @avanti, I’m following up here to let you know that this conflict with the HTML Lint library has been addressed in the latest 3.0.0 release of Loops & Logic. I’m also realizing as I follow up on these threads just how many of these bugs were reported by you, so thanks for being such an active member of the community. If I had an “Expert Bug Finder” badge I’d give it to you haha!

Edit: looks like I can create custom badges. I’ve granted you this one-of-a-kind badge :1st_place_medal:


Lol, i’m honored your honor, this one, I will frame it! :laughing:

All these fixes the same day, thanks for your work and attention L&L team!