• When trying to edit any page in elementor it will not load. Throws error: Uncaught Error is ‘Uncaught Reference Error:’ ‘wpColorPickerL1On is not defined’. Researching I found this: https://core.trac.www.ads-software.com/ticket/50857 and it references the same issue. But looks like it is over 1000 plugins that are affected because of the color picker in wordpress. Specifically the article references issue with color picker:
    wpColorPickerL10n is not defined and says…

    It happens because there is no script that was in the previous WordPress versions.

    <script>
    var wpColorPickerL10n = {"clear":"Clear","clearAriaLabel":"Clear color","defaultString":"Default","defaultAriaLabel":"Select default color","pick":"Select Color","defaultLabel":"Color value"};
    </script>

    But does not state where that would have gone. Help finding that is welcome????

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter toconnell1111

    (@toconnell1111)

    I believe this is affecting the Elementor plug-in as it uses color-picker.
    That is not loading when trying to edit any page now.

    Thank you for reporting this issue to us.

    Could you please send here an example of how to recreate this issue?
    We tried to reproduce this issue on our side, and it all seems to work just fine.

    Also, we are currently not using the “wpColorPickerL10n” library – have you tried updating Elementor to its latest version?

    • This reply was modified 4 years, 3 months ago by Elementor.
    Thread Starter toconnell1111

    (@toconnell1111)

    All my updates are done and Elementor and all other modules are at the latest versions. I am in the back office. I choose any page and click EDIT WITH ELEMENTOR, it will eventually load sometimes but most times it times out and when click inspect page I see the error on the right in the console which is the error listed above.

    Thread Starter toconnell1111

    (@toconnell1111)

    ‘Uncaught Reference Error:’ ‘wpColorPickerL1On is not defined’ is the error and it shows from the elementor plug in folder in console. It can be viewed from inspecting the home page as well at fpuanet.com/NEW2/

    Hi! It’s an error from WordPress 5.5, I fixed with this code into your child theme function file.

    add_action( 'wp_print_scripts', 'pp_deregister_javascript', 99 );
     
    function pp_deregister_javascript() {
    	if(!is_admin())
    	{
    		 wp_dequeue_script('wp-color-picker');
    		 wp_deregister_script( 'jquery-ui-datepicker' );
    		 wp_deregister_script( 'wp-color-picker-js-extra' );
    		 wp_deregister_script( 'wp-color-picker' );
    
    	}
    
    }

    I hope it works for you.

    Yes, this works:

    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$suffix.js", array( 'iris' ), false, 1 );
                    did_action( 'init' ) && $scripts->localize(
                            'wp-color-picker',
                            'wpColorPickerL10n',
                            array(
                                    'clear'            => __( 'Clear' ),
                                    'clearAriaLabel'   => __( 'Clear color' ),
                                    'defaultString'    => __( 'Default' ),
                                    'defaultAriaLabel' => __( 'Select default color' ),
                                    'pick'             => __( 'Select Color' ),
                                    'defaultLabel'     => __( 'Color value' ),
                            )
                    );
            }
    }

    Hi Everyone,
    WordPress 5.5 Alpha color picker issue:
    Updated solution here. Copy following code and paste into your child theme function 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(
    			'wp-color-picker',
    			'wpColorPickerL10n',
    			array(
    				'clear'            => __( 'Clear' ),
    				'clearAriaLabel'   => __( 'Clear color' ),
    				'defaultString'    => __( 'Default' ),
    				'defaultAriaLabel' => __( 'Select default color' ),
    				'pick'             => __( 'Select Color' ),
    				'defaultLabel'     => __( 'Color value' ),
    			)
    		);
    	}
    }
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘WordPress 5.5 update Crashing Elementor Color Picker Issue’ is closed to new replies.