- 05 Nov 2024
- 1 Minute To Read
-
Print
-
DarkLight
-
PDF
Preview mode not working on Salesforce Lightning
- Updated On 05 Nov 2024
- 1 Minute To Read
-
Print
-
DarkLight
-
PDF
Issue
When you create Whatfix content on Salesforce Lightning, and then try to preview the content, you can't see any content being displayed. You notice that other content that was published is appearing (in production). But nothing seems to display in Preview Mode.
Probable Cause
Sites like Salesforce Lightning have a Content Security Policy (CSP) in place to prevent external code insertions. This prevents the Preview Mode on Whatfix from working on Salesforce Lightning.
This issue is only for the Preview Mode. Once the content is pushed to Production, there is no issue with seeing the content.
Suggested Solution
To work around this, use a browser extension to disable the CSP policy when previewing content.
Use CSP extension only when using Preview Mode on Salesforce Lightning and disable the extension once testing is done.
Use the following steps to disable the CSP on Salesforce Lightning:
-
Install any one of the following extensions in your Chrome browser.
This method is also supported on the Edge Browser extension. You can install the extension that works best on your browser and follow the steps below.
-
Before enabling the Preview Mode, click the CSP extension to enable it.
-
Activate the Whatfix Preview Mode and the content displays in the preview mode.
-
Once testing is done, disable the extension by clicking it again.
If the issue persists, contact support@whatfix.com.