Page MenuHomePhabricator

MW 1.26wmf24 shows BadMethodCallException instead of (Enhanced) Watchlist
Closed, DuplicatePublic

Description

I'm getting a blank page with

Exception encountered, of type "BadMethodCallException"

at https://www.mediawiki.org/wiki/Special:Watchlist, using Firefox 41.0 (the pages Special:RecentChanges and Special:RecentChangesLinked works fine).

Reloading the page doesn't fix the issue, but disabling the "usenewrc" preference makes the error go away.

Event Timeline

He7d3r raised the priority of this task from to Needs Triage.
He7d3r updated the task description. (Show Details)
He7d3r added a project: MediaWiki-Watchlist.
He7d3r subscribed.
He7d3r triaged this task as Unbreak Now! priority.Sep 22 2015, 9:53 PM
He7d3r set Security to None.

cannot reproduce with my own watchlist

hoo subscribed.

Probably:

2015-09-22 21:53:35 mw1183 mediawikiwiki exception ERROR: [c710fdf0] /wiki/Special:Watchlist   BadMethodCallException from line 499 of /srv/mediawiki/php-1.26wmf24/includes/changes/EnhancedChangesList.php: Call to a member function getTitle() on a non-object (NULL) {"exception_id":"c710fdf0"}
[Exception BadMethodCallException] (/srv/mediawiki/php-1.26wmf24/includes/changes/EnhancedChangesList.php:499) Call to a member function getTitle() on a non-object (NULL)
  #0 /srv/mediawiki/php-1.26wmf24/includes/changes/EnhancedChangesList.php(287): EnhancedChangesList->getLogText(array, array, boolean, boolean, boolean)
  #1 /srv/mediawiki/php-1.26wmf24/includes/changes/EnhancedChangesList.php(683): EnhancedChangesList->recentChangesBlockGroup(array)
  #2 /srv/mediawiki/php-1.26wmf24/includes/changes/EnhancedChangesList.php(103): EnhancedChangesList->recentChangesBlock()
  #3 /srv/mediawiki/php-1.26wmf24/includes/specials/SpecialWatchlist.php(381): EnhancedChangesList->recentChangesLine(RecentChange, string)
  #4 /srv/mediawiki/php-1.26wmf24/includes/specialpage/ChangesListSpecialPage.php(348): SpecialWatchlist->outputChangesList(ResultWrapper, FormOptions)
  #5 /srv/mediawiki/php-1.26wmf24/includes/specialpage/ChangesListSpecialPage.php(77): ChangesListSpecialPage->webOutput(ResultWrapper, FormOptions)
  #6 /srv/mediawiki/php-1.26wmf24/includes/specials/SpecialWatchlist.php(79): ChangesListSpecialPage->execute(NULL)
  #7 /srv/mediawiki/php-1.26wmf24/includes/specialpage/SpecialPage.php(384): SpecialWatchlist->execute(NULL)
  #8 /srv/mediawiki/php-1.26wmf24/includes/specialpage/SpecialPageFactory.php(553): SpecialPage->run(NULL)
  #9 /srv/mediawiki/php-1.26wmf24/includes/MediaWiki.php(249): SpecialPageFactory::executePath(Title, RequestContext)
  #10 /srv/mediawiki/php-1.26wmf24/includes/MediaWiki.php(682): MediaWiki->performRequest()
  #11 /srv/mediawiki/php-1.26wmf24/includes/MediaWiki.php(476): MediaWiki->main()
  #12 /srv/mediawiki/php-1.26wmf24/index.php(41): MediaWiki->run()
  #13 /srv/mediawiki/w/index.php(3): include(string)
  #14 {main}
He7d3r renamed this task from BadMethodCallException instead of Watchlist to BadMethodCallException instead of (Enhanced) Watchlist.Sep 22 2015, 10:00 PM
He7d3r updated the task description. (Show Details)
He7d3r renamed this task from BadMethodCallException instead of (Enhanced) Watchlist to MW 1.26wmf24 shows BadMethodCallException instead of (Enhanced) Watchlist.Sep 22 2015, 10:09 PM

might be related to T112738 though i am not able to reproduce this

Probably:

2015-09-22 21:53:35 mw1183 mediawikiwiki exception ERROR: [c710fdf0] /wiki/Special:Watchlist   BadMethodCallException from line 499 of /srv/mediawiki/php-1.26wmf24/includes/changes/EnhancedChangesList.php: Call to a member function getTitle() on a non-object (NULL) {"exception_id":"c710fdf0"}
[Exception BadMethodCallException] (/srv/mediawiki/php-1.26wmf24/includes/changes/EnhancedChangesList.php:499) Call to a member function getTitle() on a non-object (NULL)
  #0 /srv/mediawiki/php-1.26wmf24/includes/changes/EnhancedChangesList.php(287): EnhancedChangesList->getLogText(array, array, boolean, boolean, boolean)
  #1 /srv/mediawiki/php-1.26wmf24/includes/changes/EnhancedChangesList.php(683): EnhancedChangesList->recentChangesBlockGroup(array)
  #2 /srv/mediawiki/php-1.26wmf24/includes/changes/EnhancedChangesList.php(103): EnhancedChangesList->recentChangesBlock()
  #3 /srv/mediawiki/php-1.26wmf24/includes/specials/SpecialWatchlist.php(381): EnhancedChangesList->recentChangesLine(RecentChange, string)
  #4 /srv/mediawiki/php-1.26wmf24/includes/specialpage/ChangesListSpecialPage.php(348): SpecialWatchlist->outputChangesList(ResultWrapper, FormOptions)
  #5 /srv/mediawiki/php-1.26wmf24/includes/specialpage/ChangesListSpecialPage.php(77): ChangesListSpecialPage->webOutput(ResultWrapper, FormOptions)
  #6 /srv/mediawiki/php-1.26wmf24/includes/specials/SpecialWatchlist.php(79): ChangesListSpecialPage->execute(NULL)
  #7 /srv/mediawiki/php-1.26wmf24/includes/specialpage/SpecialPage.php(384): SpecialWatchlist->execute(NULL)
  #8 /srv/mediawiki/php-1.26wmf24/includes/specialpage/SpecialPageFactory.php(553): SpecialPage->run(NULL)
  #9 /srv/mediawiki/php-1.26wmf24/includes/MediaWiki.php(249): SpecialPageFactory::executePath(Title, RequestContext)
  #10 /srv/mediawiki/php-1.26wmf24/includes/MediaWiki.php(682): MediaWiki->performRequest()
  #11 /srv/mediawiki/php-1.26wmf24/includes/MediaWiki.php(476): MediaWiki->main()
  #12 /srv/mediawiki/php-1.26wmf24/index.php(41): MediaWiki->run()
  #13 /srv/mediawiki/w/index.php(3): include(string)
  #14 {main}

I think it is

Just seen

Notice: Undefined index: 0 in /srv/mediawiki/php-1.26wmf24/includes/changes/EnhancedChangesList.php on line 490
Notice: Undefined index: -1 in /srv/mediawiki/php-1.26wmf24/includes/changes/EnhancedChangesList.php on line 491
Notice: Undefined variable: rcObj in /srv/mediawiki/php-1.26wmf24/includes/changes/EnhancedChangesList.php on line 493

I think that explains the error

https://github.com/wikimedia/mediawiki/blob/master/includes/changes/EnhancedChangesList.php#L498

Which I suspect means the empty() call at https://github.com/wikimedia/mediawiki/blob/master/includes/changes/EnhancedChangesList.php#L460-L462 isn't doing anything

Already CC'd @matthiasmullie who has been changing code around this, and also added the empty above