Page MenuHomePhabricator

Being autopatrolled and moving one's own draft to mainspace does not autopatrol it
Open, Needs TriagePublicBUG REPORT

Description

Reported by @Innisfree987 at https://en.wikipedia.org/wiki/Wikipedia_talk:New_pages_patrol/Reviewers#Autopatrol

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

  • Log into an account with autopatrol
  • Create a draft
  • Move it to mainspace

What happens?:

  • Article is not marked as reviewed

What should have happened instead?:

  • Article should be marked as reviewed (with the autopatrolled flavor, so purple check mark)

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

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

Event Timeline

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

I can't reproduce this at all, @Innisfree987 could you provide some more context on how you encountered this error ?

Hi, this is my first time in Phabricator so please let me know if I’m not replying correctly!

As to what happened: I am an en-wiki user with autopatrol and NPR rights assigned to my account. I worked on an entry in draft space for about a week, then moved it to mainspace, where I was surprised to find the page curation tools showed it was not reviewed, as I expected with autopatrol. I verified on my user rights page that I still have autopatrol on my account, and after I posted my question about it, Novem Linguae was kind enough to review the entry for me—I got a notification that they had, so I assume that means it indeed had been unreviewed (not just a display error or confusion on my part).

Are there any other details that would help? I’ll also look and see if I have any drafts in progress that might be suitable for mainspace to see if the error reproduces (I’m not sure I do but I’ll check.)

I trawled through Logstash and wasn't able to find any errors :(

@Innisfree987 What did you use to move the draft?

I used the move button in the drop-down “more” menu (apologies that I don’t know a more precise term for it in the tech!)

I had almost the opposite issue this evening. My account is not autopatrolled, but when I moved the 3Breezy article from userspace to mainspace using AFCH the page was seemingly already marked as reviewed when I got there (03:41 UTC); the curation toolbar did not appear, and I could see the "Add to New Pages Feed" link in the sidebar. The log, however, has no entries for that action. I then marked it as unreviewed and reviewed again (03:53 UTC), which set everything back to normal. Courtesy ping @Soda who I was discussing this with on Discord.

By the way, this ticket seems very similar to T368091; should one of them be closed as a duplicate?

Sadly, my creation was draftified. So, I moved the draft back to mainspace then also the article wasn't reviewed automatically. You can check the log here and here. I have used the Tools/MoreMenu drop-down to move the draft. Thanks, hope it helps you to troubleshoot.

@C1K98V Love, Sitara has been re-draftified by Bastun, and then moved to mainspace again by autopatrolled admin @Hey_man_im_josh. But it is still not marked as autopatrolled. Also, the behavior is inconsistent, as SLGT (another page moved to mainspace by Hey man im josh) was correctly marked as autopatrolled.

By the way, this ticket seems very similar to T368091; should one of them be closed as a duplicate?

These two tickets look different. This ticket is the moved page never getting marked as reviewed. The other ticket is the moved page getting marked as reviewed a couple seconds after the move, but after the page refreshes, so that it looks unreviewed to the editor who just executed the move.

The relevant code path appears to be

  • Hooks.php -> onPageMoveComplete()
    • Hooks.php -> addToPageTriageQueue()
      • PageTriage.php -> addToPageTriageQueue()

Reading this code path...

Hypothesis 1: were any of these a redirect at the time of their move?

		// Draft redirects are not patrolled or reviewed.
		if ( $isDraft && $title->isRedirect() ) {
			return false;
		}

Hypothesis 2: Is the "system" making the call instead of the "user"? If the system makes the call, it will default to unreviewed because no parameter is passed to $pageTriage->addToPageTriageQueue().

		// action taken by system
		if ( $userIdentity === null ) {
			return $pageTriage->addToPageTriageQueue();
		// action taken by a user
		} else {

Too bad we don't have a consistent steps to reproduce so we can step debug this.

@Soda, you have logstash access. One idea might be to write a patch that adds logging code. For example, maybe add a log line right beneath if ( $userIdentity === null ) { that var dumps some useful variables such as the values of $userIdentity, $isAutopatrolled, $isDraft, etc.