8

I know that the development mode footer has an option to show the view state which I've used before when developing internal Salesforce pages; however, I don't see how that can be used on a force.com site page.

How do I get information about the view state when working with a Force.com site page? Ideally, the solution would work for force.com site authenticated (via customer portal auth) pages as well.

Thanks.

Peter Knolle
  • 29,077
  • 12
  • 99
  • 162
  • Is there a reason why you can't just access it using /apex/[Custom Page]? They are all Visualforce pages. – Daniel Hoechst Oct 15 '12 at 21:46
  • Yes. I don't see which user I would be able to turn the development mode footer on for. – Peter Knolle Oct 15 '12 at 21:48
  • That did work for the public page. There are some other pages that require authentication and only display correctly based on certain attributes that are specific to the application. So I think that solution works for the public pages, but not my authenticated pages. I also do some url rewriting and the pages aren't actually accessible, but rather a template that includes them dynamically is the only page available. I had to add them to the profile/site list of pages. Thanks! – Peter Knolle Oct 15 '12 at 21:54
  • Thanks Daniel. It seems obvious now. ;) I was thinking just about accessing the page through the site URL of mysite.csX.force.com/mySite/mySitePage and not through the SFinstance/apex/myPageName URL. – Peter Knolle Oct 15 '12 at 22:09

2 Answers2

7

For pages that don't require customer portal authentication, you can access them through https://[instance].salesforce.com/apex/[page name]. This gives you the entire development mode footer.

I don't have a solution for pages that may require authentication with a specific user.

Daniel Hoechst
  • 25,020
  • 7
  • 79
  • 114
  • @peterKnolle Just ran across this; I ended up testing for UserInfo.getUserType() == 'Standard' as a backdoor way to avoid authentication where otherwise the user would be Guest. Thus, view state is avail per normal \apex\pagename. That said, we aren't using customer portal and instead have a home grown SSO-controlled authentication regime for intranet users access to Sites pages – cropredy Apr 26 '16 at 22:15
3

Go to Setup -> User Profile -> Select 'Show View State in Development Mode'. At the bottom of your Visualforce page you will see 3 tabs -> Visualforce page, Apex Class and View State. Click on View State to get more information on the state of your Visualforce page.

Thys Michels
  • 915
  • 10
  • 27