Last modified: 2014-03-25 10:47:31 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 T65015, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 63015 - SpamBlacklist hook causes Wikibase LinkTitle api phpunit tests to fail
SpamBlacklist hook causes Wikibase LinkTitle api phpunit tests to fail
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
master
All All
: High normal (vote)
: ---
Assigned To: Wikidata bugs
u=dev c=backend p=0
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-24 16:25 UTC by Aude
Modified: 2014-03-25 10:47 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Aude 2014-03-24 16:25:13 UTC
This issue might go away when we decouple entity content and the api more, but the issue can still occur with new entities.  A solution should be found.

EditEntity uses RequestContext::getMain() in case of a new entity. If entity is created via a special page, then special page is the title.  If entity is created via the api, then Title (including $wgTitle, which request context uses as fallback) is null and has potential to cause issues.

Catchable fatal error: Argument 1 passed to Wikibase\EntityContent::getParserOutput() must be an instance of Title, null given, called in /Library/WebServer/Documents/php-master/extensions/SpamBlacklist/SpamBlacklistHooks.php on line 28 and defined in /Library/WebServer/Documents/php-master/extensions/Wikibase/repo/includes/content/EntityContent.php on line 142

Call Stack:
    0.0004     671968   1. {main}() /Library/WebServer/Documents/php-master/tests/phpunit/phpunit.php:0
    0.0763   18376552   2. MediaWikiPHPUnitCommand::main() /Library/WebServer/Documents/php-master/tests/phpunit/phpunit.php:116
    0.0764   18389232   3. MediaWikiPHPUnitCommand->run() /Library/WebServer/Documents/php-master/tests/phpunit/MediaWikiPHPUnitCommand.php:64
    0.0764   18389280   4. PHPUnit_TextUI_Command->run() /Library/WebServer/Documents/php-master/tests/phpunit/MediaWikiPHPUnitCommand.php:80
    0.1002   22719232   5. PHPUnit_TextUI_TestRunner->doRun() /opt/local/lib/php/pear/PHPUnit/TextUI/Command.php:176
    0.1032   23221488   6. PHPUnit_Framework_TestSuite->run() /opt/local/lib/php/pear/PHPUnit/TextUI/TestRunner.php:349
    0.1033   23222328   7. PHPUnit_Framework_TestSuite->run() /opt/local/lib/php/pear/PHPUnit/Framework/TestSuite.php:705
    3.5036   65873376   8. PHPUnit_Framework_TestSuite->runTest() /opt/local/lib/php/pear/PHPUnit/Framework/TestSuite.php:745
    3.5036   65873376   9. MediaWikiTestCase->run() /opt/local/lib/php/pear/PHPUnit/Framework/TestSuite.php:775
    3.5052   65873296  10. PHPUnit_Framework_TestCase->run() /Library/WebServer/Documents/php-master/tests/phpunit/MediaWikiTestCase.php:134
    3.5052   65873296  11. PHPUnit_Framework_TestResult->run() /opt/local/lib/php/pear/PHPUnit/Framework/TestCase.php:783
    3.5053   65874288  12. PHPUnit_Framework_TestCase->runBare() /opt/local/lib/php/pear/PHPUnit/Framework/TestResult.php:648
    3.5500   65927392  13. PHPUnit_Framework_TestCase->runTest() /opt/local/lib/php/pear/PHPUnit/Framework/TestCase.php:838
    3.5500   65929016  14. ReflectionMethod->invokeArgs() /opt/local/lib/php/pear/PHPUnit/Framework/TestCase.php:983
    3.5500   65929048  15. Wikibase\Test\Api\LinkTitlesTest->testLinkTitles() /opt/local/lib/php/pear/PHPUnit/Framework/TestCase.php:983
    3.5500   65929832  16. Wikibase\Test\Api\WikibaseApiTestCase->doApiRequestWithToken() /Library/WebServer/Documents/php-master/extensions/Wikibase/repo/tests/phpunit/includes/api/LinkTitlesTest.php:60
    3.5526   65994224  17. ApiTestCase->doApiRequest() /Library/WebServer/Documents/php-master/extensions/Wikibase/repo/tests/phpunit/includes/api/WikibaseApiTestCase.php:75
    3.5529   66045504  18. ApiMain->execute() /Library/WebServer/Documents/php-master/tests/phpunit/includes/api/ApiTestCase.php:97
    3.5529   66045552  19. ApiMain->executeAction() /Library/WebServer/Documents/php-master/includes/api/ApiMain.php:332
    3.5620   66112600  20. Wikibase\Api\LinkTitles->execute() /Library/WebServer/Documents/php-master/includes/api/ApiMain.php:899
    3.5641   66140664  21. Wikibase\Api\LinkTitles->getAttemptSaveStatus() /Library/WebServer/Documents/php-master/extensions/Wikibase/repo/includes/api/LinkTitles.php:124
    3.5641   66140664  22. Wikibase\Api\ApiWikibase->attemptSaveEntity() /Library/WebServer/Documents/php-master/extensions/Wikibase/repo/includes/api/LinkTitles.php:157
    3.5650   66145512  23. Wikibase\EditEntity->attemptSave() /Library/WebServer/Documents/php-master/extensions/Wikibase/repo/includes/api/ApiWikibase.php:589
    3.5699   66146664  24. Wikibase\EditEntity->runEditFilterHooks() /Library/WebServer/Documents/php-master/extensions/Wikibase/repo/includes/EditEntity.php:698
    3.5699   66149296  25. wfRunHooks() /Library/WebServer/Documents/php-master/extensions/Wikibase/repo/includes/EditEntity.php:767
    3.5699   66149344  26. Hooks::run() /Library/WebServer/Documents/php-master/includes/GlobalFunctions.php:4011
    3.5700   66150672  27. call_user_func_array:{/Library/WebServer/Documents/php-master/includes/Hooks.php:206}() /Library/WebServer/Documents/php-master/includes/Hooks.php:206
    3.5700   66151480  28. SpamBlacklistHooks::filterMergedContent() /Library/WebServer/Documents/php-master/includes/Hooks.php:206
    3.5700   66151528  29. Wikibase\EntityContent->getParserOutput() /Library/WebServer/Documents/php-master/extensions/SpamBlacklist/SpamBlacklistHooks.php:28

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


Navigation
Links