• Resolved Giannis Kipouros

    (@giannis4)


    Hi,

    We are using SliceWP on a website and it creates a JS conflict when used in conjunction with the “Country Based Website Switcher” plugin.

    That plugin also uses a select2 class in the admin settings and script-admin.js throws an error because “$offsetParent.css is not a function”

    You can view the console error here: https://prnt.sc/CPKXJPAhRkvD

    This breaks the settings page of the “Country Based Website Switcher” plugin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author iova.mihai

    (@iovamihai)

    Hey @giannis4,

    Thank you for reaching out and thank you for reporting this issue! I’ve added this to our development log for debugging and fixing.

    In the meantime however, I recommend you to add this code snippet to your website:

    function slicewp_custom_deregister_admin_js( $hook ) {

    if ( strpos( $hook, 'slicewp' ) !== false || ( isset( $_GET['page'] ) && is_string( $_GET['page'] ) && strpos( $_GET['page'], 'slicewp' ) === 0 ) ) {
    return;
    }

    wp_dequeue_script( 'slicewp-script' );

    }
    add_action( 'admin_enqueue_scripts', 'slicewp_custom_deregister_admin_js', 11 );

    Please copy the code and add it to your website. If you’re not sure how to add code snippets to your site, you can use the Code Snippets plugin (https://ww.wp.xz.cn/plugins/code-snippets/).

    The snippet will deregister our JS file from all pages but our own plugin’s admin pages. The conflict you’re seeing should be resolved by this.

    If the issue isn’t solved with the code snippet added to your website, please let me know.

    Thank you and best wishes,

    Mihai

    Thread Starter Giannis Kipouros

    (@giannis4)

    Hi @iovamihai ,

    Thank you for the quick response and the patch.

    I have dequeued the admin JS file from pages that have nothing to do with SliceWP and there is no conflict any more.

    Best regards,
    Giannis

    Plugin Author iova.mihai

    (@iovamihai)

    Hey @giannis4,

    Glad to hear the conflict has been solved! Thank you for letting me know the code snippet helped.

    Wishing you a great day ahead!

    Mihai

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

The topic ‘Plugin conflict’ is closed to new replies.