Skip Navigation

[Resolved] Plugin conflict with Toolset and GravityPerks Populate Anything

This thread is resolved. Here is a description of the problem and solution.

Problem:
The user has found a compatibility bug between Toolset and GravityPerks-Populate Anything plugin.
The fix that the user suggests is replacing "contains" by "includes" in wp-views/embedded/res/js/views_shortcodes_gui.js line 341

Solution:
Toolset does not enqueue a new version of underscore or lodash that is causing the issue. Toolset enqueues WordPress library. The plugin was importing its own copy of lodash that is conflicting with WordPress default library. We won't fix this error.

This support ticket is created 4 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

Tagged: 

This topic contains 22 replies, has 3 voices.

Last updated by Living Passages 4 years ago.

Assisted by: Jamal.

Author
Posts
#1573695

When attempting to load Beaver Builder on the homepage to edit, the builder won't load.

I have created a staging site for you to access and will be referenced below.

My browser inspection console reports the following JS error:
views_shortcodes_gui.js?ver=3.1.3:341 Uncaught TypeError: _.contains is not a function
at new WPViews.ShortcodesGUI (views_shortcodes_gui.js?ver=3.1.3:341)
at HTMLDocument.<anonymous> (views_shortcodes_gui.js?ver=3.1.3:4846)
at i (jquery.js?ver=1.12.4-wp:2)
at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4-wp:2)
at Function.ready (jquery.js?ver=1.12.4-wp:2)
at HTMLDocument.J (jquery.js?ver=1.12.4-wp:2)
WPViews.ShortcodesGUI @ views_shortcodes_gui.js?ver=3.1.3:341
(anonymous) @ views_shortcodes_gui.js?ver=3.1.3:4846
i @ jquery.js?ver=1.12.4-wp:2
fireWith @ jquery.js?ver=1.12.4-wp:2
ready @ jquery.js?ver=1.12.4-wp:2
J @ jquery.js?ver=1.12.4-wp:2

I am able to make it work if I deactivate:
GP Populate Anything
Version 1.0-beta-4.47 | By Gravity Wiz

Researching on my own, I stumbled across these 2 articles:
https://toolset.com/forums/topic/toolset-views-blocks-issue-with-creating-new-user-or-resetting-password-in-wp/
https://stackoverflow.com/questions/34922682/restangular-contains-is-not-a-function

From which, I was also able to fix by keeping GP Populate Anything active, while changing this line of code in your plugin:

wp-views/embedded/res/js/views_shortcodes_gui.js : 341

From: self.ps_orig_id = ( _.contains( [ 'post-new.php', 'post.php' ], wpv_shortcodes_gui_texts.pagenow ) ) ? wpv_shortcodes_gui_texts.post_id : 0;

To: self.ps_orig_id = ( _.includes( [ 'post-new.php', 'post.php' ], wpv_shortcodes_gui_texts.pagenow ) ) ? wpv_shortcodes_gui_texts.post_id : 0;

I have pinpointed the issue for you to analyze and come up with a bug fix 🙂

#1574235

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello and thank you for contacting the Toolset support.

To confirm this bug, I wanted to share with you a new clean installation and let you reproduce the issue on it with a default theme and the minimal plugin, but I was facing some issues with our platform tools.
So I installed Duplicator to take a copy of your site and pull the required plugins from it, but it seems that Duplicator won't work on your hosting.

We have the Gravity Forms plugins in our compatibility database, but we do not have the GP Populate anything, maybe we will also need the GravityPerks plugins.
I suggest that you share all the required plugin in a Dropbox or GDrive folder and let me check this locally before escalating to our developers.
If you agree, your next reply will be private to share the download link safely.

#1575825

I have uploaded both GravityPerks and the GP Populate anything plugins to this folder where you can download and install on your local site.

hidden link

#1577141

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello and thank you for your collaboration.

I tried on a new installation with the following plugins and I was not able to reproduce the issue. hidden link

Check Beaver Builder for the homepage on this screenshot hidden link

Maybe, I missed something! The only difference, I can see is the version of Beaver Builder. Can you share the latest release with me on the same GDrive folder, and any steps, you think maybe, required to reproduce the issue.

#1577189

Hey Jamal!

2 additional Beaver Builder plugins need to be activated as well is what I am discovering.
If you can please add/enable:
Beaver Themer - v1.3.0.2
Ultimate Addons for Beaver Builder - v1.26.1

Then try it again on your end.

I even installed the default 20/20 theme and the error was still producing - so you should be able to fully replicate it now in your site.

I don't think the version for BB Pro is going to matter as we have had this issue on this site for a few months and am now only getting to report it, so I know the previous few version updates on Pro would have also produced the error.

#1577317

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Thank you for your feedback. Can you share the plugins on the GDrive folder that you have created previously?
I can only have the following versions:
- Beaver Themer 1.0.2.1
- Ultimate Addon for Beaver Builder 1.6.7

#1577325

Just uploaded them.

#1577385

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Thank you for your collaboration. But even with those plugins, I was not able to reproduce the issue. Maybe this needs more steps to reproduce it.

I suggest to take a Duplicator copy of your website and check with it. But when I log in to the provided site, I am not able to reproduce the issue because the Beaver Builder does not work for my user on the homepage.

#1577497

Jamal, can you please try again to access the staging site I have setup - hidden link

When you first access the site, our host has a password gate - I gave you that user & login in the:
FTP access details

Then log in with the WP admin I included in the initial ticket.

I just attempted all this with the user I provided you and when I attempted to edit the home page in Beaver Builder - I get the same issue. I have minimal plugins all installed.

#1577503

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Can you please record a short video of your manipulation? Because I still cannot make the builder work for the homepage, and no errors are logged for me on the browser console. Check this screencast hidden link

There is something still missing for me to see the same errors as you.

#1577511

That is exactly the issue - the builder will not load when initiated because of the conflict I am reporting with Views.

I recorded the same home/URL, attempting to initiate BB with the console active for you to see the error on my end.

hidden link

#1577513

Also, you typically want your inspector console open before you attempt to initialize the builder. I have encountered in that past, the errors won't show in the log after you have already had the page load.

#1577519

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

I still cannot reproduce the errors on the console. But I can reproduce the issue with the Builder not working. Once I deactivated Toolset plugins(Types, Views), The BB worked for the homepage, once I activated the plugins again, it did not work.

Please let me know if it is ok to take a copy of your website for further analysis.

#1577595

Thanks Jamal - yes, it is OK for you to take a copy of this staging site to further investigate on your end.

#1578365

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Thank you, but I was not able to take a copy, probably because of file permissions on some folders.

Duplicator needs writing permissions on some folders to be able to build a copy of your website. Check this screenshot hidden link

UpdraftPlus is also hanging for more than 30 minutes. hidden link

Can you take a database backup and zip themes and plugin folders then share them with me on a GDrive folder, or maybe allow writing on Duplicator or UpdraftPlus folders?

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