Steps to replicate the issue
- Enable/install FlaggedRevs on a wiki, with $wgFlaggedRevsNamespaces set to its default value ([ NS_MAIN, NS_FILE, NS_TEMPLATE ]).
- Using an account with the autoreview right:
- Create a new page in the Template: namespace.
- Edit a page in the main namespace to transclude that newly-created template.
- While logged-out/using an account without the autoreview right:
- Make an edit to that newly-created template.
- In the wiki's config, set $wgFlaggedRevsNamespaces to [ NS_MAIN ] (simulating a community desire to disable FlaggedRevs in the File: & Template: namespaces).
- Visit the page in the main namespace.
What happens?
The following banner is displayed on the top of the page.
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
- Splitting this bug report out of T408110#11336607, to ensure that there's a task open for it once that site-request is complete.
- From my testing, this isn't limited to just the Template: namespace - it seems like it'd affect any namespace that (a) is removed from $wgFlaggedRevsNamespaces, & (b) contains a page transcluded from a namespace that is still listed within that config variable.
- It appears like this might be similar to (or the same as) / might have been previously reported in:
- T189224: FlaggedRevs bar for a template shown in all articles though there are no template versions to review (for arwiki, which appears to have been resolved by reverting the removal of several namespaces from that wiki's $wgFlaggedRevsNamespaces)
- T226054: FlaggedRevs disabled for NS "Wikisource", "MediaWiki" and "File" but it still requiring reviews for transcludes (for ruwikisource, which appears to have been resolved by setting that wiki's $wgFlaggedRevsHandleIncludes value to 0)
