Prevent "success message checksum content error" when a session is invalid?

Viewed 201

I've got an error message that crops up in my logs pretty often, "Success message checksum content error" with an error code of apex.success_msg.checksum_content_error. I'm pretty sure I know exactly what's happening, basically:

  1. User loads page 1, which contains a list of things that can be edited
  2. User clicks a link to page 2, which allows them to edit the thing
  3. Clicking Save Changes redirects them back to page 1 with a success message, "Changes to the thing have been saved."
  4. User bookmarks the version of page 1 with the success message encoded in the URL, like "...&success_msg=..."
  5. Tomorrow, user uses this bookmark, but their session has expired, so the success message is no longer valid and they get an error.

Is there anything I can do in Apex to prevent this from happening? I can go to each user that does this and tell them, "Don't bookmark that, bookmark this other URL instead", but I'd rather prevent the problem from happening at all.

About the only thing that comes to mind is a custom error handler that looks for this particular error and redirects to a version of the URL without the &success_msg in it, but I'm not even sure if you can redirect inside an error handler like that.

0 Answers
Related