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

Porplemontage added a project: MW-1.23-release.
Porplemontage added a subscriber: Porplemontage.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 18 2015, 6:11 PM
Porplemontage changed the title from "Special:MyPage returns fatal error" to "Special:MyPage, Special:MyTalk, and Special:MyContributions return fatal error".Dec 18 2015, 6:29 PM
Porplemontage edited the task description. (Show Details)
Porplemontage raised the priority of this task from "Normal" to "High".
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
Restricted Application added a subscriber: StudiesWorld. · View Herald TranscriptDec 18 2015, 8:04 PM
Porplemontage added a comment.EditedDec 18 2015, 8:19 PM

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?

Porplemontage added a comment.EditedDec 18 2015, 11:22 PM

The default value of true - did not customize it.

Porplemontage added a comment.EditedDec 18 2015, 11:32 PM

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

Reedy added a subscriber: Reedy.Dec 20 2015, 9:59 PM

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

Reedy added a comment.EditedDec 20 2015, 10:17 PM

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

Reedy edited the task description. (Show Details)Dec 20 2015, 10:37 PM

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
Reedy moved this task from Backlog to Done on the MW-1.26-release board.Dec 21 2015, 12:42 AM

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 closed this task as "Resolved".Dec 21 2015, 8:49 PM
Reedy claimed this task.

Thanks for the fix!

This comment was removed by Porplemontage.