Page MenuHomePhabricator

wfFindFile fails without instant commons
Closed, DeclinedPublic

Description

Author: physik

Description:
I was trying to use the extension DumpHTML to export pages to MediaWiki.
During this process I did not want that images are fetched from Commons.
Therefore I set $wgUseInstantCommons = false;.

Unfortunately this lead to an error with the File Cache.
RepoGroup->findFile() tries to access the file property which was empty for me.

Fatal error: Call to a member function has() on a non-object in /vagrant/mediawiki/includes/filerepo/RepoGroup.php on line 141

Call Stack:

0.0006     234096   1. {main}() /var/www/w/MWScript.php:0
0.0110     306144   2. require_once('/vagrant/mediawiki/extensions/DumpHTML/dumpHTML.php') /var/www/w/MWScript.php:89
0.4130   10757072   3. DumpHTML->doEverything() /vagrant/mediawiki/extensions/DumpHTML/dumpHTML.php:153
0.4131   10757616   4. DumpHTML->doArticles() /vagrant/mediawiki/extensions/DumpHTML/dumpHTML.inc:149
1.3381   21948736   5. DumpHTML->doArticle() /vagrant/mediawiki/extensions/DumpHTML/dumpHTML.inc:210
1.3381   21948736   6. DumpHTML->getArticleHTML() /vagrant/mediawiki/extensions/DumpHTML/dumpHTML.inc:490
1.3384   21950280   7. Article->render() /vagrant/mediawiki/extensions/DumpHTML/dumpHTML.inc:818
1.3385   21950376   8. Article->view() /vagrant/mediawiki/includes/page/Article.php:1540
1.3492   21977064   9. PoolCounterWork->execute() /vagrant/mediawiki/includes/page/Article.php:688
1.3492   21977328  10. PoolWorkArticleView->doWork() /vagrant/mediawiki/includes/poolcounter/PoolCounterWork.php:123
1.3493   21977568  11. AbstractContent->getParserOutput() /vagrant/mediawiki/includes/poolcounter/PoolWorkArticleView.php:139
1.3493   21978472  12. WikitextContent->fillParserOutput() /vagrant/mediawiki/includes/content/AbstractContent.php:486
1.3494   21978664  13. Parser->parse() /vagrant/mediawiki/includes/content/WikitextContent.php:327
1.3497   21995800  14. Parser->internalParse() /vagrant/mediawiki/includes/parser/Parser.php:405
1.4070   22026064  15. Parser->replaceInternalLinks() /vagrant/mediawiki/includes/parser/Parser.php:1262
1.4070   22032944  16. Parser->replaceInternalLinks2() /vagrant/mediawiki/includes/parser/Parser.php:1866
1.4218   22436672  17. Parser->makeImage() /vagrant/mediawiki/includes/parser/Parser.php:2139
1.4218   22438080  18. Parser->fetchFileAndTitle() /vagrant/mediawiki/includes/parser/Parser.php:5466
1.4218   22438136  19. Parser->fetchFileNoRegister() /vagrant/mediawiki/includes/parser/Parser.php:3937
1.4218   22438184  20. wfFindFile() /vagrant/mediawiki/includes/parser/Parser.php:3967
1.4218   22438504  21. RepoGroup->findFile() /vagrant/mediawiki/includes/GlobalFunctions.php:3661

Version: 1.24rc
Severity: minor

Details

Reference
bz70270

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:42 AM
bzimport set Reference to bz70270.
bzimport added a subscriber: Unknown Object (MLST).

Change 157760 had a related patch set uploaded by Physikerwelt:
Check if file cache exist before accessing it.

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

Physikerwelt lowered the priority of this task from Medium to Lowest.Apr 10 2015, 6:11 PM
Physikerwelt set Security to None.
Physikerwelt subscribed.

I'm not planning to use the extension DumpHTML anytime in the future, so there might be no need to fix it. (Unless anyone else needs it.)

Zabe subscribed.

Code has changed a lot, the DumpHTML extensions has been archived. If someone is still able to reproduce the error, feel free to reopen.