• Resolved swissspaceboy

    (@swissspaceboy)


    Hello,

    This plugin is giving an error with JS script “color-picker.min.js”. When I disable the plugin, the error is gone. Please fix.

    WP: 5.5.3
    Plugin version: 6.5.5
    Error:

    Uncaught ReferenceError: wp is not defined
        at color-picker.min.js:2
        at color-picker.min.js:2
    (anonymous) @ color-picker.min.js:2
    (anonymous) @ color-picker.min.js:2

    Code \includes\classes\class-enqueuer.php:

    wp_enqueue_script(
                    'wp-color-picker',
                    admin_url( 'js/color-picker.min.js' ),
                    array( 'iris', 'wp-i18n' ),
                    false,
                    1
                );

    Thanks,

    Didier.

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

    (@swissspaceboy)

    Hi,

    Some additional information. I also use plugin Autoptimize. I need to disable the Javascript optimisation to avoid this JS error. So there is a conflict somewhere.

    Thanks,

    Didier.

    Thread Starter swissspaceboy

    (@swissspaceboy)

    For info: this problem is fixed by excluding optimisation for folder “wp-includes/js”.

    Don’t know why this plugin gives a problem with this script color-picker.js.

    Didier.

    Plugin Support Rafiz Sejim

    (@rafizsejim)

    Hello,

    Glad to see you found the solution.

    There are quite a few methods of optimizations like combining the JS, minifying JS etc. color-picker.js depends on some wp objects and probably, optimization is preventing the color-picker to call objects. Which is why excluding the folder fixed the issue.

    We will look into it thoroughly and try to find a workaround to prevent the conflict.

    Regards,

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

The topic ‘Error with JS script “color-picker.min.js”’ is closed to new replies.