Javascript Error disable switching the editor tabs

Support MB Builder Javascript Error disable switching the editor tabsResolved

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #14544
    arkonisusarkonisus
    Participant

    I 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)

    #14558
    brandonjpbrandonjp
    Participant

    I'm having this same issue. Chrome console shows:
    Chrome console js error

    Here's a screencast of the Settings tab not loading:
    Settings tab not loading when editing field group

    #14559
    brandonjpbrandonjp
    Participant

    I 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 the builder.js file in the MB Builder plugin is attempting to instantiate a new Clipboard object using Clipboard instead of ClipboardJS -- If you wish to fix it for now, you can edit the builder.js file 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.php

    On line 550 you should see:
    clipboard = new Clipboard( '.mbb-button--copy', {

    Change new Clipboard to new ClipboardJS

    So 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.js file)

    #14563
    Anh TranAnh Tran
    Keymaster

    Thanks 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.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.