0

First I have done record inline editing. click on cancel. again click on pagination. Getting below error message.

Error: Error occurred while loading a Visualforce page.

Take from Community List pageSuper class and copy into PK test controller .now make change rqrd.

main problem , not resetting and not saving value even on cancel if doing inline editing. Need to be reset and on pagination functionality next –previous , it should not be throw visual force error code message.

(May be issue with wrapper class or reset functionality

Using wrapper class like interface(Inheritance) controller. Taking data from 3-4 source & combining them and after that passing)

public abstract without sharing class CommunityListPageSuperClass
{
    public interface IListController
    {
        Boolean getHasNext() ;
        Boolean getHasPrevious();
        Integer getPageNumber();
        Integer getPageSize();
        Integer getResultSize();
        List<SObject> getRecords();
        void first();
        void last();
        void next();
        void previous();
        void setpageNumber(Integer pageNumber); 
        void setPageSize(Integer pageSize); 
        void reset();
        PageReference save();
    }

    public class ListController implements IListController
    {
        public ApexPages.StandardSetController mSSC{get; private set;}
        public ListController(ApexPages.StandardSetController ssc){ mSSC=ssc; }
        public ListController(Database.Querylocator dblocator){ mSSC=new ApexPages.Standardsetcontroller(dblocator); }
        public Boolean getHasNext(){return mSSC.getHasNext();}
        public Boolean getHasPrevious(){return mSSC.getHasPrevious();}
        public Integer getPageNumber(){return mSSC.getPageNumber();}
        public Integer getPageSize(){return mSSC.getPageSize();}
        public Integer getResultSize(){return mSSC.getResultSize();}
        public List<SObject> getRecords(){return mSSC.getRecords();}
        public void first(){mSSC.first();}
        public void last(){mSSC.last();}
        public void next(){mSSC.next();}
        public void previous(){mSSC.previous();}
        public void setpageNumber(Integer pageNumber){mSSC.setpageNumber(pageNumber);} 
        public void setPageSize(Integer pageSize){mSSC.setPageSize(pageSize);}
        public void reset(){mSSC.reset();}
        public PageReference save(){return mSSC.save();}
        public PageReference cancel(){return mSSC.cancel();}
    }

    // Localised Strings omitted due to length

    public IListController tileSSC{get;set;}
    public IListController tableSSC{get;set;}
    public IListController currentSSC{get;set;}
    public String pageLabel{get;set;}
    public String cookiePrefix{get;set;}
    public PageReference SetModified() { return null;}
    public Boolean modified {get; set;}
    public Boolean isTileView{get;set;}
    public Boolean updateSortOrder{get{if(updateSortOrder==null){updateSortOrder=true;}return updateSortOrder;}set;}
    public Boolean calledFromSortTable{get{if(calledFromSortTable==null){calledFromSortTable=false;}return calledFromSortTable;}set;}
    public CommunityUtilityClass.NavHistoryManager listNavManager{get;set;}
    public Boolean isTileTableConsistent{get{if(isTileTableConsistent==null){isTileTableConsistent=false;}return isTileTableConsistent;}set;}

    public CommunityListPageSuperClass(String pageLabel,String prefixCookie,Boolean tileTableConsistent){
        LocalizationManager.LoadResource('CommunityCommonStrings',System.Label.CommunityCommonStrings);
        LocalizationManager.loadResource('CommunitySortStrings',System.Label.CommunitySortStrings);
        LocalizationManager.LoadResource('CommunitySupportLandingStrings',System.Label.CommunitySupportLandingStrings);   
        cookiePrefix=prefixCookie;
        listNavManager=new CommunityUtilityClass.NavHistoryManager(pageLabel);
        isTileTableConsistent=tileTableConsistent;
        updateSortOrder=false;
        setData();
        updateSortOrder=true;
        tileSortValue=columnSortValue;
        tableSSC=getTableRecords(ListFilterId);
        tileSSC=getSortRecords(ListSortId,'');
        setCachePageSize();
        if(isTileView && !isTileTableConsistent){
            currentSSC=tileSSC;
        }
        else{
            currentSSC=tableSSC;
        }
    }

    // To Support Snapshot Constructor in ChildClass
    public CommunityListPageSuperClass(CommunityDashboardController controller){}

    public String ListSortId{get;
        set{
            ListSortId=value;
            CommunityUtilityClass.setCookie(cookiePrefix+'-current-sortid',ListSortId,90);
        }
    }

    public String ListFilterId{get;
        set{
            ListFilterId=value;
            CommunityUtilityClass.setCookie(cookiePrefix+'-current-filterid',ListFilterId,90);
        }
    }

    public String tileSortValue{get;set;}

    public String columnSortValue{get;
        set{
            if(columnSortValue!=null && columnSortValue.equalsIgnoreCase(value)){
                toggleColumnSortOrder();
            }
            else{
                columnSortValue=value;
                if(updateSortOrder){
                    columnSortOrder='asc';
                }
                CommunityUtilityClass.setCookie(cookiePrefix+'-current-sortvalue',columnSortValue,90);  
            }
        }
    }

    public String columnSortOrder{get;
        set{
            columnSortOrder=value;
            CommunityUtilityClass.setCookie(cookiePrefix+'-current-sortorder',columnSortOrder,90);
        }
    }

    private void toggleColumnSortOrder(){
        if(columnSortOrder.equalsIgnoreCase('desc')){
            columnSortOrder='asc';
        }
        else{
            columnSortOrder='desc';
        }
    }

    private void setCachePageSize(){
        Cookie temp = CommunityUtilityClass.getCookie(cookiePrefix+'-tile-pagesize');
        try{
                if(temp!=null && temp.getValue()!=null && temp.getValue()!=''){
                    tileSSC.setPageSize(Integer.valueof(temp.getValue()));
                }
                else{
                    tileSSC.setPageSize(15);
                }
            }
        catch(Exception e){}

        temp = CommunityUtilityClass.getCookie(cookiePrefix+'-table-pagesize');
        try{
                if(temp!=null && temp.getValue()!=null && temp.getValue()!=''){
                    tableSSC.setPageSize(Integer.valueof(temp.getValue()));
                }
                else{
                    tableSSC.setPageSize(15);
                }
        }
        catch(Exception e){}
    }

    public Integer getCurrentListPageSize(){

            return currentSSC.getPageSize();

    }

    public PageReference Save(){
        try{
            Integer currentPageNumber= tableSSC.getPageNumber();
            Integer currentPageSize =tableSSC.getPageSize();
            PageReference refer = tableSSC.Save();
            if(refer!=null && refer.getUrl().indexOf(ApexPages.currentPage().getUrl())==-1){
                modified=false;
                reset(tableSSC,currentPageNumber,currentPageSize);
            }
            else{
                reset(tableSSC,currentPageNumber,currentPageSize);
            }
            currentSSC=tableSSC;
            currentPageSize=tileSSC.getPageSize();
            currentPageNumber=tileSSC.getPageNumber();
            try{
                tileSSC=getSortRecords(ListSortId,'');
            }
            catch(Exception e){
                // Exception while Updating tile View, Since RecentlyViewed couldn't be access after Saving Data.
                system.debug(e);
            }
            reset(tileSSC,currentPageNumber,currentPageSize);
        }
        catch(Exception e){
            ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.Error,e.getMessage()));
        }
        return null;
    }

    public PageReference refresh(){
        modified=false;
        reset(currentSSC,-1,-1);
        return null;
    }

    private void reset(IListController tempSSC,Integer currentPageNumber,Integer currentPageSize){
        if(currentPageNumber==-1){
            currentPageNumber = tempSSC.getPageNumber();
        }
        if(currentPageSize==-1){
            currentPageSize = tempSSC.getPageSize();
        }
        tempSSC.reset();
        tempSSC.setPageNumber(currentPageNumber);
        tempSSC.setPageSize(currentPageSize);
    }

    public PageReference changeView(){
        try{
            if(isTileView){
                currentSSC=tableSSC;
                isTileView=false;
            }
            else{
                /*Updating currentSSC to tileSSC only if Consistency not set among Tile and Table View*/
                if(!isTileTableConsistent)
                {   
                    currentSSC=tileSSC;
                }
                tileSortValue=columnSortValue;  
                isTileView=true;
            }
            CommunityUtilityClass.setCookie(cookiePrefix+'-current-view',String.valueOf(isTileView),90);
        }catch(Exception e){
            ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.Error,e.getMessage()));
        }
        return null;
    }

    public PageReference changePageSize(){
        try{
            modified=false;
            Integer pageSize = Integer.valueOf(ApexPages.currentPage().getParameters().get('pageSize'));
            if(isTileView && !isTileTableConsistent){
                tileSSC.setPageSize(pageSize);
                currentSSC=tileSSC;
                CommunityUtilityClass.setCookie(cookiePrefix+'-tile-pagesize',String.valueOf(pageSize),90);
            }
            else{
                tableSSC.setPageSize(pageSize);
                currentSSC=tableSSC;
                CommunityUtilityClass.setCookie(cookiePrefix+'-table-pagesize',String.valueOf(pageSize),90);
            }
        }catch(Exception e){
            //DO Nothing
        }        
        return null;
    }

    public PageReference updateRecords(){
        try{
            Integer currentPageSize=currentSSC.getPageSize();
            if(isTileView && !isTileTableConsistent){
                tileSSC=getSortRecords(ListSortId,'');
                tileSSC.setPageSize(currentPageSize);
                currentSSC=tileSSC;
            }else{
                tableSSC=getTableRecords(ListFilterId);
                tableSSC.setPageSize(currentPageSize);
                currentSSC=tableSSC;
            }
        }catch(Exception e){
            ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.Error,e.getMessage()));
        }
        return null;
    }

    public PageReference sortTable(){
        try{
            if(isTileView && isTileTableConsistent){
                if(tileSortValue!=columnSortValue){
                    columnSortValue=tileSortValue;
                }
            }
            calledFromSortTable=true;
            updateRecords();
            calledFromSortTable=false;
        }catch(Exception e){
            ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.Error,e.getMessage()));
        }
        return null;
    }

    public PageReference tileSortToggle(){
        toggleColumnSortOrder();
        calledFromSortTable=true;
        updateRecords();
        calledFromSortTable=false;
        return null;
    }

    public Integer size{ get{return currentSSC.getPageSize();} }
    public Integer noOfRecords{ get{return currentSSC.getResultSize();} }
    public Integer pageNumber{ get{return currentSSC.getPageNumber();} }
    public Boolean hasNext{ get{return currentSSC.getHasNext();} }
    public Boolean hasPrevious{ get{return currentSSC.getHasPrevious();}}
    public void first(){ modified=false; currentSSC.first();}
    public void last(){ modified=false; currentSSC.last();}
    public void previous(){ modified=false; currentSSC.previous();}  
    public void next(){ modified=false; currentSSC.next();}

    public abstract IListController getTableRecords(String ListFilterId);

    public abstract IListController getSortRecords(String ListSortId, String limitRecords);

    public abstract void setData();
}

Community case controller

public with sharing class CommunityCaseControllerPK extends CommunityListPageSuperClass{

   public List<Case> tileViewCaseList{get{return tileSSC.getRecords();}set;}
    public List<Case> tableViewCaseList{get{return tableSSC.getRecords();}set;}

    // Localised Strings omitted due to length

    public static String CasesLbl{get;set;}
    static{
        LocalizationManager.loadResource('CommunityCasePageStrings',System.Label.CommunityCasePageStrings);
        TarunTestController.CasesLbl=LocalizationManager.getLocalizedString('CommunityCasePageStrings','CasesLbl');
    }

    public CommunityCaseControllerPrahlad(){
        super(CommunityCaseControllerPrahlad.CasesLbl,'case',true);
    }

    public override void setData(){
        Cookie temp = CommunityUtilityClass.getCookie(cookiePrefix+'-current-view');
        if(temp!=null && temp.getValue()!=null && temp.getValue()!=''){
                isTileView=Boolean.valueOf(temp.getValue());
        }else{
                isTileView=true;
        }
        temp=CommunityUtilityClass.getCookie(cookiePrefix+'-current-sortvalue');
        if(temp!=null && temp.getValue()!=null && temp.getValue()!=''){
                columnSortValue=String.valueOf(temp.getValue());
        }
        else{
                columnSortValue='CaseNumber';
        }
        temp=CommunityUtilityClass.getCookie(cookiePrefix+'-current-sortorder');
        if(temp!=null && temp.getValue()!=null && temp.getValue()!=''){
                columnSortOrder=String.valueOf(temp.getValue());
        }
        else{
                columnSortOrder='desc';
        }
        temp=CommunityUtilityClass.getCookie(cookiePrefix+'-current-sortid');
        if(temp!=null && temp.getValue()!=null && temp.getValue()!=''){
                ListSortId=String.valueOf(temp.getValue());
        }
        else{
                ListSortId='RecentlyViewed';
        }
        temp=CommunityUtilityClass.getCookie(cookiePrefix+'-current-filterid');
        if(temp!=null && temp.getValue()!=null && temp.getValue()!=''){
                ListFilterId=String.valueOf(temp.getValue());
        }
        else{
                ListFilterId='filter:open';
        }
    }

    public List<System.SelectOption> FilterOptions{
        get{
            if(FilterOptions==null){
                FilterOptions=new List<System.SelectOption>();
                                FilterOptions.add(new SelectOption('All',LocalizationManager.getLocalizedString('CommunityCasePageStrings','AllCases')));
                FilterOptions.add(new SelectOption('RecentlyViewed',LocalizationManager.getLocalizedString('CommunitySortStrings','RecentViewedSort')));
                FilterOptions.add(new SelectOption('filter:open',LocalizationManager.getLocalizedString('CommunityCasePageStrings','MyOpenCases')));
                FilterOptions.add(new SelectOption('filter:close',LocalizationManager.getLocalizedString('CommunityCasePageStrings','MyClosedCases')));
                }
            return FilterOptions;
        }
        set;
    }

    public List<System.SelectOption> tileSortOptions{
        get{
            if(tileSortOptions==null){
                Map<String,Schema.SObjectField> keyMap = Schema.getGlobalDescribe().get('Case').getDescribe().fields.getMap();
                                tileSortOptions=new List<System.SelectOption>();
                                tileSortOptions.add(new SelectOption('NULL','--None--'));
                tileSortOptions.add(new SelectOption('CaseNumber',keyMap.get('CaseNumber').getDescribe().getLabel()));
                tileSortOptions.add(new SelectOption('Status',keyMap.get('Status').getDescribe().getLabel()));
                tileSortOptions.add(new SelectOption('Subject',keyMap.get('Subject').getDescribe().getLabel()));
                tileSortOptions.add(new SelectOption('Product__C',keyMap.get('Product__C').getDescribe().getLabel()));
                tileSortOptions.add(new SelectOption('Firmware_Version__c',keyMap.get('Firmware_Version__c').getDescribe().getLabel()));
                tileSortOptions.add(new SelectOption('CreatedDate',DateOpenedLbl));
                tileSortOptions.add(new SelectOption('LastModifiedDate',DateModifiedLbl));
            }
            return tileSortOptions;
        }
        set;
    }

        public override IListController getTableRecords(String filterId){

                String contactId=CommunityUtilityClass.getContactIdForCurrentUser();
                String userId=UserInfo.getUserId();
                String query='select id,casenumber,status,subject,product__c,firmware_version__c,createddate,lastmodifieddate,origin,Contact.Name from case where contactId=:contactId';
                String searchQuery='';
                if(filterId.equalsIgnoreCase('All')){
                        // Do Nothing, Use ColumnSort Value and Order.
                }
                if(filterId.equalsIgnoreCase('RecentlyViewed')){
                        List<RecentlyViewed> recentCases = [select id from RecentlyViewed where type='Case'];
                        List<Id> recentCaseIds;
                        recentcaseIds= new List<String>();
                        if(recentCases!=null && recentCases.size()>0){
                                for(RecentlyViewed recentCase : recentCases){
                                        recentCaseIds.add(recentCase.id);
                                }
                        }
                        searchQuery=' and Id In: recentCaseIds';
                }
                else if(filterId.indexOf('filter')!=-1){
                        if(filterId.indexOf('open')!=-1){
                                searchQuery=' and status!=\'Closed\'';  
                        }
                        else if(filterId.indexOf('close')!=-1){
                                searchQuery=' and status=\'Closed\'';   
                        }
                }
                if(columnSortValue==null || columnSortValue=='NULL'){
                        columnSortValue='CaseNumber';
                        columnSortOrder='desc';
                }
                String sortQuery='';
                if((!filterId.equalsIgnoreCase('RecentlyViewed') || (filterId.equalsIgnoreCase('RecentlyViewed') && calledFromSortTable))){
                        sortQuery=' order by '+columnSortValue +' '+columnSortOrder+',casenumber desc';
                }
                else if(filterId.equalsIgnoreCase('RecentlyViewed')){
                        sortQuery=' order by lastvieweddate desc';
                        columnSortValue=null;
                }
                tileSortValue=columnSortValue;
                return new CommunityListPageSuperClass.ListController(Database.getQueryLocator(query+searchQuery+sortQuery));
        }

        public PageReference saveRecords(){
            if(validateRecords(tableSSC.getRecords())){
                return super.save();
            }
            else{
                ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.Error,'Please Enter Subject'));
                return null;
            }
        }

        private boolean validateRecords(List<Case> updatedRecords){

            for(Case tempCase : updatedRecords){
                if(tempCase.Subject==null || tempCase.Subject==''){
                    return false;
                }
            }
            return true;
        }

        public override IListController getSortRecords(String sortId,String limitRecords){
                String contactId=CommunityUtilityClass.getContactIdForCurrentUser();
                String userId=UserInfo.getUserId();
                String query='select id,casenumber,status,subject,product__c,firmware_version__c,createddate,lastmodifieddate,origin,Contact.Name from case where contactId=:contactId';
                String searchQuery='';
                if(sortId.equalsIgnoreCase('All')){
                        searchQuery=' order by casenumber desc';
                }
                else if(sortId.equalsIgnoreCase('RecentlyViewed')){
                        List<RecentlyViewed> recentCases = [select id from RecentlyViewed where type='Case'];
                        List<Id> recentCaseIds;
                        recentcaseIds= new List<Id>();
                        if(recentCases!=null && recentCases.size()>0){
                                for(RecentlyViewed recentCase : recentCases){
                                        recentCaseIds.add(recentCase.id);
                }
                        }
                        searchQuery=' and Id In: recentCaseIds order by lastvieweddate desc';
                }
                else if(sortId.indexOf('filter')!=-1){
                        if(sortId.indexOf('open')!=-1){
                                searchQuery=' and status!=\'Closed\' order by status,casenumber desc';   
                        }
                        else if(sortId.indexOf('close')!=-1){
                                searchQuery=' and status=\'Closed\' order by status,casenumber desc';    
                        }
                }
                else{
                        searchQuery=' order by '+sortId;
                }
                system.debug(query+searchQuery+limitRecords);
                return new CommunityListPageSuperClass.ListController(Database.getQueryLocator(query+searchQuery+limitRecords));
        }

    public String newCaseUrl{
        get{
            return CommunityUtilityClass.getCommunityUrl('/apex/CommunityAddCases');      
        }set;   
    }
    public String caseDetailUrl{
        get{
            return CommunityUtilityClass.getCommunityUrl('/apex/CommunityCaseDetail');
        }set;
    }

     public PageReference Save(){
        try{
            Integer currentPageNumber= tableSSC.getPageNumber();
            Integer currentPageSize =tableSSC.getPageSize();
            PageReference refer = tableSSC.Save();
            if(refer!=null && refer.getUrl().indexOf(ApexPages.currentPage().getUrl())==-1){
                modified=false;
                reset(tableSSC,currentPageNumber,currentPageSize);
            }
            else{
                reset(tableSSC,currentPageNumber,currentPageSize);
            }
            currentSSC=tableSSC;
            currentPageSize=tileSSC.getPageSize();
            currentPageNumber=tileSSC.getPageNumber();
            try{
                tileSSC=getSortRecords(ListSortId,'');
            }
            catch(Exception e){
                // Exception while Updating tile View, Since RecentlyViewed couldn't be access after Saving Data.
                system.debug(e);
            }
            reset(tileSSC,currentPageNumber,currentPageSize);
        }
        catch(Exception e){
            ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.Error,e.getMessage()));
        }
        return null;
    }

    public PageReference refresh(){
        modified=false;
        reset(currentSSC,-1,-1);
        return null;
    }

    //Localized Text

Community Landing Page

        public TarunTestController(CommunityDashboardController controller){
                super(controller);
        LocalizationManager.loadResource('CommunityAddCasesStrings',Label.CommunityAddCasesStrings);
        }

    @RemoteAction
    public static List<String> getSupportCaseSnapshot(String[] param){
        String contactId=CommunityUtilityClass.getContactIdForCurrentUser();
        List<Id> recentCaseIds;
        if(param[0].equals('RecentlyViewed')){
                List<RecentlyViewed> recentlyViewed=[Select Id From RecentlyViewed Where Type='Case' Limit 5];
                        recentCaseIds=new List<Id>();
                        if(recentlyViewed!=null && recentlyViewed.size() > 0){
                                for(RecentlyViewed caseId : recentlyViewed){
                                        recentCaseIds.add(caseId.Id);
                                }
                        }
        }
        List<Case> casesList= new TarunTestController(null).getSortRecords(param[0],' limit 5').getRecords();
        List<String> tableData= new List<String>();
        if(param.size()>2){
                String jsonText='{"tableid":"'+param[1]+'","functionToCall":"'+param[2]+'"}';
                tableData.add(jsonText);
        }
        TarunTestController.prepareHtmlTable(casesList,tableData);        
        return tableData;
    }

    private static void prepareHtmlTable(List<Case> casesList,List<String> tableData){
                for(Case tempCase : casesList){
                        String tableHtml='';
                        tableHtml+='<td><a href='+CommunityUtilityClass.getCommunityUrl('/apex/CommunityCaseDetail?id=')+tempCase.id+' style="color:#FFFFFF;">'+tempCase.CaseNumber+'</a></td>';
                        tableHtml+='<td><div class="truncate-line">'+CommunityDataTruncationUtility.getTruncatedValue(tempCase.Subject,'SnapshotLong')+'</div></td>';
                        if(tempCase.Status.equalsIgnoreCase('Unassigned')){
                                tableHtml+='<td>'+TarunTestController.LightGreyLbl+'</td>';
                        }
                        else{
                                tableHtml+='<td>'+tempCase.Status+'</td>';
                        }
                        tableHtml+='<td>'+CommunityDataTruncationUtility.getTruncatedValue(tempCase.Product__c,'SnapshotShort')+'</td>';
                        tableHtml+='<td>'+tempCase.Firmware_Version__c+'</td>';
                        tableHtml+='<td>'+CommunityDateFormatter.getFormatedDate(tempCase.CreatedDate,null,null)+'</td>';
                        tableData.add(tableHtml);
                }
    }

    public String supportCaseListPageUrl{
        get{
                return CommunityUtilityClass.getCommunityUrl('/apex/CommunityCasePage');
        }set;
    }

    public String contactNameLabel{get{return LocalizationManager.getLocalizedString('CommunityAddCasesStrings','ContactName');}set;}

}
  • 1
    Please add some more details about your issue. It's always helpful if you can post the related code snippets. – highfive Jul 23 '14 at 11:58
  • 1
    To get more detail reported, edit the User you are testing with and set "Development Mode". This should give you a more informative stack trace that you can post together with your code. – Keith C Jul 23 '14 at 12:03
  • please check now. If any more info required plz tell me – user10584 Jul 24 '14 at 6:23
0

As working on Force.com site normally we see the error like below image, enter image description here which is difficult to understand and not user friendly, however we can define a custom error page to catch the exceptions , so that when ever an error occurrs it will get redirect to our custom visualforce error page and will displays the actual error message.

Create a custom VF page and Controller and write a PageLevel Action. There are two methods available in Force.com sites i.$Site.ErrorMessage ii. $Site.ErrorDescription In Controller write a method to catch exception using above method. There standard error pages already available in Community setttings, replace these VF pages in Community settings with custom VF page for error message. For more details please refer https://help.salesforce.com/articleView?id=sites_error_pages.htm&type=0 for replacing standard error pages. That's it, now whenever an exception occurred you will get the details on your custom error page.

VF Page:

<apex:page action="{!yourPageLevelAction}" controller="YourController" >
<apex:outputText styleClass="title" value="{!failingPageResponse}">                </apex:outputText>
</apex:page>

Controller:

public  class YourController {
//Variable Declaration
public String failingPageResponse { get; set; }

public PageReference yourPageLevelAction()
{
    failingPageResponse = Site.getErrorDescription();
}//yourPageLevelAction
}//YourController

Using this you will get idea about what is going wrong and probably that will help you to mitigate your issue.

Also you can refer the answer to following question
Error occurred while loading a Visualforce page at Site.com
Thanks,
Nachiket

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.