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
mallikammallikam 

issues with site access

I created a VF page and I integrated with sites. I have set all the permissions properly as much as I could. Now when I access the URL for sites, I am facing the following issues. Basically, my VF page has a contact lookup and then some fields from a custom object created by me.

 

1. If I login to sales force and click on the sites URL, I can see basic form with all the fields and everything but if I click on the look up for contact, I am getting Authorization required error. If I still try to fill some fields and submit the form, I am getting the following errors.

 

Errors j_id0:j_id2:thePageBlock:remail:j_id40:rem: An error occurred when processing your submitted information. j_id0:j_id2:thePageBlock:email:j_id50:em: An error occurred when processing your submitted information. j_id0:j_id2:thePageBlock:info:j_id54:**bleep**: An error occurred when processing your submitted information. j_id0:j_id2:thePageBlock:info:j_id65:dept: An error occurred when processing your submitted information.

 

 

Its complaining about some of the fields that I filled in(not all of them)..and rem, em and **bleep** and dept are id names of the fields that I filled in which are Employee email, title and deprtment.

 

How can I resolve this.

 

I have set the permissions for custom object as follows..

 

I have checked all fields under Basic access and Data administration except for delete and modifyall. Should I check them as well inorder to get rid of the page submission errors?

 

And for contact standard object, I checked read and create fields which are the only fields available for checking. But I still cannot access the Contact object through that look up field.

 

2. Secondly, if I dont login to salseforce, I cannot even see the basic form..I am getting unauthorized error.

 

How to fix these issues?...thanks!!

 

 

Best Answer chosen by Admin (Salesforce Developers) 
mallikammallikam
Thanks sham, but thats not the problem..it has something to do with my controller code, I got it resolved and I dont see any more errors on page submission.

All Answers

BulentBulent

Things to check on the site public access settings:

- CRUD on the object

- FLS of the object fields

- If custom object then make sure the object status is "Deployed"

 

also make sure your pages are associated with your site, and you site is active.

 

Visualforce uses lookup.jsp by default (unless if you write your own custom lookup visualforce page)

and lookup.jsp is a standard page that is not enabled for your site by default. You need to enable this page via the standard page related list on your site details page. However, if you do this then make sure your sharing rules are set securely since lookup.jsp allows users to perform search 

Message Edited by Bulent on 07-17-2009 12:41 PM
mallikammallikam

 

 

- I see the CRUD of the object but it wont let me edit it? :( (I am working on a production instance.)

 

- "Make sure ages are associated with site", what does that mean?

 

-  I enabled the look up JSP page and that solves my one part of my problem 1. thanks!!

 

 

BulentBulent

sorry for the typo: "Make sure the the visualforce pages are associated with your site"

 

you should be able to edit public access settings site details page>public access settings> edit button

 

you can only give read and create permissions on standard objects for your site 

Message Edited by Bulent on 07-17-2009 12:43 PM
mallikammallikam

Yes, all the related pages are associated with site. I thought CRUD means custom record type settings for some reason, and I was saying I am not allowed to edit the custom record type settings under public access settings. I know how to edit public access settings but what does CRUD refer to? thanks.

BulentBulent
CRUD = Create Read Update Delete
mallikammallikam
Ok, so I have this form where users are allowed to create a onboarding request. So do you know what the CRUD of the object should look like for this one? I have just given the CRU permissions but its not allowing me to submit the form thru sites, giving me those errors above..
BulentBulent
can you post your public page url?
mallikammallikam
can you email to this address? I will reply it to you. jp0627@gmail.com
ShamSham

A shot in the dark, but could be if there is some space in value field of inputField

eg.

 

<apex:inputField value="{!Account.Name }" /> 

This will raise an error because of the extra space.. in the value field. 

mallikammallikam
Thanks sham, but thats not the problem..it has something to do with my controller code, I got it resolved and I dont see any more errors on page submission.
This was selected as the best answer
fgwarbfgwarb

Argh!  I am dealing with this issue, the CRUD was a good suggestion, but I don't think that's it.  I'm trying to allow the site user to Update contacts as people find them, but you can't grant U on standard objects on a Sites profile.

 

So I made a public group and added a sharing rule to grant it read/write access to all contacts in the org, but that didn't resolve the issue (the update call is in an Apex class, which runs in system mode anyway right?  So this wouldn't have been the problem anyway.)

 

I was using an inputText field, and when i switched it to an inputField field the VF page switched it to an outputText field.

 

Anyone have any insight?  (I tried the insert code button but it didn't work "413: Request Entity Too Large" or i would have included code samples.)

 

BulentBulent
Site license doesn't allow update and delete permissions on standard objects. You need to use authenticated access (portals) to gain additional permissions.
fgwarbfgwarb
Thanks, I had jumped to that conclusion and stripped that out.  Thanks for confirming the fact!