Page MenuHomePhabricator

Regression: Undeleted mainspace articles are not added to the PageTriage queue
Closed, ResolvedPublicBUG REPORT

Description

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

  • Undelete a deleted mainspace article

What happens?: The mainspace article is not added to the PageTriage queue.

What should have happened instead?: The mainspace article is added to the PageTriage queue.

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

The hook was added in T311347. It appears that the hook is not correctly ran in recent undeletions such as White Springs Television on the English Wikipedia.

However, User:Davey2010/UPTPheader and User:Davey2010/Talkpageheader were correctly added to the PageTriage queue. So, it appears that the bug only affects mainspace articles, not pages in other namespaces.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Adding @taavi since he wrote the patch.

Cause - In the example given, the undeleter was autopatrolled. This appears to be the reason for not marking it as unreviewed. According to the documentation for addToPageTriageQueue(), it does check for autopatrol.

The fix - I guess a lot of undeletes will be [[WP:REFUND]]s, so we should ignore autopatrol for this particular hook? Maybe we can add a parameter to addToPageTriageQueue(..., $ignoreAutoPatrol)

edit: Striking because I don't think the undeleter was actually autopatrolled after all.

Removing the regression tag since this bug has never been fixed. I think a regression has to be something that worked before but no longer works.

Mannan Wani (before it was draftified) also did not get added to the queue even though it was undeleted by a non-autopatrolled admin (Jay). The problem occurs regardless of whether the undeleter has autopatrol rights or not.

GTrang renamed this task from Undeletion PageTriage hook not correctly applied to Undeleted mainspace articles are not added to the PageTriage queue.Sep 4 2022, 2:57 PM
GTrang updated the task description. (Show Details)

I suspect that the cause for this is the same as the one for T316490. If the cause turns out to be the same for both, then you may create a new task documenting the cause and merge both tasks into there.

GTrang renamed this task from Undeleted mainspace articles are not added to the PageTriage queue to Regression: Undeleted mainspace articles are not added to the PageTriage queue.Sep 6 2022, 12:52 AM
GTrang added a project: Regression.

I have readded the Regression tag. It turns out that this is in fact a regression after all.

Pppery removed Pppery as the assignee of this task.Apr 1 2023, 7:31 PM

Can't reproduce the failure locally.

jsn.sherman closed this task as Declined.EditedJul 27 2023, 3:23 PM
jsn.sherman moved this task from Other bugs to Done on the PageTriage board.
jsn.sherman subscribed.

We were unable to reproduce after checking every suggested and invented case that we could come up with in T340126: SPIKE: Are undeleted mainspace articles added to the PageTriage queue?. Setting as declined per the bug report lifecycle. If this reoccurs, please have a look at the mentioned spike to see how we have investigated thus far and reopen this task with more information.

This is clearly still an issue. I just had to add https://en.wikipedia.org/wiki/Ghanim_Alsheikh to the queue. My guess is that some other extension installed on the English Wikipedia but not wherever you are doing your testing is interfering with the process somehow.

Can you provide us with an example and leave it uncorrected? After two weeks of investigation, we have been unable to reproduce this outside of production, so investigating a production example would be the next logical step.

Thank you for both of those examples; I'm thinking through this, and I believe one issue might be that both of them are old enough to age out of the new page patrol queue. @Novem_Linguae would the best workflow in that case be to restore them as drafts and use the AfC workflow?

I don't recommend that. That would be complicated to code (would have to do an undelete hook, and then restore the page, and then move it, and then add an {{AfC submission|t}} template), and also draftification is controversial. It would be much better to solve the bug.

I note that of the two examples above, one admin was autopatrolled and one was not. That's interesting, and suggests that autopatrol is not the root cause.

Also https://en.wikipedia.org/wiki/Kojo_Soboh, which is notably not old enough to fall out of the queue.

Random idea: could it be some kind of race condition between two hooks, where one is using DeferredUpdates and one isn't, and one is marking as reviewed and one is marking as unreviewed? Maybe I'll poke around the code later and check every spot where mark as reviewed and mark as unreviewed occur.

The idea above about an extension interfering is also a decent idea.

Could also look into a patch that writes some extra stuff to logstash when undeleting.

Speaking of race conditions with other extensions: we're using the ArticleUndelete hook, which has been deprecated in favor of the PageUndeleteComplete hook. The new hook runs in a different place and has a very similar signature to the deprecated one, so taking care of the deprecation as a maintenance task should be low effort and could also have a positive impact here.

If it did resolve the issue for undeletes moving forward, it would be worth keeping an eye out for regressions if other extensions migrate to the new hook.
I count 16 other extension implementing ArticleUndelete
https://www.mediawiki.org/wiki/Category:ArticleUndelete_extensions
and only 2 other extensions implementing PageUndeleteComplete
https://www.mediawiki.org/wiki/Category:PageUndeleteComplete_extensions