• Resolved Pacotole

    (@pacotole)


    Hi, I’m a Joinchat plugin developer. We’ve received a bug report when using Joinchat and HivePress together.
    In the admin, we’ve detected a JS conflict because two versions of the intlTelInput library are being loaded.

    HivePress loads all scripts and styles throughout the admin. Ideally, they should be loaded only when needed. See an example of themes page: https://prnt.sc/l1Fy0E4WHx2W

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    Thanks for the details. We have added this issue to the bug tracker.

    Let us know if there is any code snippet so we can check if our plugin page is currently displayed. Then we can provide a snippet so you don’t have to register our script on your pages as a temporary solution.

    Thread Starter Pacotole

    (@pacotole)

    Hi, finally we added a snippet to prevent enqueue of HivePress assets in Joinchat Settings page:

    if ( defined( 'HP_FILE' ) && is_admin() && isset( $_GET['page'] ) && JOINCHAT_SLUG === $_GET['page'] ) {
    add_filter( 'hivepress/v1/scripts', '__return_empty_array' );
    add_filter( 'hivepress/v1/styles', '__return_empty_array' );
    }
    kseniiahivepress

    (@kseniiahivepress)

    Hi,

    Thanks for sharing this. We’ll recommend this temporary workaround to our users until we resolve the conflict in the HivePress core.

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

The topic ‘Only load assets when needed on admin’ is closed to new replies.