L&L CodeMirror conflict with Max Mega Menu plugin

Hi,

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() {
	wp_dequeue_script('tangible-codemirror');
	wp_dequeue_script('tangible-codemirror-csslint');
	wp_dequeue_script('tangible-codemirror-htmlhint');
	wp_dequeue_script('tangible-codemirror-jshint');
	wp_dequeue_script('tangible-codemirror-jsonlint');
	wp_dequeue_script('tangible-codemirror-scsslint');
}, 20 );

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

[Update]
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:

2 Likes

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!

3 Likes

Hi,

I have another issue with the L&L 3.0.1 module for Beaver Builder, preventing to input code in the editor.
Not sure it’s related to the first one of this thread though.

Message in the Console:
window. Tangible. createCodeEditor not found

And the HTML input field doesn’t show up.

I should test on other sites too.

[Updt] Tested L&L 3.0.1 on another site, no problem with the BB module’s editor.
I guess it can be a specific conflict then.

I just tested with a local site that has Beaver Builder and L&L 3.0.1 installed and I’m able to see the code editor without any issues. Are you able to see if there might be another plugin on your particular installation that’s causing that conflict?

Thank you for the test.
My site is full of plugins, no worry, i’ll let you know when i’ll find time to troubleshoot.

1 Like