Page 1 of 2
Weird JS error - Cannot read property 'locales' of undefined at select2_locale_en_us.js
Posted: 20 Sep 2017
by senglory
Chrome/IE - doesn't matter. I added lookup field and started getting this error in JS:
Cannot read property 'locales' of undefined at select2_locale_en_us.js
Re: Weird JS error - Cannot read property 'locales' of undefined at select2_locale_en_us.js
Posted: 21 Sep 2017
by Nikita Kurguzov
Strange, there shouldn't be such file with default installation. Did you add or edit any localization files on your own?
Re: Weird JS error - Cannot read property 'locales' of undefined at select2_locale_en_us.js
Posted: 21 Sep 2017
by senglory
Yes, I had to add it from original GIT because I got "404 not found" with your clean setup:
http://prntscr.com/go2l22
Re: Weird JS error - Cannot read property 'locales' of undefined at select2_locale_en_us.js
Posted: 22 Sep 2017
by Nikita Kurguzov
Yes, these errors are present, but they actually shouldn't affect how the Cross-site Lookup functions since English is the default language. If you don't want to see these errors, you can create empty files for English localization. You are getting these "weird" errors because you've included extra files which are trying to load, but fail to do so properly. You don't need them actually, they are only causing issues at this point.
Re: Weird JS error - Cannot read property 'locales' of undefined at select2_locale_en_us.js
Posted: 03 Oct 2018
by sarball
Hi Nikita,
We have a similar error in a form within a list where we have 2 Plumsail lookups in the form.
The form does not display the data in the look up fields in the form and we get the following error:
- Lookup error in SOW list for Plumsail.jpg (169.42 KiB) Viewed 6801 times
Re: Weird JS error - Cannot read property 'locales' of undefined at select2_locale_en_us.js
Posted: 03 Oct 2018
by Nikita Kurguzov
Dear sarball,
As I've already replied in this topic - these errors are not important, they do not affect the work of the lookups or anything else for this matter. What's more interesting is another error you are getting
Function expected...
- FunctionExpected.jpg (65.07 KiB) Viewed 6799 times
Can you, please, click on this link and show us what it shows?
Also, please, post a screenshot of the form itself (not just the console), as well as the lookups, what they actually show.
Re: Weird JS error - Cannot read property 'locales' of undefined at select2_locale_en_us.js
Posted: 24 Oct 2018
by sarball
Hi Nikita
We have started fresh with a new test list and no custom forms no custom JS. The view crashes when there are two lookups from a site lower down the tree and we get the attached details in the form:
The cross site lookups are in a site two subsite levels down from the PWA site.
Thanks, Sarah
Re: Weird JS error - Cannot read property 'locales' of undefined at select2_locale_en_us.js
Posted: 25 Oct 2018
by Nikita Kurguzov
Dear Sarah,
So, as I can see, the lookups actually work fine on the form, but the List View crashes, correct? Are there any issues with lookups on the form, except for this JS error?
Regarding List View, if you remove these two specific lookups from the List View, will it load properly?
Re: Weird JS error - Cannot read property 'locales' of undefined at select2_locale_en_us.js
Posted: 25 Oct 2018
by sarball
Yes the data is there in the look up fields but not displaying in the form or view when there are more than one look up. If there is only one look up field it seems fine.
If we remove all but one look up field, the view loads correctly.
Thanks for your other reply, I will check on this and add further details here.
Re: Weird JS error - Cannot read property 'locales' of undefined at select2_locale_en_us.js
Posted: 25 Oct 2018
by Nikita Kurguzov
Does it matter which one? Or it can be either of two?