Page MenuHomePhabricator

Special:MyPage, Special:MyTalk, and Special:MyContributions return fatal error
Closed, ResolvedPublic

Description

MediaWiki 1.23.12, accessing Special:MyPage, Special:MyTalk, or Special:MyContributions returns:

Fatal error: Call to a member function get() on a non-object in /includes/Wiki.php on line 250

Fatal error: Call to undefined method DerivativeRequest::setRequestURL() in /includes/Wiki.php on line 259

Fatal error: Call to undefined method OutputPage::lowerCdnMaxage() in /includes/Wiki.php on line 262

Event Timeline

Porplemontage raised the priority of this task from to Medium.
Porplemontage updated the task description. (Show Details)
Porplemontage added a project: MW-1.23-release.
Porplemontage subscribed.
Porplemontage renamed this task from Special:MyPage returns fatal error to Special:MyPage, Special:MyTalk, and Special:MyContributions return fatal error.Dec 18 2015, 6:29 PM
Porplemontage raised the priority of this task from Medium to High.
Porplemontage updated the task description. (Show Details)
Porplemontage set Security to None.

Hi @Porplemontage, thanks for taking the time to report this!

Could you please enable $wgShowExceptionDetails ? See https://www.mediawiki.org/wiki/Manual:How_to_debug

Aklapper raised the priority of this task from High to Needs Triage.Dec 18 2015, 8:04 PM
Aklapper added a project: MediaWiki-General.

Enabling $wgShowExceptionDetails doesn't result in any more information being provided.

$this->config->get( 'HideIdentifiableRedirects' ) sets off the error on Wiki.php line 250. Then these two calls produce further errors:

Fatal error: Call to undefined method DerivativeRequest::setRequestURL() in /includes/Wiki.php on line 259

Fatal error: Call to undefined method OutputPage::lowerCdnMaxage() in /includes/Wiki.php on line 262

includes/Wiki.php shows four commits for Dec 18 when 1.23.12 was released. rMWe03b223af755dd737d7a92c2615eb9ab50ee47f6 set $wgHideIdentifiableRedirects = true;in includes/DefaultSettings.php.
What is $wgHideIdentifiableRedirects set to in your configuration settings?

The default value of true - did not customize it.

I suspect that some 1.27 code made it into all the recent releases (1.26.1, 1.25.4, 1.24.5, and 1.23.12) and the problem is with all these versions. I've only personally tested 1.23.12, but just finding a wiki on 1.26.1, I notice the issue:

http://bulbapedia.bulbagarden.net/wiki/Special:Version
http://bulbapedia.bulbagarden.net/wiki/Special:MyPage

Change 260306 had a related patch set uploaded (by Reedy):
Fix Fatal on various special pages introduced in 1.23.12

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

Change 260307 had a related patch set uploaded (by Reedy):
Fix Fatal on various special pages introduced in 1.24.5

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

Change 260308 had a related patch set uploaded (by Reedy):
Fix Fatal on various special pages introduced in 1.25.4

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

Change 260309 had a related patch set uploaded (by Reedy):
Fix Fatal on various special pages introduced in 1.26.1

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

Patches are as above. If people want to test them to confirm they work, that'd be appreciated

With the patch applied to 1.23.12, there are still fatal errors:

Fatal error: Call to undefined method DerivativeRequest::setRequestURL() in /includes/Wiki.php on line 259

Fatal error: Call to undefined method OutputPage::lowerCdnMaxage() in /includes/Wiki.php on line 262

With the patch applied to 1.23.12, there are still fatal errors:

Fatal error: Call to undefined method DerivativeRequest::setRequestURL() in /includes/Wiki.php on line 259

Fatal error: Call to undefined method OutputPage::lowerCdnMaxage() in /includes/Wiki.php on line 262

But they are completely different. I can't fix what I don't know is broken. I'll have a look into those further and get back to you :)

Noting I missed these, because they were on an intermediate comment

With the patch applied to 1.23.12, there are still fatal errors:

Fatal error: Call to undefined method DerivativeRequest::setRequestURL() in /includes/Wiki.php on line 259

Fatal error: Call to undefined method OutputPage::lowerCdnMaxage() in /includes/Wiki.php on line 262

https://gerrit.wikimedia.org/r/260306 try PS3

NB lowerCdnMaxage was new in 1.27, so expanded backports needed to 1.24 through 1.26 too

With the patch applied to 1.23.12, there are still fatal errors:

Fatal error: Call to undefined method DerivativeRequest::setRequestURL() in /includes/Wiki.php on line 259

Fatal error: Call to undefined method OutputPage::lowerCdnMaxage() in /includes/Wiki.php on line 262

https://gerrit.wikimedia.org/r/260306 try PS3

All fixed! :)

Thanks for the quick testing. Made some further minor improvements in PS4 and PS5, but nothing functionally changed

1.24, 1.25 and 1.26 patches are now updated too.

If anyone tracking this bug is using those versions, and is experiencing issues, please test the patches and report back!

Change 260307 merged by jenkins-bot:
Fix Fatal on various special pages introduced in 1.24.5

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

Change 260309 merged by jenkins-bot:
Fix Fatal on various special pages introduced in 1.26.1

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

Change 260308 merged by Chad:
Fix Fatal on various special pages introduced in 1.25.4

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

Some possible interesting test failures on 1.23

@Porplemontage can you try some of the test URLs as below, and check they do what is expected. If so, I might just mark the tests as broken for 1.23 and make the release as such

23:39:46 There were 9 failures:
23:39:46 
23:39:46 1) MediaWikiTest::testTryNormaliseRedirect with data set #2 ('http://example.org/w/index.php?title=Foo_Bar', array('Foo_Bar'), 'Foo_Bar', 'http://example.org/wiki/Foo_Bar')
23:39:46 Return true only when redirecting
23:39:46 Failed asserting that false matches expected true.
23:39:46 
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/includes/MediaWikiTest.php:150
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/MediaWikiTestCase.php:134
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/MediaWikiPHPUnitCommand.php:80
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/MediaWikiPHPUnitCommand.php:64
23:39:46 
23:39:46 2) MediaWikiTest::testTryNormaliseRedirect with data set #3 ('http://example.org/w/index.php?curid=123', array('123'), 'Foo_Bar', false)
23:39:46 Failed asserting that two strings are equal.
23:39:46 --- Expected
23:39:46 +++ Actual
23:39:46 @@ @@
23:39:46 -''
23:39:46 +'http://example.org/wiki/Foo_Bar'
23:39:46 
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/includes/MediaWikiTest.php:155
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/MediaWikiTestCase.php:134
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/MediaWikiPHPUnitCommand.php:80
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/MediaWikiPHPUnitCommand.php:64
23:39:46 
23:39:46 3) MediaWikiTest::testTryNormaliseRedirect with data set #4 ('http://example.org/w/index.php?oldid=123', array('123'), 'Foo_Bar', false)
23:39:46 Failed asserting that two strings are equal.
23:39:46 --- Expected
23:39:46 +++ Actual
23:39:46 @@ @@
23:39:46 -''
23:39:46 +'http://example.org/wiki/Foo_Bar'
23:39:46 
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/includes/MediaWikiTest.php:155
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/MediaWikiTestCase.php:134
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/MediaWikiPHPUnitCommand.php:80
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/MediaWikiPHPUnitCommand.php:64
23:39:46 
23:39:46 4) MediaWikiTest::testTryNormaliseRedirect with data set #8 ('http://example.org/w/?title=Foo_Bar', array('Foo_Bar'), 'Foo_Bar', 'http://example.org/wiki/Foo_Bar')
23:39:46 Return true only when redirecting
23:39:46 Failed asserting that false matches expected true.
23:39:46 
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/includes/MediaWikiTest.php:150
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/MediaWikiTestCase.php:134
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/MediaWikiPHPUnitCommand.php:80
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/MediaWikiPHPUnitCommand.php:64
23:39:46 
23:39:46 5) MediaWikiTest::testTryNormaliseRedirect with data set #9 ('http://example.org/?title=Foo_Bar', array('Foo_Bar'), 'Foo_Bar', 'http://example.org/wiki/Foo_Bar')
23:39:46 Return true only when redirecting
23:39:46 Failed asserting that false matches expected true.
23:39:46 
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/includes/MediaWikiTest.php:150
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/MediaWikiTestCase.php:134
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/MediaWikiPHPUnitCommand.php:80
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/MediaWikiPHPUnitCommand.php:64
23:39:46 
23:39:46 6) MediaWikiTest::testTryNormaliseRedirect with data set #10 ('http://example.org/wiki/Foo_Bar?action=view', array('view'), 'Foo_Bar', 'http://example.org/wiki/Foo_Bar')
23:39:46 Return true only when redirecting
23:39:46 Failed asserting that false matches expected true.
23:39:46 
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/includes/MediaWikiTest.php:150
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/MediaWikiTestCase.php:134
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/MediaWikiPHPUnitCommand.php:80
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/MediaWikiPHPUnitCommand.php:64
23:39:46 
23:39:46 7) MediaWikiTest::testTryNormaliseRedirect with data set #11 ('http://example.org/wiki/Foo_Bar?action=edit', array('edit'), 'Foo_Bar', false)
23:39:46 Failed asserting that two strings are equal.
23:39:46 --- Expected
23:39:46 +++ Actual
23:39:46 @@ @@
23:39:46 -''
23:39:46 +'http://example.org/wiki/Foo_Bar'
23:39:46 
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/includes/MediaWikiTest.php:155
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/MediaWikiTestCase.php:134
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/MediaWikiPHPUnitCommand.php:80
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/MediaWikiPHPUnitCommand.php:64
23:39:46 
23:39:46 8) MediaWikiTest::testTryNormaliseRedirect with data set #12 ('http://example.org/w/index.php?title=Foo_Bar&action=view', array('Foo_Bar', 'view'), 'Foo_Bar', 'http://example.org/wiki/Foo_Bar')
23:39:46 Return true only when redirecting
23:39:46 Failed asserting that false matches expected true.
23:39:46 
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/includes/MediaWikiTest.php:150
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/MediaWikiTestCase.php:134
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/MediaWikiPHPUnitCommand.php:80
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/MediaWikiPHPUnitCommand.php:64
23:39:46 
23:39:46 9) MediaWikiTest::testTryNormaliseRedirect with data set #13 ('http://example.org/w/index.php?title=Foo_Bar&action=edit', array('Foo_Bar', 'edit'), 'Foo_Bar', false)
23:39:46 Failed asserting that two strings are equal.
23:39:46 --- Expected
23:39:46 +++ Actual
23:39:46 @@ @@
23:39:46 -''
23:39:46 +'http://example.org/wiki/Foo_Bar'
23:39:46 
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/includes/MediaWikiTest.php:155
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/MediaWikiTestCase.php:134
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/MediaWikiPHPUnitCommand.php:80
23:39:46 /mnt/jenkins-workspace/workspace/mediawiki-phpunit-zend/src/tests/phpunit/MediaWikiPHPUnitCommand.php:64
23:39:46

Everything is functioning as expected when it comes to page redirects and actions.

Change 260306 merged by jenkins-bot:
Fix Fatal on various special pages introduced in 1.23.12

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

Reedy claimed this task.