Last modified: 2014-09-23 19:33:33 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 T44145, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 42145 - Catchable fatal error: Argument 2 passed to Parser::parse() must be an instance of Title, null given, called in /www/dev.translatewiki.net/w/includes/OutputPage.php on line 1484
Catchable fatal error: Argument 2 passed to Parser::parse() must be an instan...
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
ConfirmEdit (CAPTCHA extension) (Other open bugs)
master
All All
: High critical (vote)
: ---
Assigned To: Nobody - You can work on this!
: code-update-regression
Depends on:
Blocks: code_quality
  Show dependency treegraph
 
Reported: 2012-11-15 06:40 UTC by Niklas Laxström
Modified: 2014-09-23 19:33 UTC (History)
9 users (show)

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


Attachments

Description Niklas Laxström 2012-11-15 06:40:22 UTC
make safe
php phpunit.php --configuration /www/dev.translatewiki.net/w/tests/phpunit/suite.xml  --exclude-group Broken,ParserFuzz,Destructive,Stub
PHPUnit 3.7.8 by Sebastian Bergmann.

Configuration read from /www/dev.translatewiki.net/w/tests/phpunit/suite.xml

E.................SSSSS.....F
Fatal error: Cannot redeclare class SiteStats in /www/dev.translatewiki.net/w/includes/SiteStats.php on line 26
make: *** [safe] Error 255
Comment 1 Krinkle 2012-11-15 08:47:18 UTC
* There is only one match for declaration of class SiteStats in mediawiki/core (namely includes/SiteStats.php)
* The file is in AutoLoader
* The file is not manually included from anywhere else

So I can only guess this is a fault in an extension or local settings?
Comment 2 Niklas Laxström 2012-11-15 09:52:00 UTC
Maybe it was APC. Now the error is different:

twn:/www/dev.translatewiki.net/w/tests/phpunit (master)$ make safe
php phpunit.php --configuration /www/dev.translatewiki.net/w/tests/phpunit/suite.xml  --exclude-group Broken,ParserFuzz,Destructive,Stub
PHPUnit 3.7.8 by Sebastian Bergmann.

Configuration read from /www/dev.translatewiki.net/w/tests/phpunit/suite.xml

..................SSSSS.....FFFFF.
Catchable fatal error: Argument 2 passed to Parser::parse() must be an instance of Title, null given, called in /www/dev.translatewiki.net/w/includes/OutputPage.php on line 1484 and defined in /www/dev.translatewiki.net/w/includes/parser/Parser.php on line 346
make: *** [safe] Error 255
Comment 3 Niklas Laxström 2012-11-15 15:38:39 UTC
Git bisect gives I8f23c6535f7b3ee6462d9c5a19dd06070e77f9d1 as the cause.
Comment 4 Daniel Kinzler 2012-11-15 15:48:11 UTC
I8f23c6535 Introduces new tests for EditPage. It does not touch existing code. I have no idea how that could cause this bug.
Comment 5 Antoine "hashar" Musso (WMF) 2012-11-15 19:52:12 UTC
Can you possibly catch the error and give out a full stack trace?

Also it would be helpful to get the name of test failing. Either look it up in the debug log or catch the error and dump a stack trace.
Comment 6 Niklas Laxström 2012-11-15 20:38:14 UTC
/www/dev.translatewiki.net/w/includes/OutputPage.php:1475
/www/dev.translatewiki.net/w/includes/OutputPage.php:1426
/www/dev.translatewiki.net/w/extensions/ConfirmEdit/Captcha.php:59
/www/dev.translatewiki.net/w/includes/EditPage.php:2049
/www/dev.translatewiki.net/w/extensions/ConfirmEdit/Captcha.php:472
/www/dev.translatewiki.net/w/extensions/ConfirmEdit/Captcha.php:485
/www/dev.translatewiki.net/w/extensions/ConfirmEdit/ConfirmEditHooks.php:23
/www/dev.translatewiki.net/w/includes/Hooks.php:253
/www/dev.translatewiki.net/w/includes/GlobalFunctions.php:3815
/www/dev.translatewiki.net/w/includes/EditPage.php:1389
/www/dev.translatewiki.net/w/tests/phpunit/includes/EditPageTest.php:151
/www/dev.translatewiki.net/w/tests/phpunit/includes/EditPageTest.php:393
/www/dev.translatewiki.net/w/tests/phpunit/MediaWikiTestCase.php:87
/www/dev.translatewiki.net/w/tests/phpunit/MediaWikiPHPUnitCommand.php:45

Was a bit tricky to catch because of bug 41491.
Comment 7 Daniel Kinzler 2012-11-15 21:16:26 UTC
So... the edit page test fails if it triggers a captcha?
Comment 8 Niklas Laxström 2012-11-19 21:14:52 UTC
Looks like it.
Comment 9 Antoine "hashar" Musso (WMF) 2012-11-22 08:17:44 UTC
Since that seems to be caused by ConfirmEdit extension, I am changing the component.
Comment 10 Niklas Laxström 2012-11-22 09:09:57 UTC
Given it was introduced in https://gerrit.wikimedia.org/r/#/c/29973/ I was hoping we could find fixers from there. In any case this bug should be assigned to someone asap.
Comment 11 Sumana Harihareswara 2012-12-10 20:50:02 UTC
leucosticte and Martineznovo, could you take a look at this?
Comment 12 Jesús Martínez Novo (Ciencia Al Poder) 2012-12-10 21:55:11 UTC
Sorry Sumana but I know nothing about this, I can't help :(

[removing myself from cc]
Comment 13 db [inactive,noenotif] 2013-01-18 20:17:56 UTC
Setting $wgTitle in EditPageTest::assertEdit works, but sounds not like a real solution

You need one of:

$wgCaptchaTriggers['edit'] = true;
$wgCaptchaTriggers['create'] = true;

to trigger the error (now the exception)
Comment 14 Nemo 2014-06-17 15:10:28 UTC
(In reply to db from comment #13)
> Setting $wgTitle in EditPageTest::assertEdit works, but sounds not like a
> real solution
> 
> You need one of:
> 
> $wgCaptchaTriggers['edit'] = true;
> $wgCaptchaTriggers['create'] = true;

So we should just set $wgCaptchaTriggers false in EditPageTest::assertEdit, as that's what the test currently assumes. Right?

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


Navigation
Links