I have a lightning component which uses external libraries like d3.js and jquery. I have to use this this component in a lightning page as well as show it on the record detail page of a custom object. I am doing this by using adding the component in an app which is then added to the visualforce page by Lightning Out. Some Observations are:

  1. Opening the visualforce using the classic url (/apex/mypage) works fine.
  2. In the record detail page, it throws a cross origin frame error.
  3. If I remove the ltng:require from the component and remove the loading of the d3 and jquery static resource, it works in the detail page (but does not render charts and stuff obviously unless I import it in the vf page(but I need it run independently as well)).

How do I fix this error or render the lightning component in the record detail page through lightning out.

Sample Code: https://jsfiddle.net/2rf4qq6t/

  • Please share your component code and your visualforce code – Itai Shmida Dec 6 '17 at 7:20
  • check the jsfiddle link – the_buffered_reader Dec 7 '17 at 6:28
  • there is no lightning component in this jsfiddle... – Itai Shmida Dec 7 '17 at 7:05
  • cant write the entire component because of the size and complexity as well as copyright I assume, but the basic markup has been added. The component works fine independently – the_buffered_reader Dec 7 '17 at 10:53
  • You can add code here, if not all - at least the main parts. Sorry, cannot help without code... – Itai Shmida Dec 7 '17 at 11:08

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.