Page MenuHomePhabricator

Deleting a page on Wikidata broke related changes with enhanced rc
Closed, DuplicatePublic

Event Timeline

Restricted Application added a project: TCB-Team. · View Herald TranscriptApr 26 2017, 8:28 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
matej_suchanek triaged this task as Unbreak Now! priority.Apr 26 2017, 8:29 AM
Restricted Application added subscribers: Jay8g, TerraCodes. · View Herald TranscriptApr 26 2017, 8:29 AM

Doesn't happen when logged out or without sysop rights.

Request from 89.177.50.85 via cp2013 cp2013, Varnish XID 671981055
Error: 503, Service Unavailable at Wed, 26 Apr 2017 08:28:32 GMT

When I deleted that page, all changes to it should have been deleted from recentchanges which didn't happen. This is already tracked (T153849) and doesn't break the site for anonymous and non-sysop users. But it does for me as a sysop.

The problem occurs when row with rc_id = 508121191 is to be rendered.

Nothing seems to break for me as 1) an anon user 2) a regular logged in user 3) a sysop.

I am guessing you mean when you deleted Talk:Q1751912?

I'm not sure if this is actually a different issue from that described in T153849, or anything specific to catwatch from what I can see.

matej_suchanek added a comment.EditedApr 26 2017, 9:19 AM

1), 2) same by me but not 3). It either doesn't load for me, or shows "Wikimedia Error" screen. And the difference is (not) having hidecategorization=0 in the URL... oh, it only happens with enhanced changes (enhanced=1).

matej_suchanek renamed this task from Deleting a page on Wikidata broke categorization changes to Deleting a page on Wikidata broke related changes with enhanced rc.Apr 26 2017, 9:20 AM
matej_suchanek updated the task description. (Show Details)

When loading https://www.wikidata.org/w/index.php?title=Special:RecentChangesLinked&hidecategorization=0&hidepatrolled=0&target=Category%3AWikidata%3ADeletion&enhanced=1 using my user account (Addshore) which is non admin I see the following in the logs.

Apr 26 09:30:26 mw2191:  #012Catchable fatal error: Argument 1 passed to MediaWiki\Linker\LinkRenderer::makeKnownLink() must implement interface MediaWiki\Linker\LinkTarget, null given in /srv/mediawiki/php-1.29.0-wmf.20/includes/linker/LinkRenderer.php on line 301
Apr 26 09:30:26 mw2191:  [Wed Apr 26 09:30:26 2017] [hphp] [28767:7fd4913ff700:392239:000001] [] \nCatchable fatal error: Argument 1 passed to MediaWiki\\Linker\\LinkRenderer::makeKnownLink() must implement interface MediaWiki\\Linker\\LinkTarget, null given in /srv/mediawiki/php-1.29.0-wmf.20/includes/linker/LinkRenderer.php on line 301

Change 350384 had a related patch set uploaded (by Addshore):
[mediawiki/core@wmf/1.29.0-wmf.20] Throw InvalidArgumentException in makeKnownLink on null

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

Change 350384 merged by Addshore:
[mediawiki/core@wmf/1.29.0-wmf.20] Throw InvalidArgumentException in makeKnownLink on null

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

This comment was removed by Addshore.

@Addshore I think this is mistake, see my comment in gerrit.

2017-04-26 13:08:41 [WQCb2QpAIHwAAEJQ3q8AAAAG] mwdebug1002 wikidatawiki 1.29.0-wmf.20 exception ERROR: [WQCb2QpAIHwAAEJQ3q8AAAAG] /w/index.php?title=Special:RecentChangesLinked&hidecategorization=0&hidepatrolled=0&target=Category%3AWikidata%3ADeletion&enhanced=1   InvalidArgumentException from line 289 of /srv/mediawiki/php-1.29.0-wmf.20/includes/linker/LinkRenderer.php: Argument 1 passed to MediaWiki\Linker\LinkRenderer::makeKnownLink must implement MediaWiki\Linker\LinkTarget {"exception_id":"WQCb2QpAIHwAAEJQ3q8AAAAG","caught_by":"mwe_handler"}
[Exception InvalidArgumentException] (/srv/mediawiki/php-1.29.0-wmf.20/includes/linker/LinkRenderer.php:289) Argument 1 passed to MediaWiki\Linker\LinkRenderer::makeKnownLink must implement MediaWiki\Linker\LinkTarget
  #0 /srv/mediawiki/php-1.29.0-wmf.20/includes/changes/EnhancedChangesList.php(724): MediaWiki\Linker\LinkRenderer->makeKnownLink(NULL, HtmlArmor, array, array)
  #1 /srv/mediawiki/php-1.29.0-wmf.20/includes/changes/EnhancedChangesList.php(658): EnhancedChangesList->getDiffHistLinks(RCCacheEntry, array)
  #2 /srv/mediawiki/php-1.29.0-wmf.20/includes/changes/EnhancedChangesList.php(742): EnhancedChangesList->recentChangesBlockLine(RCCacheEntry)
  #3 /srv/mediawiki/php-1.29.0-wmf.20/includes/changes/EnhancedChangesList.php(757): EnhancedChangesList->recentChangesBlock()
  #4 /srv/mediawiki/php-1.29.0-wmf.20/includes/specials/SpecialRecentchanges.php(398): EnhancedChangesList->endRecentChangesList()
  #5 /srv/mediawiki/php-1.29.0-wmf.20/includes/specialpage/ChangesListSpecialPage.php(1022): SpecialRecentChanges->outputChangesList(Wikimedia\Rdbms\ResultWrapper, FormOptions)
  #6 /srv/mediawiki/php-1.29.0-wmf.20/includes/specialpage/ChangesListSpecialPage.php(462): ChangesListSpecialPage->webOutput(Wikimedia\Rdbms\ResultWrapper, FormOptions)
  #7 /srv/mediawiki/php-1.29.0-wmf.20/includes/specials/SpecialRecentchanges.php(69): ChangesListSpecialPage->execute(NULL)
  #8 /srv/mediawiki/php-1.29.0-wmf.20/includes/specialpage/SpecialPage.php(522): SpecialRecentChanges->execute(NULL)
  #9 /srv/mediawiki/php-1.29.0-wmf.20/includes/specialpage/SpecialPageFactory.php(578): SpecialPage->run(NULL)
  #10 /srv/mediawiki/php-1.29.0-wmf.20/includes/MediaWiki.php(286): SpecialPageFactory::executePath(Title, RequestContext)
  #11 /srv/mediawiki/php-1.29.0-wmf.20/includes/MediaWiki.php(861): MediaWiki->performRequest()
  #12 /srv/mediawiki/php-1.29.0-wmf.20/includes/MediaWiki.php(522): MediaWiki->main()
  #13 /srv/mediawiki/php-1.29.0-wmf.20/index.php(43): MediaWiki->run()
  #14 /srv/mediawiki/w/index.php(3): include(string)
  #15 {main}

So it looks like this was caused by https://gerrit.wikimedia.org/r/#/c/288579/24/includes/changes/EnhancedChangesList.php

Prior to this the null would have made it to Linker::link where the following would have happened.

		if ( !$target instanceof Title ) {
			wfWarn( __METHOD__ . ': Requires $target to be a Title object.', 2 );
			return "<!-- ERROR -->$html";
		}

where $html would have been $rcObj->timestamp from within the beginRecentChangesList method...

Sounds like we just need to fix whatever is pass in in null since nothing should have been taking advantage of that?

Restricted Application removed a subscriber: Liuxinyu970226. · View Herald TranscriptApr 29 2017, 10:24 AM
Tobi_WMDE_SW moved this task from Incoming to CatWatch on the TCB-Team board.Jun 6 2017, 10:16 AM