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
Fix three fatal errors with MediaWiki 1.36.0+ #41
Conversation
@lkucharczyk can you please review/merge this as soon as possible, as 1.36.0 came out today and this gives a fatal on the most recent stable MediaWiki version. |
I'd just like to add that this issue is likely related and has been affecting 1.35 as well |
I've used PortableInfobox on 1.35 since 1.35 was released and never had this issue until 1.36. |
It's only in the last couple of weeks that it's come up. I was starting to roll them out across my wiki but one of my fellow admins had to revert my edits because the errors started like a day after I'd added them on some pages. We're on Miraheze so we're running 1.35.2 |
Yes, my personal wiki on Miraheze does not have this issue. I did this PR to fix it on Miraheze for 1.36.0, prior to us upgrading to 1.36. The issues fixed here would not effect 1.35 at all, as the functions exist on there. |
'pwrap' => false | ||
] ); | ||
if ( version_compare( MW_VERSION, '1.36', '>=' ) ) { | ||
$this->tidyDriver = MediaWikiServices::getInstance()->getTidy(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does not setting the pwrap
option affect the output in any negative way? I don't remember why exactly I had to set it to false and I can't really test that at the moment. I know that now it's only possible to grab Tidy with predefined config now, so maybe it would be better for us to set $wgPortableInfoboxUseTidy
to false by default if default tidy config causes any problems?
I merged this anyway, to get any working version, but if you could make sure that's not a problem, that'd be great.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I tested it before this PR. It seemed to work.
One other unrelated thing, I was wondering if I can have merge rights to this repository to help maintain the extension? And have you considered moving to Wikimedia Gerrit?
MWTidy::factory no longer exists, therefore it gives fatal error, "Error: Call to undefined method MWTidy::factory()"
Too few arguments to function Parser::__construct(), 0 passed in extensions/PortableInfobox/includes/services/Helpers/PortableInfoboxParsingHelper.php on line 29 and exactly 16 expected
Replace
$wgContLang
which was removed on 1.36.Also there is additional errors/warnings not fixed in this, such as:
ParserOptions being created without a UserIdentity object [Called from unknown in extensions/PortableInfobox/includes/services/Helpers/PortableInfoboxParsingHelper.php at line 31] in includes/debug/MWDebug.php on line 376