Steps to reproduce
- Open a page for editing that has pending revisions. E.g. https://test2.wikipedia.org/w/index.php?title=PendingChangeFlaggedRevsTest&action=submit
- Look at the edit notices.
Actual result
- The edit notice about the pending changes appear twice.
Expected result
- 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.