JavaScript Error in Lightning

  • 2
  • Problem
  • Updated 5 months ago
  • Not a Problem
I am getting an error when selecting the cancel button on tables of Skuid pages embedded in lightning. I am see this no two different orgs both on 11.1.6:

[Cannot read property 'find' of undefined]
b.z.editor.handleCancel()@https://ORGNAMEHERE.lightning.force.com/resource/1521239945000/skuid__CoreComponents/core.js:16:2567...
b.eval()@https://ORGNAMEHERE.lightning.force.com/resource/1521239948000/skuid__SkuidJS:23:18314
Function.each()@https://ORGNAMEHERE.lightning.force.com/resource/1514499240000/skuid__JQueryJS:13:14965
Object.P [as cancel]()@https://ORGNAMEHERE.lightning.force.com/resource/1521239948000/skuid__SkuidJS:23:18275
b.cancel()@https://ORGNAMEHERE.lightning.force.com/resource/1521239948000/skuid__SkuidJS:31:28790
Proxy.eval()@https://ORGNAMEHERE.lightning.force.com/resource/1521239948000/skuid__SkuidJS:31:25906
Proxy.dispatch()@https://ORGNAMEHERE.lightning.force.com/resource/1514499240000/skuid__JQueryJS:14:19404
Proxy.q.handle()@https://ORGNAMEHERE.lightning.force.com/resource/1514499240000/skuid__JQueryJS:14:17419

I am also seeing a similar error on a custom snippet that worked as of two weeks ago. I thought it has to do with the custom JS, but it is happening with a standard Skuid component as well. I have looked at the latest releases and none of them seem to address this. Any insight on what I can do to fix this?
Photo of Nosa Osai

Nosa Osai

  • 398 Points 250 badge 2x thumb

Posted 6 months ago

  • 2
Photo of Stephen Sells

Stephen Sells, Official Rep

  • 16,856 Points 10k badge 2x thumb
Do you still receive this error after upgrading to the latest version of Skuid?

I haven't seen any reports of this happening from anyone else in Lightning. It makes me curious how you have built your page.
Photo of Nosa Osai

Nosa Osai

  • 398 Points 250 badge 2x thumb
I updated to version 11.1.14 in a Sandbox to see if it was a version issue and I am still getting this error.
Photo of Nosa Osai

Nosa Osai

  • 398 Points 250 badge 2x thumb
A bit more detail: the error shows when attempting to edit in any table. I've seen the error in tables with custom field renderers and new tables with no customization. For the models in these tables do not register a change (for save and cancel buttons) on the first edit. For instance, when trying to change the value of a picklist, the first selection would not register but any subsequent selection will register as would editing any other field. This may be due to the js error that's getting thrown.

On clicking cancel after clicking edit, Salesforce throws a lightning error with what looks like the same error that is seen in the console. This is the error after clicking cancel in the sandbox:

[Cannot read property 'find' of undefined]
b.z.editor.handleCancel()@https://ORGNAMEHERE.lightning.force.com/resource/1528589699000/skuid__CoreComponents/core.js:4:25625
b.eval()@https://ORGNAMEHERE.lightning.force.com/resource/1528589719000/skuid__SkuidJS:11:18565
Function.each()@https://ORGNAMEHERE.lightning.force.com/resource/1521204697000/skuid__JQueryJS:1:14963
Object.P [as cancel]()@https://ORGNAMEHERE.lightning.force.com/resource/1528589719000/skuid__SkuidJS:11:18526
b.cancel()@https://ORGNAMEHERE.lightning.force.com/resource/1528589719000/skuid__SkuidJS:19:30007
Proxy.eval()@https://ORGNAMEHERE.lightning.force.com/resource/1528589719000/skuid__SkuidJS:19:27123
Proxy.dispatch()@https://ORGNAMEHERE.lightning.force.com/resource/1521204697000/skuid__JQueryJS:2:19404
Proxy.q.handle()@https://ORGNAMEHERE.lightning.force.com/resource/1521204697000/skuid__JQueryJS:2:17419
Photo of Stephen Sells

Stephen Sells, Official Rep

  • 16,856 Points 10k badge 2x thumb
Can you copy and paste an XML page with standard objects and fields that replicates the error so we can investigate it?
Photo of Nosa Osai

Nosa Osai

  • 398 Points 250 badge 2x thumb
I haven't been able to replicate it with standard objects. I'm wondering if it's something in the specific page. Would granting login access be appropriate here?
Photo of Nosa Osai

Nosa Osai

  • 398 Points 250 badge 2x thumb
Stephen,

I tested 11.2 in the Sandbox that I am working in and I do not see the issue anymore. I will do more testing to make sure nothing else is affected by the upgrade and update the client to 11.2 down the line.

Thanks!