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

PLATFORM-10852 Fix type mismatch between what is returned by getLinkList (list of arrays that contains non-serializable TitleValue) and what is expected by ParserOutput. #15

Merged
merged 1 commit into from
Mar 24, 2025

Conversation

adpaste
Copy link
Member

@adpaste adpaste commented Mar 19, 2025

https://fandom.atlassian.net/browse/PLATFORM-10852

Invalid kind of data was assigned to mLinks variable. That caused issues with ParserCache, because TitleValue could not be serialized to JSON.

…List` (list of arrays that contains non-serializable TitleValue) and what is expected by ParserOutput.
@@ -219,7 +219,7 @@ private static function executeTag( $input, array $args, Parser $parser, PPFrame

// we can remove the templates by save/restore
if ( $reset['templates'] ?? false ) {
$saveTemplates = $parserOutput->getLinkList( ParserOutputLinkTypes::TEMPLATE );
$saveTemplates = $parserOutput->mTemplates;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: are you sure this change doesn't cause deprecation warnings?

I doubt this will be accepted upstream, but I realize there might be no other solution...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't seen any error logs related to that on my sandbox. All these fields are already accessed to write to them.
I don't think there is another solution to this without modifying MediaWiki.

@KacperJarzynowski KacperJarzynowski merged commit 99a238f into REL1_43 Mar 24, 2025
@KacperJarzynowski KacperJarzynowski deleted the PLATFORM-10852 branch March 24, 2025 12:48
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 this pull request may close these issues.

3 participants