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
charlie_vcharlie_v 

Getting the "Under Construction" message

Both of these pages work fine in the SF environment, but they won't work in Sites.  The first works fine in Sites, but the 2nd returns the "under construction" message.

 

I've checked and double-checked the public access settings.  Am I overlooking the obvious here somewhere?

 

Here's the first page.  This works fine in Sites.

 

 

<apex:page standardController="Sites__c" showHeader="true" sidebar="false" tabStyle="Sites__tab" recordSetVar="Sites__c"> <apex:pageBlock title="Database of Sites"> <table> <tr> <td style="width: 100%"> <apex:form id="sitesForm"> <apex:panelGrid columns="2"> <apex:outputLabel value="View: "> <apex:selectList value="{!filterId}" size="1"> <apex:actionSupport event="onchange" rerender="sitesListing"/> <apex:selectOptions value="{!listviewoptions}"> </apex:selectOptions> </apex:selectList> </apex:outputLabel> </apex:panelGrid> <apex:pageBlockSection title="Listing" collapsible="false"> <apex:pageBlockTable id="sitesListing" value="{!Sites__c}" columns="1" var="sites"> <apex:column > <apex:outputLink value="Public_Sites_Detail?id={!sites.id}" id="theLink">{!sites.name}</apex:outputLink> </apex:column> </apex:pageBlockTable> </apex:pageBlockSection> <apex:panelGrid columns="2"> <apex:commandLink action="{!previous}">Previous</apex:commandLink> <apex:commandLink action="{!next}">Next</apex:commandLink> </apex:panelGrid> </apex:form> </td> <td> </td> </tr> </table> </apex:pageBlock> </apex:page>

 

 

 

 

 Here's the 2nd page.  Clicking a link in the first page (Public_Sites) should pull up the record in this 2nd page (Public_Sites_Detail) ... but instead you get the "under construction message":

 

 

<apex:page standardController="Sites__c" showHeader="true" sidebar="false" tabStyle="Sites__tab"> <apex:sectionHeader title="{!Sites__c.name}" /> <apex:pageBlock > <apex:pageBlockSection columns="2" showheader="false"> <apex:outputField value="{!Sites__c.Name}"/> <apex:outputField value="{!Sites__c.Rating__c}"/> </apex:pageBlockSection> <apex:pageBlockSection columns="1" showHeader="false"> <apex:outputField value="{!Sites__c.Description__c}"/> </apex:pageBlockSection> </apex:pageBlock> </apex:page>

 

 

 

Best Answer chosen by Admin (Salesforce Developers) 
charlie_vcharlie_v

Found the problem.  Posting it in case it helps anyone else.

 

It was a URL problem...I had to add the {!$Site.Prefix} variable to the first page, like so:

 

<apex:outputLink value="{!$Site.Prefix}/Public_Sites_Detail?id={!sites.id}" id="theLink">{!sites.name}</apex:outputLink>