Topic on Extension talk:UserAgreement

Issues when upgrading from MW 1.35 to 1.39

7
Summary by Kghbln

A fix ships with version 2.0.0

Squeak24 (talkcontribs)

Hi,


I am having a bit of an issue on one of my Wikis (the first one I am trying to upgrade) from MediaWiki 1.35 to 1.39.


I get the error:


MediaWiki internal error.

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

Backtrace:

from /var/www/html/farmhouse/extensions/UserAgreement/includes/UserAgreement.php(63)

#0 /var/www/html/farmhouse/extensions/UserAgreement/includes/UserAgreementHooks.php(59): UserAgreement::getUALastModifiedDate()

#1 /var/www/html/farmhouse/includes/HookContainer/HookContainer.php(338): UserAgreementHooks::addUserAgreement()

#2 /var/www/html/farmhouse/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook()

#3 /var/www/html/farmhouse/includes/HookContainer/HookRunner.php(945): MediaWiki\HookContainer\HookContainer->run()

#4 /var/www/html/farmhouse/includes/OutputPage.php(2869): MediaWiki\HookContainer\HookRunner->onBeforePageDisplay()

#5 /var/www/html/farmhouse/includes/MediaWiki.php(922): OutputPage->output()

#6 /var/www/html/farmhouse/includes/MediaWiki.php(562): MediaWiki->main()

#7 /var/www/html/farmhouse/index.php(50): MediaWiki->run()

#8 /var/www/html/farmhouse/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 /var/www/html/farmhouse/extensions/UserAgreement/includes/UserAgreement.php(63)

#0 /var/www/html/farmhouse/extensions/UserAgreement/includes/UserAgreementHooks.php(59): UserAgreement::getUALastModifiedDate()

#1 /var/www/html/farmhouse/includes/HookContainer/HookContainer.php(338): UserAgreementHooks::addUserAgreement()

#2 /var/www/html/farmhouse/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook()

#3 /var/www/html/farmhouse/includes/HookContainer/HookRunner.php(945): MediaWiki\HookContainer\HookContainer->run()

#4 /var/www/html/farmhouse/includes/OutputPage.php(2869): MediaWiki\HookContainer\HookRunner->onBeforePageDisplay()

#5 /var/www/html/farmhouse/includes/exception/MWExceptionRenderer.php(183): OutputPage->output()

#6 /var/www/html/farmhouse/includes/exception/MWExceptionRenderer.php(102): MWExceptionRenderer::reportHTML()

#7 /var/www/html/farmhouse/includes/exception/MWExceptionHandler.php(131): MWExceptionRenderer::output()

#8 /var/www/html/farmhouse/includes/exception/MWExceptionHandler.php(248): MWExceptionHandler::report()

#9 /var/www/html/farmhouse/includes/MediaWiki.php(584): MWExceptionHandler::handleException()

#10 /var/www/html/farmhouse/index.php(50): MediaWiki->run()

#11 /var/www/html/farmhouse/index.php(46): wfIndexMain()

#12 {main}


Any idea what the problem is?

Squeak24 (talkcontribs)

For now, I have commented out the following line:

$uaModifiedDate = $uaPage->getRevision()->getTimestamp();

I'm not overly concerned about when it updates. I have modified it to be agreed once every 12 months.

Squeak24 (talkcontribs)

OK, I have just tested the User Agreement, I can't even get it to say it has been recorded now. I will have to have a look at this in more detail tomorrow. When I agree, it just comes back prompting me to renew the agreement.

Hcadby (talkcontribs)

This issue is related to the Article method "getRevision" deprecated in 1.35 and removed in mediawiki 1.36. I am looking into a fix.

Squeak24 (talkcontribs)

Thanks Hcadby, I have updated the script to only ask for it to be agreed once a year. I did put this on GitHub, but I messed up when committing it this afternoon. I will try again tomorrow.

Kghbln (talkcontribs)
Kghbln (talkcontribs)