Page MenuHomePhabricator

BadMethodCallException from line 266 of /srv/mediawiki/php-1.27.0-wmf.2/includes/PrefixSearch.php: Call to a member function getPrefixedText() on a non-object (NULL)
Closed, ResolvedPublic

Description

on mlwiki:

/w/api.php?action=query&format=json&generator=prefixsearch&gpssearch=ra&gpsnamespace=0&gpslimit=15&prop=pageimages&piprop=thumbnail&pithumbsize=80&pilimit=15&redirects=&list=prefixsearch&pssearch=ra&pslimit=15   BadMethodCallException from line 266 of /srv/mediawiki/php-1.27.0-wmf.2/includes/PrefixSearch.php: Call to a member function getPrefixedText() on a non-object (NULL) {"exception_id":"d7701601"} 
[Exception BadMethodCallException] (/srv/mediawiki/php-1.27.0-wmf.2/includes/PrefixSearch.php:266) Call to a member function getPrefixedText() on a non-object (NULL)
  #0 /srv/mediawiki/php-1.27.0-wmf.2/includes/PrefixSearch.php(242): PrefixSearch->getRedirectTarget(Title)
  #1 /srv/mediawiki/php-1.27.0-wmf.2/includes/PrefixSearch.php(202): PrefixSearch->redirectTargetsToRedirect(array)
  #2 /srv/mediawiki/php-1.27.0-wmf.2/includes/PrefixSearch.php(164): PrefixSearch->handleResultFromHook(array, array, string, integer)
  #3 /srv/mediawiki/php-1.27.0-wmf.2/includes/PrefixSearch.php(70): PrefixSearch->searchBackend(array, string, integer, integer)
  #4 /srv/mediawiki/php-1.27.0-wmf.2/includes/PrefixSearch.php(98): PrefixSearch->search(string, integer, array, integer)
  #5 /srv/mediawiki/php-1.27.0-wmf.2/includes/api/ApiQueryPrefixSearch.php(49): PrefixSearch->searchWithVariants(string, integer, array, integer)
  #6 /srv/mediawiki/php-1.27.0-wmf.2/includes/api/ApiQueryPrefixSearch.php(35): ApiQueryPrefixSearch->run(ApiPageSet)
  #7 /srv/mediawiki/php-1.27.0-wmf.2/includes/api/ApiPageSet.php(173): ApiQueryPrefixSearch->executeGenerator(ApiPageSet)
  #8 /srv/mediawiki/php-1.27.0-wmf.2/includes/api/ApiPageSet.php(137): ApiPageSet->executeInternal(boolean)
  #9 /srv/mediawiki/php-1.27.0-wmf.2/includes/api/ApiQuery.php(271): ApiPageSet->execute()
  #10 /srv/mediawiki/php-1.27.0-wmf.2/includes/api/ApiMain.php(1270): ApiQuery->execute()
  #11 /srv/mediawiki/php-1.27.0-wmf.2/includes/api/ApiMain.php(466): ApiMain->executeAction()
  #12 /srv/mediawiki/php-1.27.0-wmf.2/includes/api/ApiMain.php(438): ApiMain->executeActionWithErrorHandling()
  #13 /srv/mediawiki/php-1.27.0-wmf.2/api.php(88): ApiMain->execute()
  #14 /srv/mediawiki/w/api.php(3): include(string)

Event Timeline

aude raised the priority of this task from to Needs Triage.
aude updated the task description. (Show Details)
aude subscribed.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Anomie subscribed.

Nothing to do with the API here beyond the fact that the problematic search code is being accessed via the API.

demon raised the priority of this task from Medium to High.Oct 26 2015, 5:27 PM

Change 248935 had a related patch set uploaded (by Chad):
PrefixSearch: avoid looking for titles that don't exist

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

Change 248935 merged by jenkins-bot:
PrefixSearch: avoid looking for titles that don't exist

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

Krinkle claimed this task.