Last modified: 2014-04-29 22:08:29 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T64467, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 62467 - maint script importTextFile.php doesn't set the title for the context
maint script importTextFile.php doesn't set the title for the context
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Export/Import (Other open bugs)
1.23.0
All All
: Normal normal (vote)
: ---
Assigned To: Mark A. Hershberger
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-10 02:16 UTC by Mark A. Hershberger
Modified: 2014-04-29 22:08 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---
legoktm.wikipedia: Backport_to_Stable+


Attachments

Description Mark A. Hershberger 2014-03-10 02:16:42 UTC
If a parserhook tries to get the title from the request context (as the UserFunctions extension does) then that will cause importTextFile.php to fail:

PHP Fatal error:  Call to a member function getNamespace() on a non-object in /vagrant/mediawiki/extensions/UserFunctions/UserFunctions.php on line 84
PHP Stack trace:
PHP   1. {main}() /vagrant/mediawiki/maintenance/importTextFile.php:0
PHP   2. WikiPage->doEdit() /vagrant/mediawiki/maintenance/importTextFile.php:61
PHP   3. WikiPage->prepareTextForEdit() /vagrant/mediawiki/includes/WikiPage.php:1290
PHP   4. Parser->preSaveTransform() /vagrant/mediawiki/includes/WikiPage.php:1520
PHP   5. Parser->startParse() /vagrant/mediawiki/includes/parser/Parser.php:4305
PHP   6. Parser->clearState() /vagrant/mediawiki/includes/parser/Parser.php:4552
PHP   7. Parser->firstCallInit() /vagrant/mediawiki/includes/parser/Parser.php:249
PHP   8. wfRunHooks() /vagrant/mediawiki/includes/parser/Parser.php:237
PHP   9. Hooks::run() /vagrant/mediawiki/includes/GlobalFunctions.php:3859
PHP  10. call_user_func_array:{/vagrant/mediawiki/includes/Hooks.php:216}() /vagrant/mediawiki/includes/Hooks.php:216
PHP  11. UserFunctions_HookStub->registerParser() /vagrant/mediawiki/includes/Hooks.php:216

This can be fixed by calling RequestContext::getMain()->setTitle( $title ) at the right place.
Comment 1 Gerrit Notification Bot 2014-03-10 02:17:44 UTC
Change 117816 had a related patch set uploaded by MarkAHershberger:
Set a title for the context during import on the cli

https://gerrit.wikimedia.org/r/117816
Comment 2 Mark A. Hershberger 2014-03-10 12:15:15 UTC
Note that I would like to get this backported
Comment 3 Gerrit Notification Bot 2014-03-12 21:40:00 UTC
Change 117816 merged by jenkins-bot:
Set a title for the context during import on the cli

https://gerrit.wikimedia.org/r/117816
Comment 4 Gerrit Notification Bot 2014-03-22 22:20:51 UTC
Change 120319 had a related patch set uploaded by MarkAHershberger:
Set a title for the context during import on the cli

https://gerrit.wikimedia.org/r/120319
Comment 5 Gerrit Notification Bot 2014-03-22 22:21:16 UTC
Change 120320 had a related patch set uploaded by MarkAHershberger:
Set a title for the context during import on the cli

https://gerrit.wikimedia.org/r/120320
Comment 6 Gerrit Notification Bot 2014-03-22 22:22:03 UTC
Change 120321 had a related patch set uploaded by MarkAHershberger:
Set a title for the context during import on the cli

https://gerrit.wikimedia.org/r/120321
Comment 7 Mark A. Hershberger 2014-03-22 22:28:28 UTC
patch against core has been merged.  I've cherry picked the backports and am adding Markus as CC so he can merge them during this month's point release.
Comment 8 Gerrit Notification Bot 2014-03-26 14:59:44 UTC
Change 120319 merged by jenkins-bot:
Set a title for the context during import on the cli

https://gerrit.wikimedia.org/r/120319
Comment 9 Gerrit Notification Bot 2014-03-26 21:09:00 UTC
Change 120320 merged by Mglaser:
Set a title for the context during import on the cli

https://gerrit.wikimedia.org/r/120320
Comment 10 Gerrit Notification Bot 2014-03-26 21:25:20 UTC
Change 120321 merged by Mglaser:
Set a title for the context during import on the cli

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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links