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
colemabcolemab 

VF page on public site - fields don't display even though field level security is set?

Everyone,

 

Previously, I created a VF page on a public site and everything works.  I updated added new fields to the form in the sandbox and migrated to production.  In production, I set the field level security (FLS) for the new fields and double checked object security for the public / site user (under the sites public access settings).

 

However, the fields still do not display on the page for non authenticated users.  Of course they show for me once logged in.   Any ideas as to whatelse (besides object and/or field level security) could be wrong?

 

Thanks,

 

Tony

colemabcolemab

Update on this:

 

I checked my URL and the camel case address workes just fine (i.e. displays the missing fields).  However the all lower case (site name) url doesn't display the 'missing' fields.   I have opened a case with salesforce support to investigate why this is.  I would have thought that the pages would be the exact same or one URL would throw an error. 

 

I will update this if/when I hear back from salesforce about my case.

 

Thanks

Shashikant SharmaShashikant Sharma

Yes thats is a Known scenario, I would suggest as I always do, do not use field bindings in SitePages directly in 

<apex:inputField 

rather use 

 

<apex:inputText value="someControllerProperty" />

 

someControllerProperty should be connected to the actual field value in getter setter of property.

 

let me know if any issues with this apprach.

colemabcolemab

First off, thanks for taking the time to read and reply to my post.

 

Secondly, I am using the value option to set it to a controller property.  Here is a sample line for a field that isn't displaying:

 

<apex:inputField value="{! Lead.Same_Billing_and_Shipping_address__c}" id="SameAddress">

 

If you have any more info about this known issue, I would love to read up on it.  In the mean time, my case is still open and I am awaiting a reply from sales force.

colemabcolemab

I am still working with salesforce support on this issue but ATM I beleive that the underlying cause is that the site adress is not case sensitive but the public access profile is and that is why the permissions are different.  I beleive this because when I updated the site url from camel case to lower case and back, the pages now display properly.  This leads me to beleive that the public access profile that was lower case got updated (via the site name change).   More to come . . . .

colemabcolemab

Salesforce has confirmed this as a bug and has an item opened with R&D to investigate in a future release.  In the mean time, it is recommended that your site url be all upper or all lower case.