Skip Navigation

[Resolved] Toolset Forms and Smush Pro JavaScript conflict

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

Problem:
We see Uncaught TypeError: this._setOptionDisabled is not a function (jquery.fancytree.ui-deps.js:449) in the console when Smush Pro and Toolset Forms are used at the same time

Solution:
This issue was resolved by Smush Pro Developers:

https://premium.wpmudev.org/forums/topic/smush-pro-backend-js-errors-smush-pro/

This support ticket is created 4 years, 2 months 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 14 replies, has 2 voices.

Last updated by richardG-4 4 years, 1 month ago.

Assisted by: Beda.

Author
Posts
#1527907

I am trying to: Edit settings on the "Smush Pro" and "Font Awesome" plugins.

Link to a page where the issue can be seen:

Here is the error:

"Uncaught TypeError: this._setOptionDisabled is not a function"
 at h.<computed>.<computed>._setOption (jquery.fancytree.ui-deps.js:449)
    at h.<computed>.<computed>.s [as _super] (load-scripts.php?c=0&load[chunk_0]=jquery-core,jquery-migrate,utils,underscore,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-dragga&load[chunk_1]=ble,jquery-ui-button,jquery-ui-position,jquery-ui-dialog,jquery-ui-tabs,backbone,jquery-effects-core,jquery-effects-size,jquery-&load[chunk_2]=effects-scale,jquery-ui-sortable,wp-pointer,quicktags&ver=5.3.2:32)
    at h.<computed>.<computed>._setOption (load-scripts.php?c=0&load[chunk_0]=jquery-core,jquery-migrate,utils,underscore,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-dragga&load[chunk_1]=ble,jquery-ui-button,jquery-ui-position,jquery-ui-dialog,jquery-ui-tabs,backbone,jquery-effects-core,jquery-effects-size,jquery-&load[chunk_2]=effects-scale,jquery-ui-sortable,wp-pointer,quicktags&ver=5.3.2:76)
    at h.<computed>.<computed>.h.isFunction.a.<computed> [as _setOption] (load-scripts.php?c=0&load[chunk_0]=jquery-core,jquery-migrate,utils,underscore,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-dragga&load[chunk_1]=ble,jquery-ui-button,jquery-ui-position,jquery-ui-dialog,jquery-ui-tabs,backbone,jquery-effects-core,jquery-effects-size,jquery-&load[chunk_2]=effects-scale,jquery-ui-sortable,wp-pointer,quicktags&ver=5.3.2:32)
    at h.<computed>.<computed>._create (load-scripts.php?c=0&load[chunk_0]=jquery-core,jquery-migrate,utils,underscore,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-dragga&load[chunk_1]=ble,jquery-ui-button,jquery-ui-position,jquery-ui-dialog,jquery-ui-tabs,backbone,jquery-effects-core,jquery-effects-size,jquery-&load[chunk_2]=effects-scale,jquery-ui-sortable,wp-pointer,quicktags&ver=5.3.2:76)
    at h.<computed>.<computed>.h.isFunction.a.<computed> [as _create] (load-scripts.php?c=0&load[chunk_0]=jquery-core,jquery-migrate,utils,underscore,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-dragga&load[chunk_1]=ble,jquery-ui-button,jquery-ui-position,jquery-ui-dialog,jquery-ui-tabs,backbone,jquery-effects-core,jquery-effects-size,jquery-&load[chunk_2]=effects-scale,jquery-ui-sortable,wp-pointer,quicktags&ver=5.3.2:32)
    at h.<computed>.<computed>._createWidget (load-scripts.php?c=0&load[chunk_0]=jquery-core,jquery-migrate,utils,underscore,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-dragga&load[chunk_1]=ble,jquery-ui-button,jquery-ui-position,jquery-ui-dialog,jquery-ui-tabs,backbone,jquery-effects-core,jquery-effects-size,jquery-&load[chunk_2]=effects-scale,jquery-ui-sortable,wp-pointer,quicktags&ver=5.3.2:32)
    at new h.<computed>.<computed> (load-scripts.php?c=0&load[chunk_0]=jquery-core,jquery-migrate,utils,underscore,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-dragga&load[chunk_1]=ble,jquery-ui-button,jquery-ui-position,jquery-ui-dialog,jquery-ui-tabs,backbone,jquery-effects-core,jquery-effects-size,jquery-&load[chunk_2]=effects-scale,jquery-ui-sortable,wp-pointer,quicktags&ver=5.3.2:32)
    at HTMLButtonElement.<anonymous> (load-scripts.php?c=0&load[chunk_0]=jquery-core,jquery-migrate,utils,underscore,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-dragga&load[chunk_1]=ble,jquery-ui-button,jquery-ui-position,jquery-ui-dialog,jquery-ui-tabs,backbone,jquery-effects-core,jquery-effects-size,jquery-&load[chunk_2]=effects-scale,jquery-ui-sortable,wp-pointer,quicktags&ver=5.3.2:32)
    at Function.each (load-scripts.php?c=0&load[chunk_0]=jquery-core,jquery-migrate,utils,underscore,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-dragga&load[chunk_1]=ble,jquery-ui-button,jquery-ui-position,jquery-ui-dialog,jquery-ui-tabs,backbone,jquery-effects-core,jquery-effects-size,jquery-&load[chunk_2]=effects-scale,jquery-ui-sortable,wp-pointer,quicktags&ver=5.3.2:2)

I found that if I disable Toolset Forms then I can change the settings on these plugins.

#1528103

This sounds like a library conflict.

Can I ask:
- since when does this happen? Was an update involved?
- can you link me to those plugins, and if necessary instructions how to use them to replicate this issue?

We can then debug it and look into further steps.

Note, I can't access the site:
The administrator has blocked your IP from accessing this website.

I am in Vietnam and the IP is 42.113.53.77
Maybe this needs to be unblocked.

#1528125

I white listed your IP address, do you still need me to link the plugins?

Smush Pro is a premium plugin, I think I'd have to give you my login info for you to use it, so it will probably be easier if you can find the solution on my site. I do have a backup of it using All-in-one Migrator.

#1530133

OK so I visited hidden link and hidden link

On hidden link I see 5 JS errors.
None of them is the error reported in the first opening message, see below:

Uncaught TypeError: Cannot read property 'vent' of undefined .../elementor/assets/lib/backbone/backbone.marionette.min.js?ver=2.4.5
Uncaught ReferenceError: Marionette is not defined .../elementor/assets/js/common-modules.min.js?ver=2.9.2
Uncaught ReferenceError: Marionette is not defined .../elementor/assets/js/common.min.js?ver=2.9.2
Uncaught ReferenceError: elementorCommon is not defined .../elementor-pro/assets/js/admin.min.js?ver=2.8.4
Uncaught ReferenceError: elementorCommon is not defined .../elementor/assets/js/admin.min.js?ver=2.9.2

So these are related to Elementor, not Toolset, it appears to me.

On hidden link instead, I see two JS errors:

Uncaught TypeError: this._setOptionDisabled is not a function jquery.fancytree.ui-deps.js:449 
Uncaught TypeError: Cannot read property 'hasClass' of undefined /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=hoverIntent,common,hoverintent-js,admin-bar,svg-painter,thickbox,wp-hooks,heartbeat,wp-auth-check,shortcode,wp-util,wp-backbone,&load%5Bchunk_1%5D=media-models,wp-plupload&ver=5.3.2

These errors also do not happen in a Toolset component and do not correspond to the errors reported.

To find out what is causing these errors we need to check without other Plugins and a native Theme, no custom code and if then still persisting, on another server.
I can help with this, if you could provide me with a copy of this site, I do not want to edit or change things or disable software on the live site, I can have a closer look locally.

I've enabled the private reply for this, here you can find tips about how to create a duplicate of the site:
https://toolset.com/faq/provide-supporters-copy-site/

Please also let me know where I can find your reported error, so I can look into that as well (I'll need the precise URL and steps if required, as currently, I can't see that particular error)

#1531567

We have 3 other reports with conflicts generated by Smush Pro plugin and Toolset, see here
https://toolset.com/forums/topic/uncaught-typeerror-associated-with-toolset-shortcodes-in-admin/
https://toolset.com/forums/topic/toolset-types-views-clash-with-beaver-themer-locations-interface/
https://toolset.com/forums/topic/toolset-views-breaks-javascript/

I'm investigating those, but these are not the same errors as I saw on your site, I would hence still need the previously mentioned details.

#1531609

My site is compressed down to 600MB which is over the limit for Duplicator unless I pay for Pro. I can create a dev site for you to use instead if that's okay, or I could use the All-in-one Migrator, and share that migration file. Which would be easier?

#1531611

Did you filter out the media uploads, archive files, and cache when creating the package?
You can otherwise also use WP All Import, or I can log in and grab a copy, but then I need an allowance to upload a plugin and try to grab the copy.

#1531661
#1531671

I've asked access to the file as I could not see it

#1533157

I believe I emailed you giving you permission, sorry about that.

I did notice that if I downgrade Toolset Views to 3.0.2 then this issue goes away, so that's the quick and dirty fix I'm going with for now.

#1536887

This issue was always present no matter the Toolset Views version, meanwhile, I have a ticket for it internally and many other users reported the problem
It's due to Smush Pro plugin and Toolset when no classic Post Edit interface is shown. This, referring to the error of https://toolset.com/forums/topic/toolset-forms-breaks-javascript/#post-1527907

No matter what Views version is installed (tested down to 2.5) this is always happening, so it is not an issue introduced by Toolset
But it seems a conflict with Smuh Pro's fancytree jQuery registered by Smush Pro within their code:

wp_register_script( 'smush-admin', WP_SMUSH_URL . 'app/assets/js/smush-admin.min.js', array( 'jquery', 'smush-sui', 'underscore', 'wp-color-picker' ), WP_SMUSH_VERSION, true );

This registers a script jquery.fancytree.js and that conflicts with Toolset ShortCodes GUI.

I am escalating this to the Developers for analysis but it is very likely that the 3rd party will need to make amendments here too. For example, they mention to use this code only on their admin pages, but it is also loaded in other admin pages, producing hence conflicts.

I will keep you updated on the process.

#1536903

I noticed the version change wasn't working today for me either. Maybe I was imagining it was working for me before... I don't know.

Would it help if I downgraded my version of Smush Pro until this is resolved? In the meantime, I will contact them and let them know this is an issue they need to fix too.

Thank you for keeping me informed.

#1536947

I, unfortunately, do not have older Smush Pro version but yes, this should work, however maybe you'll need to downgrade several versions, I am not sure.
Did they recently update? I'd start from there...

#1537011

Reverting to the previous version (Smush Pro 3.5.1) seems to do the trick. They added a lot with 3.6, so I'm sure it's some bad code somewhere in there.

I have submitted a ticket with WPMU on this issue, and referenced this ticket. If there is anything else I can do to help just let me know.

#1537041

Thanks a lot for confirming that.
It all points to a problem introduced by Smush Pro.

I'll keep you in the loop about our progress here as well.

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