Page MenuHomePhabricator

Duplicated edit notice about pending changes
Closed, ResolvedPublicBUG REPORT

Description

Steps to reproduce

  1. Open a page for editing that has pending revisions. E.g. https://test2.wikipedia.org/w/index.php?title=PendingChangeFlaggedRevsTest&action=submit
  2. Look at the edit notices.

Actual result

  1. The edit notice about the pending changes appear twice.
    Screenshot 2023-05-27 at 22-29-38 Editing PendingChangeFlaggedRevsTest - test2.Wikipedia.png (339×991 px, 84 KB)

Expected result

  1. The edit notice about the pending changes appears once.

Other information

  • The duplicated edit notice is actually technically two edit notices (which explains the different styling): the first one is added by FlaggablePageView::getEditNotices, the second one is added by FlaggablePageView::addToEditView.
  • FlaggablePageView::getEditNotices contains a comment: HACK: EditPage invokes addToEditView() before this function, so $this->noticesDone will only be true if we're being called by EditPage, in which case we need to do nothing to avoid duplicating the notices.
  • 6a20dc29aeef (T201613) reorganized the edit notice system. Checking out 6a20dc29aeef^ makes the bug go away. Probably EditPage no longer invokes FlaggablePageView::addToEditView before FlaggablePageView::getEditNotices.

Event Timeline

Change 923770 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/core@master] editpage: Change the order of hooks slightly for FlaggedRevs

https://gerrit.wikimedia.org/r/923770

Change 923770 merged by jenkins-bot:

[mediawiki/core@master] editpage: Change the order of hooks slightly for FlaggedRevs

https://gerrit.wikimedia.org/r/923770

Change 924158 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/core@wmf/1.41.0-wmf.10] editpage: Change the order of hooks slightly for FlaggedRevs

https://gerrit.wikimedia.org/r/924158

Change 924158 merged by jenkins-bot:

[mediawiki/core@wmf/1.41.0-wmf.10] editpage: Change the order of hooks slightly for FlaggedRevs

https://gerrit.wikimedia.org/r/924158

Mentioned in SAL (#wikimedia-operations) [2023-05-30T13:58:22Z] <tgr@deploy1002> Started scap: Backport for [[gerrit:924158|editpage: Change the order of hooks slightly for FlaggedRevs (T337637)]]

Mentioned in SAL (#wikimedia-operations) [2023-05-30T13:59:57Z] <tgr@deploy1002> tgr and matmarex: Backport for [[gerrit:924158|editpage: Change the order of hooks slightly for FlaggedRevs (T337637)]] synced to the testservers: mwdebug1001.eqiad.wmnet, mwdebug2002.codfw.wmnet, mwdebug1002.eqiad.wmnet, mwdebug2001.codfw.wmnet

Mentioned in SAL (#wikimedia-operations) [2023-05-30T14:06:36Z] <tgr@deploy1002> Finished scap: Backport for [[gerrit:924158|editpage: Change the order of hooks slightly for FlaggedRevs (T337637)]] (duration: 08m 14s)

matmarex moved this task from Incoming to Ready for Sign Off on the Editing-team (Kanban Board) board.
matmarex added a project: Skipped QA.

Fixed and deployed to Wikimedia projects.