Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when saving edits to Template pages #53

Open
The-Foilist opened this issue Jan 15, 2022 · 0 comments · May be fixed by #52
Open

Error when saving edits to Template pages #53

The-Foilist opened this issue Jan 15, 2022 · 0 comments · May be fixed by #52

Comments

@The-Foilist
Copy link

This error arose after upgrading from MediaWiki version 1.36 to version 1.37.1, and after I applied my fix #51 . It occurs whenever I try to save an edit to any page in the Template namespace when PortableInfobox is installed. Here's the trace:

Error: Class 'RevisionRecord' not found

Backtrace:

from /var/www/w/extensions/PortableInfobox/includes/services/Helpers/PortableInfoboxParsingHelper.php(76)
#0 /var/www/w/extensions/PortableInfobox/includes/services/Helpers/PortableInfoboxParsingHelper.php(27): PortableInfobox\Helpers\PortableInfoboxParsingHelper->fetchArticleContent()
#1 /var/www/w/extensions/PortableInfobox/includes/services/PortableInfoboxDataService.php(199): PortableInfobox\Helpers\PortableInfoboxParsingHelper->parseIncludeonlyInfoboxes()
#2 /var/www/w/extensions/PortableInfobox/includes/PortableInfobox.hooks.php(45): PortableInfoboxDataService->reparseArticle()
#3 /var/www/w/includes/HookContainer/HookContainer.php(338): PortableInfoboxHooks::onPageContentSave()
#4 /var/www/w/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook()
#5 /var/www/w/includes/HookContainer/HookRunner.php(2714): MediaWiki\HookContainer\HookContainer->run()
#6 /var/www/w/includes/Storage/PageUpdater.php(807): MediaWiki\HookContainer\HookRunner->onPageContentSave()
#7 /var/www/w/includes/page/WikiPage.php(1994): MediaWiki\Storage\PageUpdater->saveRevision()
#8 /var/www/w/includes/EditPage.php(2351): WikiPage->doUserEditContent()
#9 /var/www/w/includes/EditPage.php(1687): EditPage->internalAttemptSave()
#10 /var/www/w/includes/EditPage.php(665): EditPage->attemptSave()
#11 /var/www/w/includes/actions/EditAction.php(71): EditPage->edit()
#12 /var/www/w/includes/actions/SubmitAction.php(38): EditAction->show()
#13 /var/www/w/includes/MediaWiki.php(543): SubmitAction->show()
#14 /var/www/w/includes/MediaWiki.php(320): MediaWiki->performAction()
#15 /var/www/w/includes/MediaWiki.php(930): MediaWiki->performRequest()
#16 /var/www/w/includes/MediaWiki.php(564): MediaWiki->main()
#17 /var/www/w/index.php(53): MediaWiki->run()
#18 /var/www/w/index.php(46): wfIndexMain()
#19 {main}

It looks like the Revision class was removed in MW version 1.37. According to this migration guide on MediaWiki.org, Revision::FOR_PUBLIC should be replaced with RevisionRecord::FOR_PUBLIC in this file.

@The-Foilist The-Foilist linked a pull request Jan 16, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant