Javascript Error disable switching the editor tabs
Support › MB Builder › Javascript Error disable switching the editor tabsResolved
- This topic has 3 replies, 3 voices, and was last updated 7 years ago by
Anh Tran.
-
AuthorPosts
-
May 14, 2019 at 1:16 PM #14544
arkonisus
ParticipantI createed a simple group with thw fields. Now i am not able to switch the tabs between fields and settings in the Field-Group screen. The console shows the following error:
builder.js?ver=2.0.0:550 Uncaught ReferenceError: Clipboard is not defined at HTMLDocument.<anonymous> (builder.js?ver=2.0.0:550) at i (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.2:2) at Object.fireWith [as resolveWith] (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.2:2) at Function.ready (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.2:2) at HTMLDocument.K (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.2:2)I am using the latest WP and Plugin Version (aio)
May 15, 2019 at 6:05 AM #14558brandonjp
ParticipantI'm having this same issue. Chrome console shows:

Here's a screencast of the Settings tab not loading:
May 15, 2019 at 6:26 AM #14559brandonjp
ParticipantI found temporary workaround & code fixes for this. (As of 14 May 2019)
WORKAROUND:
If you click on the 'Code' tab first, you can then click 'Settings' and it will load.CODE FIX:
For a more functional fix, you can edit the plugin on your server. Looks like thebuilder.jsfile in the MB Builder plugin is attempting to instantiate a new Clipboard object usingClipboardinstead ofClipboardJS-- If you wish to fix it for now, you can edit thebuilder.jsfile as follows...Go to this page in your WP plugin editor:
http://yourdomain.com/wp-admin/plugin-editor.php?file=meta-box-builder%2Fassets%2Fjs%2Fbuilder.js&plugin=meta-box-builder%2Fmeta-box-builder.phpOn line 550 you should see:
clipboard = new Clipboard( '.mbb-button--copy', {Change
new Clipboardtonew ClipboardJSSo the full new line 550 would read:
clipboard = new ClipboardJS( '.mbb-button--copy', {Save the change, then go back to the Field Group editor and try it out. (You might need to close your old browser tab/window and re-open the page, and/or refresh your browser 5 million times for it to load the the updated
builder.jsfile)May 15, 2019 at 9:30 AM #14563Anh Tran
KeymasterThanks a lot for your feedback. WordPress 5.2 added another version of the clipboard library into its core, which conflicts with the current version of the MB Builder.
I've just fixed and updated the extension and AIO. Please update.
-
AuthorPosts
- You must be logged in to reply to this topic.