Page MenuHomePhabricator

transclude a project namespace page in main space page will view old revision
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • create template page (A)
  • move this page to project namespace with redirect
  • transclude page in any main namespace page (B)
  • modify project page (A)

What happens?:
page (B) will view old rev of (A) before moving

What should have happened instead?:
page (B) must view new rev of (A) after moving

sample of this bug in ar.wikipedia.org all pages "ويكيبيديا:ملاحظة اليوم/*" and "ويكيبيديا:اختبار خلل"

Update (2023-08-01):
samples in ar.wiki were corrected by Ladesgroup in 2026-07-29T10:39:23Z,
but you can see in this history query: https://quarry.wmcloud.org/history/107612/1165098/1130111

Event Timeline

The cause of this bug is that FlaggedRevs work in template and main namesspaces and does not work in project namespace.
when the page (A) created in template namespace so FlaggedRevs tracked it revisions and the page has record in flaggedpages table.
the bug occuered when page (A) moved to project namespace which is not tracked by FlaggedRevs.
new revisions created for page (A) but untracked by FlaggedRevs.
when page (A) transcluded in page (B) which is main namespace and controled by FlaggedRevs, so FlaggedRevs checks page (A) last reviewed revision witch is outdated before page (A) moved to project namespace.

for example see ويكيبيديا:ملاحظة اليوم/97 history
and its record in flaggedpages table

suggested fixing
create hook in moving page from monitored FlaggedRevs namespace to unmonitored namespace, this hook deletes the page record in flaggedpages table and any other tables.

@Ladsgroup We need to run SQL queries in arwiki to clean this bug outputs until it fixed

Sure. With enough bribe, I can do it. (just kidding)

What queries do you want me to run?

DELETE from flaggedpages 
WHERE (SELECT page_namespace FROM page WHERE page_id=fp_page_id) not in (0,6,10,100,828);
Restricted Application changed the subtype of this task from "Bug Report" to "Production Error". · View Herald TranscriptThu, Jul 23, 1:04 PM

FYI, a production error needs to display an error code rather than just being a bug. Is there an error code? If not, let's change this ticket back to being a bug report.

DELETE from flaggedpages 
WHERE (SELECT page_namespace FROM page WHERE page_id=fp_page_id) not in (0,6,10,100,828);

@Ladsgroup

I double check everything and do it on Monday.

Yup. Sorry. This is a bit scary so I need to spend some time to make sure I don't cause data corruption. On it.

Ladsgroup claimed this task.
Novem_Linguae changed the subtype of this task from "Production Error" to "Bug Report".Wed, Jul 29, 10:45 AM

Did the root cause get fixed? Or will these errors just reappear again until we write a patch that...

create hook in moving page from monitored FlaggedRevs namespace to unmonitored namespace, this hook deletes the page record in flaggedpages table and any other tables

Fair, I don't have the capacity to fix it though :(