+ Start a Discussion
GoForceGoGoForceGo 

Configuring Sites "Down for Maintenance" error

 

I have a Sites VF page. Whenever there is a bug in the code leading to a crash, the end user gets "Down for Maintenance" message which is  confusing to say the least.

 

I thought I could change this message by modifying the settings as described at . http://login.salesforce.com/help/doc/en/sites_error_pages.htm

 

I set the "Maintenance Page(500/503)" and "Generic Error Page" to a custom page I created , but I still see the "Down For Mainenance".

 

 

Any ideas?

 

Best Answer chosen by Admin (Salesforce Developers) 
GoForceGoGoForceGo

Okay I solved it.

 

Here is the issue: All crashes lead to "Authorization Required Page (401) - presumably you need to be logged in to see an exception (e.g ASSERT failed).  So one needs to modify that page if we want to give a simple message such "Sorry for crash, please report".

 

My Authorization Required Page was set to the standard "Unauthorized". So why would I end up on "In Maintenance" page? I still can't quite figure it out, but when I previewed the Unauthorized page, it complained that Apex class SiteLoginController class does not exist. The Apex class DOES exist, but when I go to modify it's security settings, it complains I do not have access - I am Admin.  Might have something to do with the fact I do NOT have login enabled for the site (there is no instance of customer portal). Just to add to mystery, the "Unauthorized" page has following component. Given that I do not have login enabled, I don't know why it tries to instantiate it (and hence run into SiteLoginController which controlls this component)

 

                <c:SiteLogin rendered="{!$Site.LoginEnabled && ISPICKVAL($User.UserType,'Guest')}" id="siteLogin"/>