Internal Error on MediaWiki 1.35.5
Closed this issue ยท 3 comments
Info:
- QuickInstantCommons version: 1.5 (from Master)
- MediaWiki version 1.35.5
- PHP 7.3.31
After installing the extension on MediaWiki 1.35.5 I found out that if I open an image file page on the wiki with a commons image that the page returned an internal error.
[ad189f7df9a22f4626725604] /wiki/Datei:Monmouthshire_Hundreds.jpg TypeError from line 445 of /var/www/mywiki/htdocs/extensions/QuickInstantCommons/src/File.php: Argument 2 passed to MediaWiki\Extension\QuickInstantCommons\File::getDescription() must be an instance of MediaWiki\Permissions\Authority or null, instance of User given, called in /var/www/mywiki/htdocs/includes/page/ImageHistoryList.php on line 130
Backtrace:
#0 /var/www/mywiki/htdocs/includes/page/ImageHistoryList.php(130): MediaWiki\Extension\QuickInstantCommons\File->getDescription(integer, User)
#1 /var/www/mywiki/htdocs/includes/page/ImageHistoryPseudoPager.php(128): ImageHistoryList->imageHistoryLine(boolean, MediaWiki\Extension\QuickInstantCommons\File)
#2 /var/www/mywiki/htdocs/includes/page/ImagePage.php(811): ImageHistoryPseudoPager->getBody()
#3 /var/www/mywiki/htdocs/includes/page/ImagePage.php(177): ImagePage->imageHistory()
#4 /var/www/mywiki/htdocs/includes/actions/ViewAction.php(80): ImagePage->view()
#5 /var/www/mywiki/htdocs/includes/MediaWiki.php(532): ViewAction->show()
#6 /var/www/mywiki/htdocs/includes/MediaWiki.php(313): MediaWiki->performAction(ImagePage, Title)
#7 /var/www/mywiki/htdocs/includes/MediaWiki.php(945): MediaWiki->performRequest()
#8 /var/www/mywiki/htdocs/includes/MediaWiki.php(548): MediaWiki->main()
#9 /var/www/mywiki/htdocs/index.php(53): MediaWiki->run()
#10 /var/www/mywiki/htdocs/index.php(46): wfIndexMain()
#11 {main}
This only seems to occur on MediaWiki 1.35.5. I could reproduce the error on a fresh installed MediaWiki 1.35.5. After Upgrade to MediaWiki 1.36.3 it works fine.
On the extension page on mediawiki.org the recommend MediaWiki version is >= 1.35 to use this extension. 1.35 is also LTS version so which is why it might be worth fixing the error.
Thx
@bawolff Can you confirm if the extension is compatible with 1.35.x (LTS release)? The extension would fix some severe performance issues we have on wiki.openstreetmap.org , but I extension caused exceptions as detailed above, had to remove it.
1.35 isn't listed here: https://www.mediawiki.org/wiki/Special:ExtensionDistributor/QuickInstantCommons (missing git branch)
Hi,
I think mw 1.35 was from before this extension developed, so it wasn't tested with it. That said i will take a look, it is probably an easy fix.
P.s. for future reference, the official bugtracker for this project is https://phabricator.wikimedia.org . Github issues aren't really monitored.
This is fixed now. There is a REL1_35 branch which is compatible with 1.35, and extension.json has been updated for the other branches to note that 1.36 is the min version.