|Available in: Developer, Enterprise, Performance, and Unlimited Editions|
|To create and edit Force.com sites:||“Customize Application”|If you see errors on site pages and can't figure out the cause, use administrator preview mode to look at them in context and in greater detail.
To access administrator preview mode:
- From Setup, enter Sites in the Quick Find box, then select Sites.
- Click the name of the site you want to preview.
- In the Site Detail section, click the Preview as Admin link. A new browser window opens with a preview of your site, and the enhanced error message appears at the bottom of the page.
- Click Logout of Administrator Preview Mode to clear the administrator cookie and be redirected to the site's home page.
The detailed error messages in administrator preview mode are driven by the <site:previewAsAdmin />
component in your Visualforce error pages. Starting with Summer '10, new organizations include the <site:previewAsAdmin />
component by default in standard error pages
. You must add the component manually to all custom error pages and pages from older organizations. We recommend that you add it right before the closing </apex:page>
tag, like this:
The <site:previewAsAdmin />
component contains the <apex:messages />
tag, so if you have that tag elsewhere on your error pages, you will see the detailed error message twice.