• Resolved sonick93

    (@sonick93)


    Hello!

    Thank you for your amazing plugin!

    I installed Tablepress and Advanced Custom Fields plugins and created WordPress editor field with ACF. When I try to add a gallery to this field, the gallery doesn’t appear. I can see the following errors in browser console:

    Uncaught TypeError: wp.shortcode is not a constructor
    at Object.shortcode (media-editor.min.js:1)
    at Object.<anonymous> (media-editor.min.js:1)
    at _ (backbone.min.js:1)
    at m (backbone.min.js:1)
    at f (backbone.min.js:1)
    at n.u.trigger (backbone.min.js:1)
    at n.click (media-views.min.js:2)
    at n.click (media-views.min.js:2)
    at HTMLButtonElement.dispatch (load-scripts.php:3)
    at HTMLButtonElement.r.handle (load-scripts.php:3)

    When I deactivate Tablepress everything is fine, I can add the gallery.
    It happens only on pages and posts and everything’s OK on custom post types.

    Please help me to solve this problem!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    To be honest, I have no idea where this error comes from. TablePress does not use the wp.shortcode function in any way.
    The only possible cause could be to editor button integration of TablePress. To turn that off, please add this to the end of your theme’s “functions.php”:

    add_action( "admin_init", "tp_remove_editor_buttons", 11 );
    function tp_remove_editor_buttons() {
      remove_action( "load-post.php", array( TablePress::$controller, "add_editor_buttons" ) );
      remove_action( "load-post-new.php", array( TablePress::$controller, "add_editor_buttons" ) );
    }

    Regards,
    Tobias

    Thread Starter sonick93

    (@sonick93)

    Hello Tobias!

    It worked perfectly! Thank you SO MUCH!!!

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! 🙂 Good to hear that this helped!

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Uncaught TypeError: wp.shortcode is not a constructor’ is closed to new replies.