Page MenuHomePhabricator

If reviewed page was deleted and then undeleted, page is marked both as reviewed and unreviewed
Open, Needs TriagePublicBUG REPORT

Description

If reviewed pages are deleted and then undeleted, then something strange happens: it is marked both as reviewed and unreviewed. Example: https://ru.wikipedia.org/w/index.php?title=%D0%90%D0%BB%D0%B5%D0%BA%D1%81%D0%B0%D0%BD%D0%B4%D1%80_%D0%A0%D0%B0%D1%84%D0%B0%D0%B8%D0%BB%D0%BE%D0%B2%D0%B8%D1%87_%D0%9A%D0%BE%D1%80%D1%81%D1%83%D0%BD%D1%81%D0%BA%D0%B8%D0%B9&redirect=no

Now this redirect page looks OK, but only after unreview and then again review action.

New example: https://ru.wikipedia.org/w/index.php?title=%D0%90%D0%BB%D0%B5%D0%BA%D1%81%D0%B5%D0%B9_%D0%9C%D0%B8%D1%85%D0%B0%D0%B9%D0%BB%D0%BE%D0%B2%D0%B8%D1%87_%D0%9F%D1%80%D0%BE%D0%BA%D0%B8%D0%BD&redirect=no

The problem is that after restoring the reviewed page, FlaggedRevs::newFromTitle returns NULL. I cannot figure out why.

It is the same not only for redirects, but for all pages, in all namespaces.

Event Timeline

Aklapper renamed this task from Bug: if reviewed pages were deleted and then undeleted to If reviewed page was deleted and then undeleted, page is marked both as reviewed and non-reviewed.Apr 12 2017, 1:09 PM

I can not reproduce the problem. In my local wiki (on my machine: MediaWiki 1.30.0-alpha (fb36b7d) PHP 5.5.38 (apache2handler) MariaDB 10.1.22-MariaDB, Flagged Revisions – (aa44500) ) I reviewed a page, then deleted it and restored it. Everything seems to be fine. Can somebody (@Choomaq @MaxBioHazard @Arbnos ) tell me step by step how to reproduce this bug

Tacsipacsi changed the subtype of this task from "Task" to "Bug Report".Oct 8 2025, 10:19 AM
Tacsipacsi subscribed.

I think the description of the merged-in task was much better, with clear description of what “marked both as reviewed and non-reviewed” means, so I copy it here for reference:

  • Delete the page that was reviewed
  • Undelete the page

What happens?: The FlaggedRev indicator shows that the page is unchecked, but the review menu shows that the page is reviewed.

What should have happened instead?: The FlaggedRev indicator and the review menu should show the same status.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):
The page is https://uk.wikipedia.org/wiki/%D0%9A%D0%B0%D1%82%D0%B5%D0%B3%D0%BE%D1%80%D1%96%D1%8F:%D0%A1%D1%82%D0%B0%D1%82%D1%82%D1%96,_%D1%8F%D0%BA%D1%96_%D0%BF%D0%BE%D1%82%D1%80%D1%96%D0%B1%D0%BD%D0%BE_%D0%B2%D0%B8%D0%BF%D1%80%D0%B0%D0%B2%D0%B8%D1%82%D0%B8_%D0%BF%D1%96%D1%81%D0%BB%D1%8F_%D0%BF%D0%B5%D1%80%D0%B5%D0%BA%D0%BB%D0%B0%D0%B4%D1%83_%D0%B7_%D0%B1%D0%B5%D1%80%D0%B5%D0%B7%D0%BD%D1%8F_2024

image.png (358×1 px, 115 KB)

image.png (358×1 px, 37 KB)

(However, this may still not answer the question of @Eugene.)

According to the screenshots in the merged in ticket, mw-fr-reviewform (the thing in the footer) is showing as reviewed, and mw-indicator-indicator-fr-review-status (the little icon at the top right) is showing as unreviewed.

We should decide if an undeleted page is supposed to keep its review or not. After that decision is made, we can decide how to fix this, and also pick a better title for this ticket. For example, we can decide if we are fixing the "reviewed" part to make it unreviewed, or fixing the "unreviewed" part to make it reviewed. It'll be clearer what is broken.

We may also need to edit the ticket with a better steps to reproduce, since someone commented that they are unable to reproduce this. Maybe this only happens with a certain combination of $wgFlaggedRevsOverride and $wgFlaggedRevsProtection, or only happens with redirects.

Maybe this […] only happens with redirects.

The task description explicitly states the contrary.

I can very well imagine that @Eugene just didn’t know what to look for, and they have in fact reproduced the issue without realizing this. (But it may also be indeed config-dependent.)

Bugreporter2 renamed this task from If reviewed page was deleted and then undeleted, page is marked both as reviewed and non-reviewed to If reviewed page was deleted and then undeleted, page is marked both as reviewed and unreviewed.Oct 9 2025, 1:39 AM
Bugreporter2 updated the task description. (Show Details)

I tried several things just now (admin vs logged out editor doing the first edit, article vs redirect, regular title vs unicode title, various combinations of $wgFlaggedRevsOverride and $wgFlaggedRevsProtection, article vs category). Unable to reproduce in localhost. This means the steps to reproduce in this ticket needs improvement / more detail in order to track down the bug.

Neither could I reproduce it, but I got close to it. What I did:

  1. Set $wgFlaggedRevsLowProfile to false, just in case.
  2. Create the page FRTest using a temp user (so it was unreviewed).
  3. Review the page using my admin account.
  4. Delete the page.
  5. (Restore and delete it again. Probably not necessary, I was just experimenting.)
  6. Create the page again (now with the admin account – for no particular reason, I just happened to be logged in.)
  7. Restore the old revision.
  8. Delete the page again.
  9. Restore only the older revision, so that it becomes the latest revision of the page.

Result: the page now consistently appears to be unreviewed (unlike the bug report, the review form also thinks it’s unreviewed), even though that revision has once been reviewed.