1

When the view state size is exceeded, the page content is usually replaced with a message that says Maximum view state size limit (170KB) exceeded. Actual view state size for this page was [size]KB. However, this causes unusual behavior when it occurs on a public page on a force.com site. Users are not presented with this message, and are instead redirected to the Authorization Required Page for the site. In situations where the page is intended to be usable by the public without login or authentication, this redirect is immensely confusing.

How can I avoid the site guest user from encountering this redirect when the view state is exceeded?

To be clear, I am not asking how to fix the view state size limit error, but rather how to gracefully handle such an error if one occurs in this specific situation.

0

Best approach would be to create a custom error page and override error pages on site detail with a generic one (community details page). You can use different pages for every kind of error.

An example from one of my sites:

Example

  • While a generic page is better than the authorization required page in the context where the page is public, it still doesn't tell the user what went wrong. This would also be counter-productive if there were other pages on the site that did require login, and legitimately needed a real authorization required error page to exist. – MatthewGTS Jul 30 '19 at 18:51

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.