Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1086460

    I recently use plugin “SIP Advanced Email Rules for WooCommerce
    see here: https://codecanyon.net/item/sip-advanced-email-rules-for-woocommerce/18780488

    This plugin uses the regular wordpress rich text editor (to edit email texts) on its preferences page in wordpress backend. this preferences page throws a javascript error concerning your javascript files from avia builder. the error makes the plugin unusable:

    Uncaught TypeError: Cannot read property ‘push’ of undefined at t.(/wp-admin/anonymous function).t.(anonymous function).createMenuValues (https://staging.crowdlauf.de/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/assets/js/avia-tinymce-buttons-4.js?wp-mce-4920-20181217:93:28) at t.(/wp-admin/anonymous function).t.(anonymous function).init (https://staging.crowdlauf.de/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/assets/js/avia-tinymce-buttons-4.js?wp-mce-4920-20181217:23:26) at Jx (VM5658 tinymce.min.js:2) at Array. (VM5658 tinymce.min.js:2) at Object.Ht [as each] (VM5658 tinymce.min.js:2) at nw (VM5658 tinymce.min.js:2) at Aw. (VM5658 tinymce.min.js:2) at Array. (VM5658 tinymce.min.js:2) at Ht (VM5658 tinymce.min.js:2) at u (VM5658 tinymce.min.js:2)

    I talked to the plugin editor and he had a short look on the problem. He told me to contact you and ask:

    how to wp_deregister_script or wp_dequeue_script that avia-tinymce-buttons-4.js in admin side for specific post type?

    I think, this script causes the problems and he wants to dequeue it for the specific post type his plugin uses.

    Thanks for help and greetings,
    Robert

    • This topic was modified 5 years, 7 months ago by crowdlauf.
    #1087386

    Hey crowdlauf,

    Thank you for using Enfold.

    You can try this filter to disable the tiny mce button script.

    // disable tiny mce button
    function avf_remove_tinyMCE_button( $plugins ) {
        if ( 'post_type_name' == get_post_type() ) {
            unset($plugins['avia_builder_button']);
        }
    
        return $plugins;
    }
    add_filter( 'mce_external_plugins', 'avf_remove_tinyMCE_button', 999, 1 );
    

    Adjust the post type name or slug.

    Best regards,
    Ismael

    #1087402

    Hey Ismael,
    thanks much for your respond. I will check and give feedback.
    Have a nice day,
    Robert

    #1087718

    Hi Robert,

    Thanks for the update, we’ll keep the thread open for you.

    Best regards,
    Rikard

    #1088026

    Hi Rikard,
    it works now! Thank you very much! You can close the thread.
    Best regards,
    Robert

    #1088126

    Hi,

    Great! Glad we could help!

    Please take a moment to review our theme and show your support https://themeforest.net/downloads
    Don’t forget to bookmark Enfold Documentation for future reference.

    Thank you for using Enfold. :)

    Best regards,
    Ismael

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Bug: Enfold's Avia Builder causes javascript error with another plugin’ is closed to new replies.