function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Charlie CoxCharlie Cox 

Fields not visible on the site

I am having trouble displaying fields on my visualforce page when I add it to the site. I have checked all the public access settings and the field level security, they are both set as they should be. It is like I do not have access to the object itself. When I do <apex:inputField value="ObjectName.Field__c" /> it shows up in the visualforce page but not the site. We are using record types for this object but everything seems to be fine there as well. Does anyone have any expirence with this?

Are you using a logged in user or are you watching the page as a pubblic page on your site?
If it is a pubblic page, have you checked the public access profile of your site? You may not have any access set for your custom object! (Developer > Sites > [Your site label] > Public Access Setting button)
Hope this helps
May the be with you!
Charlie CoxCharlie Cox
Yes everything is added to the site. Is that what you meant?
If you have allowed your custom object for the Public Site Profile (as described above), as well as its fields, I can't tell what is going on :( When this happens (from personal experience with Sites and Comunities) it is related to Profiles not correctly set!
 From Salesforce, you can click the Site Label to go to the site details page. Then on that page, there is a Button called "Public Access Settings", you can click that Button and edit that Profile to give Object Level Access and Field Level Access to the required Objects/Fields.
Charlie CoxCharlie Cox
Yes, I have done that... Yuchen...
Jonathan Vance 5Jonathan Vance 5
I am having the same issue. Did you ever find a solution?
Charlie CoxCharlie Cox
I would make sure you are setting the profile permissions for the profile you want, not some other profile. I have done that in the past but can't remember if that was the issue here.
Jonathan Vance 5Jonathan Vance 5
Thanks, Charlie, your answer is generally correct. The profile I needed to edit does not appear under Profiles. I had to go to Sites->MySiteLabel->Public Access Settings, then clicked Edit, which took me to my custom profile which I needed to edit, where I was able to edit permissions on my custom object.

Long story short, the answers here are all correct, just need to click Edit on the Public Access Settings page!
Johnson PaulJohnson Paul
Though the topic is pretty old I still have the issues - Object shows up on the public site but not the fields

I have gone to Sites->MySiteLabel->Public Access Settings clicked edit and granted access


In the following screenshot on the left in Salesforce app the event object has one entry 'test event' but on the right it is the public salesforce site, only object is visible and on items are displayed - it would be really appreciated if someone could help me resolve this... 

Object is showing up but not the field