This is version . It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]

Do you get hit with the ConflictContent page way too often? (The "Oops! Someone modified the page while you were editing it!" page.)


When in a fast & furious flurry of edits and previews all too often I end up too far back in my browsers history and end up reusing an "old" edit window. The root problem here is that Edit.jsp/page=Blah urls are in the browser history and you can "back" into them. (This is a bigger issue for folks who routinely use the "backspace" key to navigate back in history.)

There is a solution to this it involved some very minor mods to the EditTemplate.jsp:

  • To the Form add onSubmit="if(doAutoBack) window.history.go(-1);"
  • To the Save and Cancel submit buttons, added: onClick="doAutoBack=true;"
  • To the Preview submit button, added: onClick="doAutoBack=false;"

There are all sorts of way that you can try to acive this effect, but you wind up in browser compatibility/security headache land... Apparently "they" decided that javascript was not allowed to modify the browsers history list (or even read it!

The way this patch works is a bit cheesey but we've been using it for over a week now and have had no ill effects. Basically what this patch does is submit the form contents, immediatly go back one step in history then the server response takes you to the page that the edit-submit was for. viola, magic! (but timing sensitive maybe?) One caveat is that you can still navigate forward in you history into the edit window, but I'm willing to live with that as I do not know the keyboard shortcut for navigating forward.

Thoughts anyone? This seemes to work nicely for us, but I've not tried it with various browsers. (Though I'm told that the .go(-1) bit works fine under Netscape and the rest is very basic javascript.) In a way I'd like to see it get more testing and maybe get incorporated into the "mrg" template 'cause I'm lazy and don't like to have to remember what patches I need to do with every upgrade.

Add new attachment

Only authorized users are allowed to upload new attachments.
« This particular version was published on 02-Apr-2003 15:45 by JohnVolkar.