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
KRISHNAMURTHY ANANTHARAMAKRISHNANKRISHNAMURTHY ANANTHARAMAKRISHNAN 

Salesforce sites shows that my site is down (all of a sudden)

My visualforce site was working fine without any issues but now I am getting an error when I try to open the site. Can you check the below code? Previously the site was working fine.

VF Code:
<apex:page controller="i2"  sidebar="false" lightningStylesheets="true"  > 
    
    
    <html xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" lang="en">
        <head>
            <meta charset="utf-8" />
            <meta http-equiv="x-ua-compatible" content="ie=edge" />
            <title>SLDS ResponsiveDesign Visualforce Page in Salesforce Mobile</title>
            <meta name="viewport" content="width=device-width, initial-scale=1" />
            <apex:slds />
        </head>
        <body>
            
            <div class="slds-scope">
                
                <style>
                    .mystyle {
                    
                    color: black;
                    font-size: 18px;
                    font-weight: bold;
                    }
                    body .bPageBlock .pbBody .red .pbSubheader{
                    background-color:#585858;
                    
                    }
                    body .bPageBlock .pbBody .grey .pbSubheader{
                    background-color:#585858;
                    
                    }
                    body .bPageBlock .pbBody .grey .pbSubheader h3{
                    color:#FFFFFF;
                    
                    }
                    
                    .grey
                    {
                    background-color:white;
                    }
                    
                  
                    
                </style>
                
                
                <apex:form id="theform" >
                    
                    <apex:pageBlock id="section1"  >
                        
                        <apex:outputPanel id="errmsg">
                            <apex:pageMessages />
                        </apex:outputPanel>
                        
                        
                        
                        
                        <div class = "mystyle">
                            Cleaning Activities
                        </div>
                        
                        
                        <apex:outputPanel styleClass="grey" layout="block">
                            <apex:pageBlockSection title="Login" collapsible="false"> 
                                <apex:inputField value="{!cle.Password__c}"/>
                            </apex:pageBlockSection>
                        </apex:outputPanel>
                        
                        
                        
                        
                        <div align = "center">
                            <apex:commandButton styleClass="slds-button slds-button--brand" value="Retrieve Cleaning Activities" action="{!retrieve}"  /> 
                        </div>
                        
                        
                        <apex:outputPanel id="CleaningSection" styleClass="grey" layout="block">
                            <apex:pageBlockSection columns="2" title="Cleaning Activity" id="section1" collapsible="false">
                                <apex:inputField value="{!cle.Operation__c}" required="false"/>
                                <apex:inputField value="{!cle.Cleaning_Company__c}"/>
                                <apex:inputField value="{!cle.PTW_Number__c}"/> 
                                <apex:inputField value="{!cle.Cleaning_Start_Date__c}"/>
                                <apex:inputField value="{!cle.Cleaning_End_Date__c}"/>
                                <apex:inputField value="{!cle.Full_Site_Cleaning__c}"/>
                                <apex:inputField value="{!cle.Specific_Size_Cleaned_kWp__c}"/> 
                                <apex:inputField value="{!cle.Status__c}"/>
                                <apex:inputField value="{!cle.URL_of_Photos_folder__c}"/>  
                            </apex:pageBlockSection> 
                        </apex:outputPanel>
                        
                        
                        <div align="center">
                            <apex:commandButton styleClass="slds-button slds-button--brand" value="Save Cleaning Activity" action="{!save1}"  >
                                <apex:param name="buttonId1" value="button1" assignTo="{!paramValue}"/>
                            </apex:commandButton>
                        </div>
                        
                        
                    </apex:pageBlock>
                    
                    <apex:pageBlock id="section2">
                        
                        <apex:outputPanel styleClass="grey" layout="block">
                            <apex:pageBlockSection columns="2" title="Permit to Work Number"  collapsible="false">
                                <apex:inputField value="{!ptw.PTW_Number1__c}" required="false" />
                                <apex:inputField value="{!ptw.Number_of_Workers__c}"/>
                                <apex:inputField value="{!ptw.Date__c}"/>
                                <apex:inputField value="{!ptw.Cleaning_Activity__c}" />
                            </apex:pageBlockSection> 
                        </apex:outputPanel>
                        
                        <div align="center">
                            <apex:commandButton styleClass="slds-button slds-button--brand" value="Save Permit to Work Number" action="{!save1}" reRender="errmsg">
                                
                                <apex:param name="buttonId2" value="button2" assignTo="{!paramValue}"/>
                            </apex:commandButton>
                            
                            <apex:commandButton styleClass="slds-button slds-button--brand" value="Reset PTW" action="{!refresh}" />
                            
                        </div>
                        
                    </apex:pageBlock>
                    
                    
                    <apex:pageBlock > 
                        <apex:pageBlockSection >
                            
                            <apex:pageBlockTable value="{!clelist}" var="a" id="tableBlock" style="width:130%" >
                                <apex:column headerValue="Ticket Number">
                                    <apex:outputLink value="https://c.ap2.visual.force.com/apex/Record_detail_Vf_Page?id = {a.Cleaning_Activity__c}">{!a.Name}</apex:outputLink>
                                </apex:column>
                                <apex:column headerValue="Contractor" value="{!a.Password__c}"/>
                                <apex:column headerValue="Number of Workers" value="{!a.Number_of_Workers__c}"/>
                                <apex:column headerValue="Start Date" value="{!a.Cleaning_Start_Date__c}"/>
                                <apex:column headerValue="End Date" value="{!a.Cleaning_End_Date__c}"/>
                                <apex:column headerValue="PTW Number" value="{!a.Permit_to_Work_Number__c}"/>
                            </apex:pageBlockTable> 
                            
                        </apex:pageBlockSection>
                    </apex:pageBlock> 
                    
                    
                    
                </apex:form>   
                
            </div>
        </body>
    </html>
   
</apex:page>
Controller:
public class i2{
    public Cleaning_Activity__c cle{get;set;}
    public Permit_to_Work_Number__c ptw{get;set;}
    public List<Cleaning_Activity__c> clelist{get;set;}
    public String paramValue{get;set;}
    
    
    //constructor to create a new record
    public i2(){
        cle = new Cleaning_Activity__c();
        ptw = new Permit_to_Work_Number__c();  
        
    }

    public void refresh(){
        ptw = new Permit_to_Work_Number__c(); 
    }
    
    //Assigning password to Cleaning Company
    /* public void assignPassword(){
          system.debug(cle.Password__c);
         if(cle.Password__c != null){
       cle.Cleaning_Company__c = cle.Password__c;
         }}*/
    
    public void retrieve()
    {
        if(cle.Password__c == 'pv' || cle.Password__c == 'sunsure')
        {
            clelist = [SELECT Name, Password__c, Cleaning_Company__c, Number_of_Workers__c, Cleaning_Start_Date__c, 
					Cleaning_End_Date__c, Permit_to_Work_Number__c,PTW_Number__c FROM Cleaning_Activity__c where Password__c =: cle.Password__c];
            system.debug(clelist);   
        }
        else if(cle.Password__c == NULL)
            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.FATAL,'Please key in the password to retreive the details'));
        else
            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.FATAL,'Password is incorrect'));
    }
    
    
    
    public void save1(){  
        system.debug('paramValue ' + paramValue);
        if(paramValue == 'button2')
        {
            system.debug('Password is ' + cle.Password__c);
            if(cle.Password__c == 'pv' || cle.Password__c == 'sunsure') 
            {
                System.debug('I am here');
                upsert ptw;
                ApexPages.addmessage(new ApexPages.message(ApexPages.severity.CONFIRM,'PTW Inserted Successfully'));
                ptw = new Permit_to_Work_Number__c();
            }
            else
            {
                ApexPages.addmessage(new ApexPages.message(ApexPages.severity.FATAL,'Wrong Password'));
            }
        }
        else
        {
            
            if(cle.Password__c == 'pv' || cle.Password__c == 'sunsure')
            { 
                if(cle.Operation__c != NULL)
                {
                    upsert cle;
                    clelist = [SELECT Name, Password__c, Cleaning_Start_Date__c,
                                Cleaning_End_Date__c,Number_of_Workers__c,
                               Permit_to_Work_Number__c FROM Cleaning_Activity__c where Password__c =: cle.Password__c];
                    ApexPages.addmessage(new ApexPages.message(ApexPages.severity.CONFIRM,'Cleaning Activity Inserted Successfully'));
                    system.debug(clelist);
                    cle = new Cleaning_Activity__c();
                }
                else
                {
                    ApexPages.addmessage(new ApexPages.message(ApexPages.severity.FATAL,'Please input the Operation Name'));  
                }
            }
            else
            {
                ApexPages.addmessage(new ApexPages.message(ApexPages.severity.FATAL,'Wrong Password'));
            }
        }
        
        
        
    }
    
    
    
}

 
SwethaSwetha (Salesforce Developers) 
HI Krishnamurthy,

There has been performance degradation on NA88 instance today. Link:  https://status.salesforce.com/incidents/5565. 

Edit:
Also, I see this same posted here https://salesforce.stackexchange.com/questions/306762/error-with-salesforce-site-after-making-changes-to-the-vf-code

The GACK ID -584988835 mentioned here points to "java.lang.NullPointerException: null"

You will need to fix the null pointer exception
 
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful.Thanks
KRISHNAMURTHY ANANTHARAMAKRISHNANKRISHNAMURTHY ANANTHARAMAKRISHNAN
Hi Swetha,

What is a null pointer exception and how do I fix that?
SwethaSwetha (Salesforce Developers) 
HI Krishna, Can you make sure that the Force.com Site's Site Guest user for the site is active. Incase it is inactive, the under maintenance page will be displayed.

Also, can you ensure you are using appropriate URL while opening the VF page in site. https://salesforce.stackexchange.com/questions/98392/how-to-resolve-is-down-for-maintenance-with-force-com-sites
Thanks