• Resolved Aaron

    (@aaron13100)


    Hello,

    It seems the plugin may be enqueuing scripts even on admin settings pages that don’t belong to the plugin. It’s causing a conflict with the “404 Solution” plugin.

    Can we verify that enqueue scripts is only called when this specific plugin’s settings page is used?

    e.g. in the function that’s called when the settings page is created, set a variable like

    $GLOBALS['copy-delete-posts-settings-page'] = true

    then before “wp_enqueue_style” and “wp_enqueue_script” are called, use something like

    if (!array_key_exists('copy-delete-posts-settings-page', $GLOBALS) || $GLOBALS['copy-delete-posts-settings-page'] != true) {
       return;
    }

    This is adapted from https://pippinsplugins.com/loading-scripts-correctly-in-the-wordpress-admin/

    thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Aaron

    (@aaron13100)

    Specifically line 143 in copy-delete-posts/banner/misc.php is causing the issue, which looks like

    wp_enqueue_style('inisev-carousel-style', ($this->url . 'assets/style.min.css'), [], filemtime($this->_root_dir . '/assets/style.min.css'));

    thanks

    Plugin Author iClyde

    (@iclyde)

    Hi @aaron13100

    Thank you for reporting, we will check it in detail with mentioned “404 Solution” plugin.

    Overall our plugin includes duplication functionality to most pages that are defined as post/page list, then JS determinate if the content displayed to the user can be duplicated it’s quite flexible.

    But as you mentioned that carrousel script is included, that’s something wrong, it should be included only on pages that uses carrousel.

    I’ll share with you beta version here once we prepare it and of course include the solution in upcoming release.

    Plugin Author iClyde

    (@iclyde)

    Hi @aaron13100

    My apologies for delayed reply, here is updated plugin beta version:
    https://copy-delete-posts.com/downloads/cdp-beta/copy-delete-posts-1.3.9.3.zip

    We’ll release the solution in official version 🙂

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

The topic ‘Loading things on other plugin pages’ is closed to new replies.