Page MenuHomePhabricator

Postedit confirmation sometimes show wrong message
Closed, DuplicatePublic


After editing and saving an old revision of a page you get a message saying "The page has been restored" ([[Mediawiki:Postedit-confirmation-restored]]. But this message is also sometimes shown after editing the current revision of a page, when "Your edit was saved" ([[MediaWiki:Postedit-confirmation-saved]] should be displayed.

Steps to reproduce:

  1. visit current revision of a page
  2. using Visual Editor edit the page
  3. switch to (old) code editor
  4. save
  5. Result: [[Mediawiki:Postedit-confirmation-restored]] is displayed


  1. visit current revision of a page
  2. edit using code editor (action=edit) but add current revision number to oldid in url: index.php?title=<PAGETITLE>&action=edit&oldid=<CURRENTREVISIONID>
  3. save
  4. Result: [[Mediawiki:Postedit-confirmation-restored]] is displayed

I think the problem could be that function setPostEditCookie in includes/EditPage.php should not only check if oldid exists, but also that it is not current revision id.