Skip Navigation

[Resolved] Toolset not defined – Conflict with Visual Composer

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

Problem:
Views 2.5 creates JavaScript errors in various circumstances in the backend which breaks certain admin functions.

Solution:
There is a patch available which needs to be applied to Views 2.5, as described in the linked errata.

Relevant Documentation:
https://toolset.com/errata/betheme-options-page-is-not-working-when-views-2-5-0-is-activated/

This support ticket is created 7 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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+00:00)

Tagged: 

This topic contains 8 replies, has 2 voices.

Last updated by Adrian 7 years ago.

Assisted by: Nigel.

Author
Posts
#587961

I am getting a javascript error with the latest versions of views.
I did a plugin conflict test and the result was that Visual Composer was causing this conflict.

This is what is output in the console:

    backend_editor.js?ver=1510204931:62 Uncaught ReferenceError: Toolset is not defined
    at ToolsetCommon.UserEditor.VisualComposerEditor.self.init (backend_editor.js?ver=1510204931:62)
    at new ToolsetCommon.UserEditor.VisualComposerEditor (backend_editor.js?ver=1510204931:67)
    at HTMLDocument.<anonymous> (backend_editor.js?ver=1510204931:72)
    at i (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,plupload&ver=4.8.3:2)
    at Object.fireWith [as resolveWith] (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,plupload&ver=4.8.3:2)
    at Function.ready (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,plupload&ver=4.8.3:2)
    at HTMLDocument.K (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,plupload&ver=4.8.3:2)`

The issue manifests on the backend and prevents me from editing menus and doing anything that requires the use of accordeons in the WP-Admin side.

I can grant access to a test instance, but as this runs in a multisite environment, I cannot grant FTP access or direct access to the database.

#587965

Just tested on a blank site, and the culprit is the Views plugin. I had another ticket but it got closed out on me before I could reply. I can provide access to that site so that you can view the issue first hand.

#587969

The error when using Visual Composer and Views was different, however the combination causing this error is:

WooCommerce
Visual Composer
Views
(types also enabled but not part of the issue)

Views + Visual Composer throws the following error in the console:

Uncaught ReferenceError: Toolset is not defined
    at ToolsetCommon.UserEditor.VisualComposerEditor.self.init (backend_editor.js?ver=2.5.3:62)
    at new ToolsetCommon.UserEditor.VisualComposerEditor (backend_editor.js?ver=2.5.3:67)
    at HTMLDocument.<anonymous> (backend_editor.js?ver=2.5.3:72)
    at i (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=4.8.3:2)
    at Object.fireWith [as resolveWith] (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=4.8.3:2)
    at Function.ready (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=4.8.3:2)
    at HTMLDocument.K (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=4.8.3:2)

Add woocommerce to the mix and you get the error that I mentioned in the first post, along with elements of the wp-admin breaking.

#587975

Just did a test on a completely blank MAMP based install.

WP 2.8.3
Twentyseventeen as a theme
Woocommerce 3.2.3
Toolset Types 2.2.1.9
Toolset Views 2.5
WPBakery Page Builder 5.4.2 (Formerly Visual Composer)

PHP 7

Debug Info

{"core":{"Wordpress":{"Multisite":"No","SiteURL":"http:\/\/localhost:8888","HomeURL":"http:\/\/localhost:8888","Version":"4.8.3","PermalinkStructure":"\/%postname%\/","PostTypes":"post, page, attachment, revision, nav_menu_item, custom_css, customize_changeset, wp-types-group, wp-types-user-group, wp-types-term-group, product, product_variation, shop_order, shop_order_refund, shop_coupon, shop_webhook, vc4_templates, vc_grid_item, view, view-template","PostSatus":"publish, future, draft, pending, private, trash, auto-draft, inherit, wc-pending, wc-processing, wc-on-hold, wc-completed, wc-cancelled, wc-refunded, wc-failed"},"Server":{"jQueryVersion":"1.12.4","PHPVersion":"7.1.0","MySQLVersion":"5.6.34","ServerSoftware":"Apache\/2.2.31 (Unix) mod_wsgi\/3.5 Python\/2.7.12 PHP\/7.1.0 mod_ssl\/2.2.31 OpenSSL\/1.0.2j DAV\/2 mod_fastcgi\/2.4.6 mod_perl\/2.0.9 Perl\/v5.24.0"},"PHP":{"MemoryLimit":"256M","UploadMax":"32M","PostMax":"32M","TimeLimit":"30","MaxInputVars":"1000"}},"plugins":{"active_plugins":{"js_composer\/js_composer.php":{"WC requires at least":"","WC tested up to":"","Woo":"","Name":"WPBakery Page Builder","PluginURI":"http:\/\/vc.wpbakery.com","Version":"5.4.2","Author":"Michael M - WPBakery.com","AuthorURI":"http:\/\/wpbakery.com","TextDomain":"js_composer","DomainPath":"","Network":false,"Title":"WPBakery Page Builder","AuthorName":"Michael M - WPBakery.com"},"types\/wpcf.php":{"WC requires at least":"","WC tested up to":"","Woo":"","Name":"Toolset Types","PluginURI":"http:\/\/wordpress.org\/extend\/plugins\/types\/","Version":"2.2.19","Author":"OnTheGoSystems","AuthorURI":"http:\/\/www.onthegosystems.com","TextDomain":"types","DomainPath":"","Network":false,"Title":"Toolset Types","AuthorName":"OnTheGoSystems"},"woocommerce\/woocommerce.php":{"WC requires at least":"","WC tested up to":"","Woo":"","Name":"WooCommerce","PluginURI":"https:\/\/woocommerce.com\/","Version":"3.2.3","Author":"Automattic","AuthorURI":"https:\/\/woocommerce.com","TextDomain":"woocommerce","DomainPath":"\/i18n\/languages\/","Network":false,"Title":"WooCommerce","AuthorName":"Automattic"},"wp-views\/wp-views.php":{"WC requires at least":"","WC tested up to":"","Woo":"","Name":"Toolset Views","PluginURI":"https:\/\/toolset.com\/?utm_source=viewsplugin\u0026utm_campaign=views\u0026utm_medium=plugins-list-full-version\u0026utm_term=Visit plugin site","Version":"2.5","Author":"OnTheGoSystems","AuthorURI":"http:\/\/www.onthegosystems.com","TextDomain":"wp-views","DomainPath":"","Network":false,"Title":"Toolset Views","AuthorName":"OnTheGoSystems"}},"mu_plugins":[],"dropins":[]},"theme":{"Name":"Twenty Seventeen","ThemeURI":null,"Author":"\u003Ca href=\u0022https:\/\/wordpress.org\/\u0022\u003Ethe WordPress team\u003C\/a\u003E","AuthorURI":null,"Template":"twentyseventeen","Version":"1.3","TextDomain":null,"DomainPath":null},"extra-debug":{"types":{"add_resized_images_to_library":0,"register_translations_on_import":1,"images_remote":0,"images_remote_cache_time":"36","help_box":"by_types","hide_standard_custom_fields_metabox":"show","postmeta_unfiltered_html":"on","usermeta_unfiltered_html":"on"},"views":{"views_template_loop_blog":0,"wpv_bootstrap_version":1,"wpv_custom_conditional_functions":[],"wpv_custom_inner_shortcodes":[],"wpv_debug_mode":"","wpv_debug_mode_type":"compact","wpv_map_plugin":0,"wpv_show_edit_view_link":1,"wpv_show_hidden_fields":"","wpv_saved_auto_detected_framework":"","wpv_codemirror_autoresize":"","wpv_enable_pagination_manage_history":true,"wpv_enable_parametric_search_manage_history":true}}}

Please let me know when I can expect a fix for this

#587984

Nigel
Supporter

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

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

Hi Adrian

Thanks for elaborating the set-up required.

I'm going to create a test site now to reproduce and then I'll get back to you.

#588009

Nigel
Supporter

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

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

Hi Adrian

I reproduced the problem (you only need to activate WPBakery and Views, nothing else).

I have reported the error and am escalating this thread and will report back as soon as I hear any news.

Thanks for your patience.

#588010

Nigel
Supporter

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

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

Adrian, it's not clear from the title, but this is the same issue as described in the following errata: https://toolset.com/errata/betheme-options-page-is-not-working-when-views-2-5-0-is-activated/

Can you please apply the patch as described on that page?

You may need to apply it to each Toolset plugin you have installed, not just Views.

#588123

Still getting the error, even with the patch.

#588140

Ok all set. I had to apply it to the recently updated Types plugin. I had thought the patch would already be included.