Page MenuHomePhabricator

Removing namespaces from $wgFlaggedRevsNamespaces can cause irremovable banners to be displayed on pages that transclude a 'previously-pending-review' page in a removed namespace
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue

  1. Enable/install FlaggedRevs on a wiki, with $wgFlaggedRevsNamespaces set to its default value ([ NS_MAIN, NS_FILE, NS_TEMPLATE ]).
  2. Using an account with the autoreview right:
    1. Create a new page in the Template: namespace.
    2. Edit a page in the main namespace to transclude that newly-created template.
  3. While logged-out/using an account without the autoreview right:
    1. Make an edit to that newly-created template.
  4. In the wiki's config, set $wgFlaggedRevsNamespaces to [ NS_MAIN ] (simulating a community desire to disable FlaggedRevs in the File: & Template: namespaces).
  5. Visit the page in the main namespace.

What happens?
The following banner is displayed on the top of the page.

screenshot.png (306×635 px, 20 KB)

As the transcluded page is in a namespace (Template:) that's no longer listed in $wgFlaggedRevsNamespaces, and therefore can't have its changes reviewed, this banner seems like it would therefore be effectively irremovable (barring any direct database modifications / changing the wiki's value for $wgFlaggedRevsHandleIncludes to prevent FlaggedRevs from ever checking whether transcluded pages have a stable version or not).

What should have happened instead?
As the template/transcluded page in question is no longer reviewable (as it's no longer in a reviewable namespace), FlaggedRevs shouldn't display a banner stating that the transcluding page has template changes that are pending review.

Other information/Notes