Steps to reproduce
- Install MW 1.39
- Download REL1_39 from ExtensionDistributor and install: https://extdist.wmflabs.org/dist/extensions/Editcount-REL1_39-6a830ed.tar.gz
- Go to Special:EditCount
- Enter a user name
Expected behavior
The extension outputs the edit count
Observed behavior
[84be554544b78ec19e67b424] /wiki/Special:Editcount Error: Call to undefined method Wikimedia\Rdbms\LBFactorySimple::getReplicaDatabase()
Backtrace:
from /var/www/html/extensions/Editcount/src/Editcount.php(71)
#0 /var/www/html/extensions/Editcount/src/Editcount.php(39): Editcount->editsByNs()
#1 /var/www/html/includes/specialpage/SpecialPage.php(701): Editcount->execute()
#2 /var/www/html/includes/specialpage/SpecialPageFactory.php(1428): SpecialPage->run()
#3 /var/www/html/includes/MediaWiki.php(316): MediaWiki\SpecialPage\SpecialPageFactory->executePath()
#4 /var/www/html/includes/MediaWiki.php(904): MediaWiki->performRequest()
#5 /var/www/html/includes/MediaWiki.php(562): MediaWiki->main()
#6 /var/www/html/index.php(50): MediaWiki->run()
#7 /var/www/html/index.php(46): wfIndexMain()
#8 {main}Confirmed the REL1_39 extension uses the missing function:
$ grep -niR getReplicaDatabase Editcount Editcount/src/Editcount.php:71: $dbr = MediaWikiServices::getInstance()->getDBLoadBalancerFactory()->getReplicaDatabase(); Editcount/src/Editcount.php:103: $dbr = MediaWikiServices::getInstance()->getDBLoadBalancerFactory()->getReplicaDatabase();
Workarounds
- Manually downgrade the extension to a previous version
- Upgrade from LTS 1.39 to stable 1.41 or master? (not tested)