Weird JS error - Cannot read property 'locales' of undefined at select2_locale_en_us.js

Discussions about Cross-site Lookup
senglory
Posts: 11
Joined: Tue Sep 19, 2017

20 Sep 2017

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

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

21 Sep 2017

Strange, there shouldn't be such file with default installation. Did you add or edit any localization files on your own?
Cheers

senglory
Posts: 11
Joined: Tue Sep 19, 2017

21 Sep 2017

Yes, I had to add it from original GIT because I got "404 not found" with your clean setup:

http://prntscr.com/go2l22

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

22 Sep 2017

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.
Cheers

sarball
Posts: 6
Joined: Tue Aug 21, 2018

03 Oct 2018

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
Lookup error in SOW list for Plumsail.jpg (169.42 KiB) Viewed 7746 times

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

03 Oct 2018

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
FunctionExpected.jpg (65.07 KiB) Viewed 7744 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.
Cheers

sarball
Posts: 6
Joined: Tue Aug 21, 2018

24 Oct 2018

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
Attachments
picturemessage_p1qh1gp0.2iw.png
picturemessage_p1qh1gp0.2iw.png (132.33 KiB) Viewed 7697 times
test list crash.png
test list crash.png (39.41 KiB) Viewed 7697 times

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

25 Oct 2018

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?
Cheers

sarball
Posts: 6
Joined: Tue Aug 21, 2018

25 Oct 2018

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.

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

25 Oct 2018

Does it matter which one? Or it can be either of two?
Cheers

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests