I have two pages and one controller all enabled for Site Guest Profile. On page A I have an apex:form with a commandButton; clicking on the button redirects to page B. All is working well for an authenticated user but for the Site Guest User the commandButton is not firing. Actually something is happening, and the page is getting refreshed but its not redirected to page B, and I don't see that the method is called when I check the debug log.
When I try to display page B by typing in its URL in the public site, everything is working fine.
Can someone save me, and suggest why the redirect is not happening for the Site Guest Profile?
Button Code:
<apex:commandButton value="{!$Label.SUBMIT}" action="{!doSubmit}" style="width:150px; margin-right: 45px; float:right" styleClass="btn-success" id="doSubmit"/>
Controller method:
public PageReference doSubmit(){
try{
theCase.SuppliedName=theAcc.FirstName + ' ' + theAcc.LastName;
insert theCase;
theCase = [SELECT ID, CaseNumber, Type, SuppliedName, SuppliedPhone, SuppliedEmail, Subject, Description
FROM Case
WHERE ID =: theCase.ID limit 1];
PageReference pageRef = Page.WebFeedbackConfirm;
pageRef.getParameters().put('cnum',theCase.CaseNumber);
pageRef.getParameters().put('fn',theAcc.FirstName);
pageRef.setRedirect(true);
return pageRef;
}
catch(Exception e){
errorMsg = Label.Faild_to_submit_Feedback;
}
return null;
}