Page MenuHomePhabricator

Fix error Error: Call to undefined method WikiPage::getRevision()
Closed, ResolvedPublic

Description

Originally reported on MediaWiki.org.

Setup

  • MediaWiki 1.39

Issue

MediaWiki internal error. Original exception: [a9ddd7b6adbabc6ec584a29a] /w/index.php/Wiki Error: Call to undefined method WikiPage::getRevision()

Backtrace:

from /../extensions/UserAgreement/includes/UserAgreement.php(63)
#0 /../extensions/UserAgreement/includes/UserAgreementHooks.php(59): UserAgreement::getUALastModifiedDate()
#1 /../includes/HookContainer/HookContainer.php(338): UserAgreementHooks::addUserAgreement()
#2 /../includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook()
#3 /../includes/HookContainer/HookRunner.php(945): MediaWiki\HookContainer\HookContainer->run()
#4 /../includes/OutputPage.php(2869): MediaWiki\HookContainer\HookRunner->onBeforePageDisplay()
#5 /../includes/MediaWiki.php(922): OutputPage->output()
#6 /../includes/MediaWiki.php(562): MediaWiki->main()
#7 /../index.php(50): MediaWiki->run()
#8 /../index.php(46): wfIndexMain()
#9 {main}

Exception caught inside exception handler: [a9ddd7b6adbabc6ec584a29a] /w/index.php/Wiki Error: Call to undefined method WikiPage::getRevision()

Backtrace:

from /../extensions/UserAgreement/includes/UserAgreement.php(63)
#0 /../extensions/UserAgreement/includes/UserAgreementHooks.php(59): UserAgreement::getUALastModifiedDate()
#1 /../includes/HookContainer/HookContainer.php(338): UserAgreementHooks::addUserAgreement()
#2 /../includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook()
#3 /../includes/HookContainer/HookRunner.php(945): MediaWiki\HookContainer\HookContainer->run()
#4 /../includes/OutputPage.php(2869): MediaWiki\HookContainer\HookRunner->onBeforePageDisplay()
#5 /../includes/exception/MWExceptionRenderer.php(183): OutputPage->output()
#6 /../includes/exception/MWExceptionRenderer.php(102): MWExceptionRenderer::reportHTML()
#7 /../includes/exception/MWExceptionHandler.php(131): MWExceptionRenderer::output()
#8 /../includes/exception/MWExceptionHandler.php(248): MWExceptionHandler::report()
#9 /../includes/MediaWiki.php(584): MWExceptionHandler::handleException()
#10 /../index.php(50): MediaWiki->run()
#11 /../index.php(46): wfIndexMain()
#12 {main}

Event Timeline

Change 932670 had a related patch set uploaded (by Cicalese; author: Cicalese):

[mediawiki/extensions/UserAgreement@master] Update to modern coding style

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

Kghbln assigned this task to cicalese.
Kghbln added a subscriber: cicalese.

Ships with version 2.0.0 Thanks @cicalese for the fix!