Page MenuHomePhabricator

Hiding own edits on watchlist and recentchanges results in hiding all IP edits
Closed, ResolvedPublicBUG REPORT

Description

With the classic Watchlist interface.

  • Go to https://en.wikipedia.org/wiki/Special:Watchlist
  • Ensure IPs edited some articles that will appear there
  • Check "Hide my edits" (ensure "Hide anonymous users" is not)
    • Own edits get hidden (correct)
    • Additionally all IP edits get hidden (wrong)
  • Uncheck "Hide my edits".
    • IP edits reappear

Originally reported here on English Wikipedia.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Xaosflux changed the subtype of this task from "Task" to "Bug Report".
Xaosflux subscribed.
kostajh moved this task from Inbox to Triaged on the Growth-Team board.
kostajh subscribed.

Growth-Team hasn't made any changes to Watchlist code in some time, so my guess is that this is related to actor migration changes made recently; tagging Platform Engineering.

Wild guess that @cicalese might have insight in to this?

I have indeed been working on the watchlist code recently. I will look into this. Thanks for the ping.

Xaosflux renamed this task from Hiding own edits on watchlist results in hiding all IP edits. to Hiding own edits on watchlist and recentchanges results in hiding all IP edits. .May 7 2021, 8:03 PM

git bisect indicates that the issue may have been caused by https://gerrit.wikimedia.org/r/c/mediawiki/core/+/680822. Pinging @tstarling. I took a look and didn't find anything obvious.

Perhaps it's this change on line 355 - the negation maybe?

Could it be this?

	if ( $user->isAnon() ) {
		$conds[] = 'actor_name<>' . $dbr->addQuotes( $user->getName() );
	} else {
		$conds[] = 'actor_user<>' . $dbr->addQuotes( $user->getId() );
	}

But actor_user is NULL for unregistered users.

I'm affected by this too. I recommend assigning it a high priority. By not being able to see IP's on one's watchlist, there is possibly a lot of vandalism and poor edits going undetected.

I'm affected by this too. I recommend assigning it a high priority. By not being able to see IP's on one's watchlist, there is possibly a lot of vandalism and poor edits going undetected.

Please note, the workaround is to just uncheck "hide my edits". There appear to be multiple WMF employees involved in the suspected code issues causing this who may have been off for the weekend, hopefully will give this a review today.

+@DannyS712 who is also listed as a reviewer on 680822

BPirkle triaged this task as Medium priority.May 11 2021, 7:45 PM
BPirkle removed a project: Platform Engineering.
BPirkle subscribed.

Marking this as Medium because there is a work around, but feel free to raise the priority if you feel strongly that it should be High.

Could it be this?

	if ( $user->isAnon() ) {
		$conds[] = 'actor_name<>' . $dbr->addQuotes( $user->getName() );
	} else {
		$conds[] = 'actor_user<>' . $dbr->addQuotes( $user->getId() );
	}

But actor_user is NULL for unregistered users.

I think you're right, and I've left a comment on the Gerrit patch pointing this out. This is the only place where the patch uses the <> operator on actor_user (which is a nullable field). Everywhere else it uses <>, it's only applied to actor_name, which is not nullable. In fact, the implementation of the same feature in ApiQueryRecentChanges.php (the excludeuser parameter) users actor_name<>'foo' regardless of whether the user being excluded is anonymous or not. I'm confused why that same approach wasn't used here.

tstarling raised the priority of this task from Medium to High.May 11 2021, 11:12 PM

Sorry for missing this. I think medium priority is too low, it should have been fixed the same day it was filed.

Change 689351 had a related patch set uploaded (by Tim Starling; author: Tim Starling):

[mediawiki/core@master] Fix changes list "hide myself" feature

https://gerrit.wikimedia.org/r/689351

Change 689059 had a related patch set uploaded (by Tim Starling; author: Tim Starling):

[mediawiki/core@wmf/1.37.0-wmf.4] Fix changes list "hide myself" feature

https://gerrit.wikimedia.org/r/689059

Change 689060 had a related patch set uploaded (by Tim Starling; author: Tim Starling):

[mediawiki/core@wmf/1.37.0-wmf.5] Fix changes list "hide myself" feature

https://gerrit.wikimedia.org/r/689060

Change 689351 merged by jenkins-bot:

[mediawiki/core@master] Fix changes list "hide myself" feature

https://gerrit.wikimedia.org/r/689351

Change 689060 merged by jenkins-bot:

[mediawiki/core@wmf/1.37.0-wmf.5] Fix changes list "hide myself" feature

https://gerrit.wikimedia.org/r/689060

Change 689059 merged by jenkins-bot:

[mediawiki/core@wmf/1.37.0-wmf.4] Fix changes list "hide myself" feature

https://gerrit.wikimedia.org/r/689059

Mentioned in SAL (#wikimedia-operations) [2021-05-12T01:17:04Z] <tstarling@deploy1002> Synchronized php-1.37.0-wmf.4/includes/specialpage/ChangesListSpecialPage.php: T282183 fix hidemyself in RC and watchlist (duration: 01m 16s)

Mentioned in SAL (#wikimedia-operations) [2021-05-12T01:19:34Z] <tstarling@deploy1002> Synchronized php-1.37.0-wmf.5/includes/specialpage/ChangesListSpecialPage.php: T282183 fix hidemyself in RC and watchlist (duration: 01m 08s)

Krinkle renamed this task from Hiding own edits on watchlist and recentchanges results in hiding all IP edits. to Hiding own edits on watchlist and recentchanges results in hiding all IP edits.May 14 2021, 2:35 AM