2

I have created a site that I will use for internal employees who do not have a salesforce license. I have set this up but for whatever reason I cannot access any account info.

http://mastercontrol.force.com/anycethome/anyCustomerEmployeeTimeDetail?id=0013000000GfdxRAAR - this page throws the authentication error

http://mastercontrol.force.com/anycethome/anyCustomerEmployeeTimeDetail - this loads fine but with no data

I have set the permissions for all of the objects. I feel like I have checked everything I know to check.. what am I doing wrong?!!

Let me know if you need more details.

3 Answers 3

2

You're having a code problem. The "authentication required" error happens when the site user experiences an error, such as not having permission to a field, a null-pointer exception, etc. This has already been answered a few times on the forums and on blogs. Debugging Sites Authorization Required Error! is one such blog post. The author's words are not my own, I'll summarize.

  1. Try using the debug logs for the sites user. Setup > Monitoring > Debug Logs, enable the sites user, generate the error, and check the logs.

  2. Turn on development mode for your admin user (Setup > Personal Information) and try viewing the page. You might be able to see the error directly (assuming this is a code problem and not a security issue).

  3. Setup an alternate Visualforce page to capture the error from the first page, and return the errors back to that page.

4
  • Here is what I get when the Auth required comes up - thanks for the answer - I will check out the page you suggested tomorrow... 28.0 APEX_CODE,DEBUG;APEX_PROFILING,INFO;CALLOUT,INFO;DB,INFO;SYSTEM,DEBUG;VALIDATION,INFO;VISUALFORCE,INFO;WORKFLOW,INFO 05:43:46.020 (20490000)|EXECUTION_STARTED 05:43:46.020 (20533000)|CODE_UNIT_STARTED|[EXTERNAL]|066a0000001IOOh|VF: /apex/Unauthorized 05:43:46.743 (80561000)|CUMULATIVE_LIMIT_USAGE 05:43:46.743|CUMULATIVE_LIMIT_USAGE_END 05:43:46.080 (80602000)|CODE_UNIT_FINISHED|VF: /apex/Unauthorized 05:43:46.080 (80614000)|EXECUTION_FINISHED Commented Aug 11, 2013 at 5:45
  • @Merry look at the previous page log .This is Unauthorized page log.Also as SfdcFox says debug as admin .go to sites and say debug as admin.Hope this helps Commented Aug 11, 2013 at 5:52
  • Here is the one before: 28.0 APEX_CODE,DEBUG;APEX_PROFILING,INFO;CALLOUT,INFO;DB,INFO;SYSTEM,DEBUG;VALIDATION,INFO;VISUALFORCE,INFO;WORKFLOW,INFO 06:18:00.019 (19668000)|EXECUTION_STARTED 06:18:00.019 (19719000)|CODE_UNIT_STARTED|[EXTERNAL]|066a0000001ILou|VF: /apex/anyCustomerEmployeeTimeDetail 06:18:00.781 (93456000)|CUMULATIVE_LIMIT_USAGE 06:18:00.781|CUMULATIVE_LIMIT_USAGE_END 06:18:00.093 (93499000)|CODE_UNIT_FINISHED|VF: /apex/anyCustomerEmployeeTimeDetail 06:18:00.093 (93513000)|EXECUTION_FINISHED Commented Aug 12, 2013 at 4:18
  • There are no errors when I use debug as admin. This works fine as a vf page when logged into SF, which really makes it seem like a permission issue, but I have given read permission to every object. No to mention every apex class and vf page. So, I am at a lost. Commented Aug 12, 2013 at 4:19
1

I simply feel its permission issue or list has no rows assignment query issue as the error is happening after you append id in url.

you can use the debug log to find out easily if its a query issue.

Make sure you have read permission for all objects you are querying in the page

0
  • Go to Develop-->Sites--> Click on the Sites Label.
  • Check whether your VF page is added to "Site VF pages".

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .