Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in version 1.8.3: ru_RU not available in the catalog #3106

Closed
vaka2vaka opened this issue Mar 19, 2019 · 10 comments
Closed

Error in version 1.8.3: ru_RU not available in the catalog #3106

vaka2vaka opened this issue Mar 19, 2019 · 10 comments
Assignees
Labels
Bug Has PR Bug/Feature with a PR created for it.
Milestone

Comments

@vaka2vaka
Copy link

vaka2vaka commented Mar 19, 2019

parsley.min.js?ver=1.8.3:2 Uncaught Error: ru_RU is not available in the catalog
at m.setLocale (parsley.min.js?ver=1.8.3:2)
at i.window.Parsley.(anonymous function) [as setLocale] (http://...............................ru/wp-content/plugins/caldera-forms/assets/build/js/parsley.min.js?ver=1.8.3:3:15735)
at zhalyuzi-plisse:1420
setLocale @ parsley.min.js?ver=1.8.3:2
window.Parsley.(anonymous function) @ parsley.min.js?ver=1.8.3:3
(anonymous) @ zhalyuzi-plisse:1420
parsley.min.js?ver=1.8.3:2 Uncaught Error: ru_RU is not available in the catalog
at m.setLocale (parsley.min.js?ver=1.8.3:2)
at i.window.Parsley.(anonymous function) [as setLocale] (http:// ...............................ru/wp-content/plugins/caldera-forms/assets/build/js/parsley.min.js?ver=1.8.3:3:15735)
at zhalyuzi-plisse:1439
setLocale @ parsley.min.js?ver=1.8.3:2
window.Parsley.(anonymous function) @ parsley.min.js?ver=1.8.3:3
(anonymous) @ zhalyuzi-plisse:1439
parsley.min.js?ver=1.8.3:2 Uncaught Error: ru_RU is not available in the catalog
at m.setLocale (parsley.min.js?ver=1.8.3:2)
at i.window.Parsley.(anonymous function) [as setLocale] (http:// ...............................ru/wp-content/plugins/caldera-forms/assets/build/js/parsley.min.js?ver=1.8.3:3:15735)
at zhalyuzi-plisse:1439

Version 1 7 6 is stable and error free

@vaka2vaka vaka2vaka changed the title Oshibka v versii 1.8.3: 23/5000 Error in version 1.8.3: Oshibka v versii 1.8.3: not available in the catalog Mar 19, 2019
@vaka2vaka vaka2vaka changed the title Oshibka v versii 1.8.3: not available in the catalog Oshibka v versii 1.8.3: ru_RU not available in the catalog Mar 19, 2019
@vaka2vaka vaka2vaka changed the title Oshibka v versii 1.8.3: ru_RU not available in the catalog Error in version 1.8.3: ru_RU not available in the catalog Mar 19, 2019
@vaka2vaka
Copy link
Author

vaka2vaka commented Mar 20, 2019

There was a mistake on the second site

Uncaught TypeError: a(...).baldrick is not a function
at resBaldrickTriggers (caldera-forms-front.min.js?ver=1.8.3:1)
at HTMLDocument. (caldera-forms-front.min.js?ver=1.8.3:1)
at i (jquery.js?ver=1.12.4:2)
at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4:2)
at Function.ready (jquery.js?ver=1.12.4:2)
at HTMLDocument.K (jquery.js?ver=1.12.4:2)
parsley.min.js?ver=1.8.3:2 Uncaught Error: ru_RU is not available in the catalog
at m.setLocale (parsley.min.js?ver=1.8.3:2)
at i.window.Parsley.(/12745-2/anonymous function) [as setLocale] (http://_____.pro/wp-content/plugins/caldera-forms/assets/build/js/parsley.min.js?ver=1.8.3:3:15735)
at (index):938

Uncaught TypeError: a(...).baldrick is not a functionhttp://,,,,,,,,,,,,,,,.pro/wp-content/plugins/caldera-forms/assets/build/js/caldera-forms-front.min.js?ver=1.8.3 line 1

Uncaught Error: ru_RU is not available in the cataloghttp://,,,,,,,,,,,.pro/wp-content/plugins/caldera-forms/assets/build/js/parsley.min.js?ver=1.8.3 line 2

Version 1 7 6 is stable and error free

@Shelob9
Copy link
Collaborator

Shelob9 commented Mar 21, 2019

One of two problems:

  1. Translation file is missing in package.
  2. The script to load it, which we changed here create caldera_forms_print_translation_strings_in_footer filter  #3087 caused problems.

To test, I would say load with language not english and the weglot integration off.

https://github.com/CalderaWP/Caldera-Forms/pull/3087/files#diff-7f01e925875e64c2a1b90354ab910155R880

@Shelob9 Shelob9 added the Bug label Mar 21, 2019
@Shelob9 Shelob9 added this to the 1.8.4 milestone Mar 21, 2019
@vaka2vaka
Copy link
Author

This problem was not observed in version 1.8.2.

@Shelob9
Copy link
Collaborator

Shelob9 commented Mar 21, 2019

The file is there in 1.8.3 so it must be loading incorrectly
https://plugins.svn.wordpress.org/caldera-forms/tags/1.8.3/assets/js/i18n/

Yah, probably #3087 broke how it loads. @vaka2vaka do you see the file yoursite.com/wp-content/plugins/caldera-forms/assets/js/i18n/ru.js loading?

@vaka2vaka
Copy link
Author

vaka2vaka commented Mar 21, 2019

yoursite.com/wp-content/plugins/caldera-forms/assets/js/i18n/ru.js loading?

// Validation errors messages for Parsley
// Load this after Parsley

Parsley.addMessages('ru', {
defaultMessage: "Некорректное значение.",
type: {
email: "Введите адрес электронной почты.",
url: "Введите URL адрес.",
number: "Введите число.",
integer: "Введите целое число.",
digits: "Введите только цифры.",
alphanum: "Введите буквенно-цифровое значение."
},
notblank: "Рто поле должно быть заполнено.",
required: "Обязательное поле.",
pattern: "Рто значение некорректно.",
min: "Рто значение должно быть РЅРµ менее чем %s.",
max: "Рто значение должно быть РЅРµ более чем %s.",
range: "Рто значение должно быть РѕС‚ %s РґРѕ %s.",
minlength: "Рто значение должно содержать РЅРµ менее %s символов.",
maxlength: "Рто значение должно содержать РЅРµ более %s символов.",
length: "Рто значение должно содержать РѕС‚ %s РґРѕ %s символов.",
mincheck: "Выберите не менее %s значений.",
maxcheck: "Выберите не более %s значений.",
check: "Выберите от %s до %s значений.",
equalto: "Рто значение должно совпадать."
});

Parsley.setLocale('ru');

@Shelob9
Copy link
Collaborator

Shelob9 commented Mar 21, 2019

Thanks @vaka2vaka this helps a lot.

Ok, the bug here is that it's trying to load ru_RU when only ru exists. The logic in the method that chooses the validation string file to load solves this, but the way we set the language in Parsely does not.

Caldera_Forms_Render_Assets::get_validator_locale_url()

@New0 New0 added the Has PR Bug/Feature with a PR created for it. label Mar 21, 2019
@Shelob9 Shelob9 pinned this issue Mar 21, 2019
Shelob9 pushed a commit that referenced this issue Mar 21, 2019
Reset correct code used by Translaton file #3106
@Shelob9
Copy link
Collaborator

Shelob9 commented Mar 21, 2019

Close via #3111

@Shelob9 Shelob9 closed this as completed Mar 21, 2019
@LaurieY
Copy link

LaurieY commented Mar 22, 2019

I had a similar error but this time en_GB
Applying the commit in pull request #3111 resolved it

@Shelob9
Copy link
Collaborator

Shelob9 commented Mar 26, 2019

These fixes are included in this test build https://github.com/CalderaWP/Caldera-Forms/files/3010315/1.8.4-b.1.zip

@vaka2vaka
Copy link
Author

vaka2vaka commented Mar 27, 2019

On the test site, the problem disappeared. Thank you! | 
ОF
As soon as the problem is solved (Front end page load size increase # 3065), happiness will come.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Has PR Bug/Feature with a PR created for it.
Projects
None yet
Development

No branches or pull requests

4 participants