Skip Navigation

[Resolved] Uncaught TypeError: wp.i18n is undefined (Colour Picker)

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 7 replies, has 3 voices.

Last updated by Jamal 5 months ago.

Assigned support staff: Jamal.

Author
Posts
#1900945

Am running WP 5.6, Forms 2.6.5 and Types 3.4.5. Have noticed Uncaught TypeError: wp.i18n is undefined in inspection tools and reference to /wp-admin/js/color-picker.min.js?ver=5.6:2.

Please advise

#1901023

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I do not see any evidence that the error belongs to Toolset.

Do you see the same error when Toolset plugins are deactivated?
- If no, Toolset does not have to do anything with error.
- If yes, What steps I should follow to see this error

Could you please send me debug information that will help us to investigate your issue.
=> https://toolset.com/faq/provide-debug-information-faster-support/

#1903481

The colorpicker is a CRED field. If I deactivate Forms or Types, it stands to reason I won't see the error!!

Just because the word "toolset" doesn't appear in the error, doesn't mean it's not triggered by something Toolset related. It could be that the i18n library is loaded too late or it's being called incorrectly - I have no idea that's why I've come to you.

I discovered this issue on a test site. The debug info is for a live (but insignificant site) where I've added a colorpicker field to a frontend form. You can see it here hidden link but you will need to be located in UK or US or tell me which country to unblock for access.

The curious thing is that when the field is the first on the form, the error shows. If it's below any others, the error doesn't show. I've also tested it using the 2020 theme and the same thing happens.

#1903643

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok - so basically, you have a custom post type having color picker field and then you have created a Toolset form for that post type and you see the mentioned error when you load the form on the frontend when color picker field is at top of the form, it color picker field is set 2nd or 3rd field, you do not notice this error - correct?

#1903697

That's correct

#1906301

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Minesh is on vacation for a couple of days. If you don't mind, I'll continue with you on this thread.

I was able to reproduce the issue on a clean install. You can check it here hidden link

For some reason, the color picker script is loaded before the i18n script if the first field in the form is a color picker. It does not happen on this page hidden link

Let me escalate this issue to our 2nd Tier for further analysis and get back to you.

#1910795

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

This issue is now escalated to the developers. I'll get back to you as soon as we have a fix or a workaround.

#2025093

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

This issue with the color field at the bottom of a form has been fixed and released in this week's update. Please make a full backup before updating the plugins.