I have a Lightning component on my SF community page with Locker Service enabled. I am using ltng:require tag to load custom JavaScript/jQuery from a static resource. The main issue is the jQuery library I think (using 2.2.4 as), it is listed on SF documentation page as working. It throws an exception in Community editor. Although the actual live page executes my custom JavaScript code successfully. It happens only if I use API 40+ (i.e. LockerService). enter image description here

  • If you check your network tab while loading the page, you will see that it is already being loaded, not sure what version is used though, maybe there is a conflict of libraries?
    – glls
    Sep 11 '17 at 19:12
  • Thanks @glls . Yeah I saw that. It could be .. But it works if I add jquery 3.2.1 but then it breaks other jQuery library - jQuery UI 1.21.1. Sep 11 '17 at 19:44
  • check this post
    – glls
    Sep 11 '17 at 19:49
  • Thanks @glls .. As mentioned in the post you shared, it is not a recommended but I guess I will try if there is no other option. I found one more post regarding the issue I am facing with v3.2.1 with UI 1.12.1 . salesforce.stackexchange.com/questions/180535/… I guess it is a bug in Salesforce. Sep 11 '17 at 20:00
  • @balindersingh, could you add some repro steps? The error doesn't seem related to LockerService, and could be a side effect of something else.
    – JF Paradis
    Sep 13 '17 at 18:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.