Pages occasionally will not display when loading components via Lightning Out
Last updated 2019-04-06 ·Reference W-6011340 ·Reported By 3 users
Summary
When attempting to view a Visualforce page which contains Lightning components implemented via Lightning Out, these pages may intermittently appear not to fully load.
This is due to the link between the page and the components being dynamically created being intermittently not being discoverable when utilising a CDN (Content Delivery Network), which is enabled by default for all new organizations (https://releasenotes.docs.salesforce.com/en-us/winter19/release-notes/rn_lc_cdn.htm), and also able to be set up for Communities (https://help.salesforce.com/articleView?id=community_builder_cdn.htm&type=5).
Repro
- Create a CDN-enabled Community.
- Create and expose a Visualforce page, which loads a component via Lightning Out.
- In this page, dynamically create components using the $A.createComponent() function
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/js_cb_dynamic_cmp_async.htm
- When viewing the subsequent page, it may intermittently not load the components.
- When viewing the Javascript console logs, some of the related error messages could include the following:
No COMPONENT named markup://c:YOUR_LIGHTNING_COMPONENT
Error : WARNING: No component definition for c:YOUR_LIGHTNING_COMPONENT in the client registry - for best performance add <aura:dependency resource="c:YOUR_LIGHTNING_COMPONENT"/> to your extension of c:LIGHTNING_BASE_COMPONENT.
Workaround
For any Lightning components that are known to be dynamically loaded, ensure that Aura dependencies are correctly set for all internal components.
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/ref_tag_dependency.htm
For any other issues, please contact Salesforce Support.
Reported By (3)
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.