You need to sign in to do that
Don't have an account?
Dhaker Hassine
VF page not working as a website home page
Hello everyone!
I createf a VF page, it works when I put preview, but when I put it as my website home page, it doesn't work.
What must be the problem here?
This is what it looks like when I overview my website home page:
But when I put any other VF page as a home page, it works normally
Hello! I manage to solve it by following this steps :
You should be sure about all objects and pages and classes are added to Site Public Access Settings.
On Setup \ Sites > click label of your site on the list.
Your site page opens, and click "Public Access Settings" button.
Here all permissions should be set. First edit and give permissions for all related objects, and then add your all related classes to Enabled Apex Class Access and add all related VF Pages to Enabled Visualforce Page Access list.
Then your component should work.
Hint: Dont add your component inside apex:form it causes dropdown menus to refresh all pages when click to open.
Thanks for efirat! source: https://salesforce.stackexchange.com/questions/178761/exposing-lightning-app-on-force-com-sites
Thank you Anudeep as well for your help
All Answers
Do you see any error in the network tools (browser console)? There could be issues with iframe (Certain X-Frame-Options header could stop embedding the site in a frame)
What does your VF page look like and do you see any specific differences when you compare both the pages?
and for my VF page, it's a lightning component call inside!
this is VF page code:
and this is the lightning component code :
Hi Anudeep;
Do you have any idea to solve this problem?
Does your testApp look like this? My suggestion would be to try replacing the app and component with any another app/component in your org to narrow this down
$Lightning.use("c:testApp", function() {
Also ensure your VF page is "Available for Lightning Experience, Lightning Communities, and the mobile app".
Anudeep
Hello! I manage to solve it by following this steps :
You should be sure about all objects and pages and classes are added to Site Public Access Settings.
On Setup \ Sites > click label of your site on the list.
Your site page opens, and click "Public Access Settings" button.
Here all permissions should be set. First edit and give permissions for all related objects, and then add your all related classes to Enabled Apex Class Access and add all related VF Pages to Enabled Visualforce Page Access list.
Then your component should work.
Hint: Dont add your component inside apex:form it causes dropdown menus to refresh all pages when click to open.
Thanks for efirat! source: https://salesforce.stackexchange.com/questions/178761/exposing-lightning-app-on-force-com-sites
Thank you Anudeep as well for your help