Page MenuHomePhabricator

API: Call to a member function getFullURL() on a non-object
Closed, ResolvedPublicPRODUCTION ERROR

Description

Fatal error: Call to a member function getFullURL() on a non-object in /usr/local/apache/common-local/php-1.21wmf4/includes/api/ApiFeedWatchlist.php on line 164


Version: unspecified
Severity: normal

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:46 AM
bzimport set Reference to bz42274.
bzimport added a subscriber: Unknown Object (MLST).

Fairly obviously why from the code:

		$titleStr = $info['title'];
		$title = Title::newFromText( $titleStr );
		if ( $this->linkToDiffs && isset( $info['revid'] ) ) {
			$titleUrl = $title->getFullURL( array( 'diff' => $info['revid'] ) );
		} else {
			$titleUrl = $title->getFullURL();
		}

Server: srv299
Method: GET
URL: http://en.wikipedia.org/w/api.php?action=feedwatchlist&allrev=allrev&wlowner=Brent.austin&wltoken=REMOVED&feedformat=atom
Backtrace:
#0 /usr/local/apache/common-local/php-1.21wmf4/includes/api/ApiFeedWatchlist.php(164): ApiFeedWatchlist::createFeedItem()
#1 /usr/local/apache/common-local/php-1.21wmf4/includes/api/ApiFeedWatchlist.php(117): ApiFeedWatchlist->createFeedItem(Array)
#2 /usr/local/apache/common-local/php-1.21wmf4/includes/api/ApiMain.php(825): ApiFeedWatchlist->execute()
#3 /usr/local/apache/common-local/php-1.21wmf4/includes/api/ApiMain.php(372): ApiMain->executeAction()
#4 /usr/local/apache/common-local/php-1.21wmf4/includes/api/ApiMain.php(349): ApiMain->executeActionWithErrorHandling()
#5 /usr/local/apache/common-local/php-1.21wmf4/api.php(77): ApiMain->execute()
#6 /usr/local/apache/common-local/live-1.5/api.php(3): require('/usr/local/apac...')
#7 {main}

It looks like what most likely happened here is that the user has a newly-invalid title on their watchlist (e.g. one of the pages affected by the new "d:" interwiki prefix for Wikidata).

The question is what is the most correct behavior in this situation? Leave out the <link> node completely from the feed? Leave out the entire <item> for the entry?

Change 194119 had a related patch set uploaded (by Anomie):
API: Handle invalid titles in action=feedwatchlist

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

Change 194119 merged by jenkins-bot:
API: Handle invalid titles in action=feedwatchlist

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

Anomie claimed this task.

Should be deployed to WMF wikis with 1.25wmf20.

mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:12 PM