Skip Navigation

Views JS error causes several admin features to break.

Resolved

Reported for: Toolset Views 2.5

Resolved in: Toolset Views 2.5.1

Symptoms

When Views 2.5.0 is activated several Admin Features can break.

  • the BeTheme’s theme options page is not displaying any option.
  • You will see ShortCodes inserted with curly brackets { ! {shortcode} ! } in Custom Searches when you use a Page Builder. This is expected only when you edit things with Page Builders, but not in Custom Searches or elsewhere.
  • Generally the symptoms will also be accompanied by this JS error in the Browser Console:

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

Workaround

This issue will be fixed in the next version of Toolset Views.

In the meantime, this patch can be applied by unzipping it and uploading the files it contains to replace the ones with the same name. The files are:

  • backend.php in /vendor/toolset/toolset-common/user-editors/editor/screen/visual-composer

Also, if you have another Toolset plugin installed, you might need to replace those same files in the exact same locations.

6 thought on Views JS error causes several admin features to break.

  • First of all this is not exclusive to betheme’s theme options pages, but include jetback stats graph among other things.. Secondly, I had already fixed this bug before updating the plugin, getting the buggy code back again, and then applying this patch as an official bug fix.

    Question is, why has this not been released on the official WP updates, yet? It has been five days since this was released and actually more than a week before this bug was introduced. I am pretty sure that webmasters don’t have much time to check every plugin errata!


  • Also, if you have another Toolset plugin installed, you might need to replace those same files in the exact same locations.

    does that mean we have to upload this file to all of the plugins? (Layout, CRED, Access, etc?)

    • Yes, you might need to consider patching other Toolset plugins that you might use too.

  • This bug is actually present in the default WP 4.8.3 install, running 2017 theme and only Toolset plugins + Visual Composer.

    The bug is also present in the same path in the Types plugin, so you’ll need to patch both Types and Views to prevent it.

Comments are closed