Support

Account

Home Forums Bug Reports WP 5.5 color picker breaks front-end form

Solving

WP 5.5 color picker breaks front-end form

  • Hi there,

    I updated WP to 5.5 and I am using the latest version of ACF PRO, now when my front-end form loads a color picker field, the console throws the following error:

    Uncaught ReferenceError: wp is not defined on color-picker.js?ver=5.5:14

    Resulting in another error on acf-input.min.js?ver=5.9.0:1:

    Uncaught TypeError: e.wpColorPicker is not a function

    It doesn’t happen on the back-end though. It seems to be a problem on the Color picker script’s side. Other plugins face the same issue, but their temporary solutions don’t seem to work here.

    Is there any way to (temporarily) fix this for the acf_form function?

  • Hi Guys

    I can confirm that WP 5.5 causes JS errors for the color picker on the acf_form_head() function;

    Tested with no other plugins and twenty twenty theme.

    Your hep is appreciated

  • This should be corrected in WP 5.5.1

  • Hi John,

    Thanks for reaching out!

    Sadly, it isn’t working in 5.5.1 either. I’ve submitted a support ticket and the team is looking for a solution. Downgrading WP to a version prior to 5.5 seems to be the fix for now.

  • Yes the JS Error issue persists after updating to 5.5.1

  • From what I’ve found the 5.5 update broke millions of sites. This is why I generally do not update until after the first minor release for a major release and sometimes not even then. I just wait and let everyone else update so that the bugs can be reported and hopefully fixed. I’m working on a new site now that I must revert to 5.4… because fool that I am I keep sites in development up to date to make sure things will not break 😛

  • Having same problem and i ended in the same as kcalv said about acf_form_head();

    And for what i could see the problem start since this change on the wp core:

    https://github.com/WordPress/WordPress/commit/7e7b70cd1ae5772229abb769d0823411112c748b#diff-9c3519f4870fac83dc0dbf18cb6bd4c4

    See how it´s added a new “__ = wp.i18n.__;” into the ColorPicker var.

    I guess many other changes in core about i18n and how js uses translations are the problem here, sine i saw many other plugins that are having the same not defined “wp”.

    For what i see this is a change that affects many other things, all related on how js uses translations, basicly this:

    This removes the usage of wp_localize_script() for passing translations to the script and instead adds the translatable strings in the script directly through the use of wp.i18n and its utilities.

    Hope this help to find the solution.

  • It has been fixed in the 5.9.1 update, thanks Elliot and team!

  • I can confirm “wp is not defined” it´s fixed on ACF 5.9.1.
    Thanks!

  • I still have this problem ACF Pro 5.9.3 and WP 5.5.3.
    TypeError: e.wpColorPicker is not a function. (In ‘e.wpColorPicker(a)’, ‘e.wpColorPicker’ is undefined)

  • I am also having this issue still.

    It seems like it may only be an issue after there are a certain amount of color pickers on the backend (within a repeater).

    WordPress 5.6
    ACF 5.9.3

  • As giga_mike i can also confirm exactly the same error when multiple color pickers are used on backend.

    WP 5.6
    ACF pro 5.9.3

  • Hello! 🙂
    Saem problem here:
    wpColorPickerL10n.pick est obsolète depuis la version 5.5.0 ! Utilisez wp.i18n à la place.
    Wordpress 5.6
    ACF 5.9.4

    Color picker is in repeater field.

Viewing 13 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.