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
JasonGablerJasonGabler 

Page on Site will not render, no error msgs, when adding an apex:inputField

I created a custom object, a template , page.  It renders just fine.  I created a new custom object, similar in structure to the first.  I took that VF page and copied it, changed the StandardController and new inputFields to follow the new object's API name.  This second page will not render if I put inputFields into it.  If I take the inputField out all is good and the page renders in the template as otherwise expected.  Putting the inputField's back in, I get no error msgs in the IDE or on the page.  I've put <site:previeAsAdmin/> in various places in the template and this second page.  No errors print out at all.  In fact, when I have an inputField in the page, the apex:outputLabels don't show, nothing does but the template itself.   How can I find out what errors are occurring?

 

thank,

 

jason

 

[EDIT]  I created a custom tab to view the page directly within Salesforce (as opposed to a site).  Everything works fine when I view the VF page as a tab within Salesforce, logged in, of course.  This would seem to point to some sort of access issue.  However, the site's profile has access to the page, the template, all fields' security is set to "editable" or "read-only".   In fact, when I've forgotten to set field security in the past, the field won't show, but the rest of the page will still render... so, I'm glad,. at least I can view the page as a tab, but this must show on the site.  So, over all, I'm more perplexed than before :robotsurprised: 

 

[EDIT]  OK, so I went into the manage page for my site, set this offending VF page as my sites home page and then clicked on the "Preview as Admin" link and saw this:  "Read access not found for RFQ_2__c".  Well that's good... now I just have to figure out why the site does not have object-level access to this object... even though the site is configured to.

 

Best Answer chosen by Admin (Salesforce Developers) 
JasonGablerJasonGabler

OK figured it out.   Note my last "[EDIT]" above, and the error message given.  Once I got that it took my about 30 seconds to solve this

 

I had granted every kind of access to the object in question, except the most important one:  Custom Object Permissions on the site's "user" profile.  

 

I hope this helps someone... and I hope I grow my hair back :p

 

jason

All Answers

JasonGablerJasonGabler

OK figured it out.   Note my last "[EDIT]" above, and the error message given.  Once I got that it took my about 30 seconds to solve this

 

I had granted every kind of access to the object in question, except the most important one:  Custom Object Permissions on the site's "user" profile.  

 

I hope this helps someone... and I hope I grow my hair back :p

 

jason

This was selected as the best answer
Erroll SolomonErroll Solomon
You are awesome. No error messages to troubleshoot from. Went crazy.
Fixed in 30 seconds with your help. Now I need to go find my hair and my sanity. Thanks.