Page MenuHomePhabricator

QuizGame: Call to undefined method Wikimedia\Rdbms\DatabaseMysqli
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Install and enable QuizGame
  • Navigate to Special:QuizGameHome

What happens?:

Call to undefined method Wikimedia\Rdbms\DatabaseMysqli::useIndexClause()
from /srv/mediawiki/w/includes/libs/rdbms/database/DBConnRef.php(103)
#0 /srv/mediawiki/w/extensions/QuizGame/includes/specials/SpecialQuizGameHome.php(191): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#1 /srv/mediawiki/w/extensions/QuizGame/includes/specials/SpecialQuizGameHome.php(884): QuizGameHome->getNextQuestion()
#2 /srv/mediawiki/w/extensions/QuizGame/includes/specials/SpecialQuizGameHome.php(126): QuizGameHome->launchGame()
#3 /srv/mediawiki/w/includes/specialpage/SpecialPage.php(701): QuizGameHome->execute(NULL)
#4 /srv/mediawiki/w/includes/specialpage/SpecialPageFactory.php(1428): SpecialPage->run(NULL)
#5 /srv/mediawiki/w/includes/MediaWiki.php(316): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#6 /srv/mediawiki/w/includes/MediaWiki.php(904): MediaWiki->performRequest()
#7 /srv/mediawiki/w/includes/MediaWiki.php(562): MediaWiki->main()
#8 /srv/mediawiki/w/index.php(50): MediaWiki->run()
#9 /srv/mediawiki/w/index.php(46): wfIndexMain()
#10 {main}

What should have happened instead?:
Page should've worked as intended

Software version (skip for WMF-hosted wikis like Wikipedia):
Product Version
MediaWiki 1.39.0-rc.1 (d502ed1)
PHP 7.4.30 (fpm-fcgi)
MariaDB 10.5.17-MariaDB-1:10.5.17+maria~deb11-log

Other information (browser name/version, screenshots, etc.):

Event Timeline

@Ladsgroup So while investigating this ticket I stumbled upon T307616 and your dd9b44b167141, which removed the useIndexClause method but it looks like it was accidental as there was no mention of it in the commit message, and the method was neither deprecated nor marked as private. Can you confirm whether this was truly the case, and if so, could the method be added back to the relevant core class in order to fix this issue? Thanks!

@Ladsgroup So while investigating this ticket I stumbled upon T307616 and your dd9b44b167141, which removed the useIndexClause method but it looks like it was accidental as there was no mention of it in the commit message, and the method was neither deprecated nor marked as private. Can you confirm whether this was truly the case, and if so, could the method be added back to the relevant core class in order to fix this issue? Thanks!

Oh. Thanks for finding that also, I looked for about 30 minutes yesterday and couldn't find where it was removed as I couldn't find any mention either.

Change 879096 had a related patch set uploaded (by Universal Omega; author: Universal Omega):

[mediawiki/extensions/QuizGame@master] SpecialQuizGameHome: Remove usage of useIndexClause()

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

Change 879096 merged by Universal Omega:

[mediawiki/extensions/QuizGame@master] SpecialQuizGameHome: Remove usage of useIndexClause()

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