Skip Navigation

[Resolved] jquery.validate.js conflict between Divi Builder plugin and Toolset Types

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 7 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by Nigel 7 years, 1 month ago.

Assisted by: Nigel.

Author
Posts
#504481
Screen Shot 2017-03-22 at 12.02.00 PM.png

Hello,

I have a site that is using both Toolset Types and the Divi Builder plugins. I have run across an issue that may be a scripting conflict between the two. I am not sure who I needed to contact about this, so I thought I would start here to see if anyone had any helpful ideas. Both plugins appear to be using "jquery.validate.js". The Divi builder is using version v1.12.0 while types is using v1.8.1.

My issue is that while in the admin section, if I am on the edit screen for a page (while both plugins are active), If I hit the "Preview Changes" button nothing happens. But, if after hitting that button I then hit the "update" button, that buttons functions will now do the "Preview Changes" action instead of the "Update" action, if that makes sense.

If I hit "Update" without hitting the "Preview Changes" button first, the page saves/updates just fine. If I deactivate either plugin or comment out the script call for that "jquery.validate.js" line in either plugin, than the buttons work just fine.

So thats why I think I have narrowed it down to that script. It fixes immediately if I remove one of the script calls from the page. I am not sure what the solution is as both plugins appear to be using their specific version of that JS validation file, so I was hoping someone would have some ideas. I am guessing including 2 different versions of the same script is whats causing the issue.

The attached screenshot is the console error I get after hitting the "Preview Changes" button. "TypeError: $.validator.methods[method] is undefined".

Thanks!

#504725

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Hi Doug

I set up a test site with Divi and Types and edited the "Sample page" in the back end.

I observed that, yes, two versions of jquery.validate.js are being loaded.

What I didn't see, though, were any errors. I used the preview button and it worked fine. I designed the page with the page builder and used the preview button, again no errors, worked as expected.

I'll double-check with colleagues about the conflict (for some common libraries we use namespacing to avoid potential conflicts), but in the meantime, are there any more specific details you can share about your set up and where you see the error triggered?

#504852

Thanks for the response! Well, this issue only seems to be happening to me when I edit pages. Even if I create a new page the preview error still happens. The error only ever shows up if i click the "Preview Changes" button.

I did just check a post I had setup (posts seem to be using the divi builder also) and the issue does NOT happen there. I checked the source and it looks like posts are also pulling in both of the 'jquery.validate' files. So now I'm really confused haha.

So It seems to be something just on pages. If you have any more ideas it would be greatly appreciated. If not, I can keep troubleshooting it.

Thanks again.

#504976

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Looking at your debug info the main difference I see that I am using the Divi theme and you are using the Divi page builder as a plugin, or there could be another 3rd party which is contributing to the conflict.

I think I should take a copy of your site for testing to examine the problem.

I will mark your next reply as private so that I can get log-in credentials from you—you may want to create a temporary admin user for me to use that you can later delete. And be sure to have a current backup of your site, even though I don't intend to make any changes other than to temporarily add a backup plugin to take a snapshot of the site.

#505289

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Sure, yes, let's try that.

If that fails you might be able to create a duplicate of your site yourself to send me, but let's try the plugin first.

I'll mark the next reply as private again, ignore the site credentials template, just give me a link (e.g. dropbox) for the zipped plugin.

#505346

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Hi Doug

I tried with the Divi plugin instead of the theme and I still can't reproduce the error (that's with just Types 2.2.9 and Divi Builder 2.0.1 and nothing else).

Can we try and eliminate potential other conflicts?

So, disable all plugins except for Types and Divi Builder. Do you still have the error? If not a third plugin may be involved and you can find out which by re-activating them one-by-one and re-testing.

Or the theme could be involved, so try switching to twentyseventeen and test again.

If none of that helps then the only thing I can suggest is to provide a duplicate of the site for me to test locally. Let me know whether you would be able to do this. (I see you are hosted at wpengine. Many backup plugins don't work, I'd recommend using All in One WP Migration to generate the backup archive.)

The forum ‘Types Community Support’ is closed to new topics and replies.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.