Custom Fields
Support General Heads up on COLOR PICKER/ALPHA CHANNEL javascript error (Due to WP 5.5)

  • Creator
  • #21464
    Resolved Teia Local Studio

    Hey guys!

    Just updated to WordPress 5.5 and I got a error on JavaScript console on the ALPHA CHANNEL feature for COLOR PICKER. At first moment I did think it was related to the META BOX suite, however it is a general problem happening on many themes and plugins out there.

    So, I would suggest you to address a fix within Meta Box internals, because other people could think same way as me and come here asking for help.

    Color Picker/Alpha Channel error

    I understand it is a problem inside the COLOR PICKER code, but, anyway, I did fix it using this on my theme functions.php file:

    if( is_admin() ){
        add_action( 'wp_default_scripts', 'wp_default_custom_scripts' );
        function wp_default_custom_scripts( $scripts ){
            $scripts->add( 'wp-color-picker', "/wp-admin/js/color-picker.js", array( 'iris' ), false, 1 );
            did_action( 'init' ) && $scripts->localize(
                    'clear'            => __( 'Clear' ),
                    'clearAriaLabel'   => __( 'Clear color' ),
                    'defaultString'    => __( 'Default' ),
                    'defaultAriaLabel' => __( 'Select default color' ),
                    'pick'             => __( 'Select Color' ),
                    'defaultLabel'     => __( 'Color value' ),
Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
  • #21469
    Long Nguyen


    Meta Box uses WP Color Picker Alpha as a library as many themes/plugins. This issue has been noticed and the developer has created a pull request to fix it We are waiting for this PR will be merged and update the new version of Meta Box.

    Thanks for your code, it will help other users for temporary fixing.

    Long Nguyen

    Solved in the new version 5.3.4 of Meta Box, please update the plugin to fix this issue.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.