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

Infoboxes do not render properly under Parsoid #129

Open
BlankEclair opened this issue Aug 25, 2024 · 3 comments
Open

Infoboxes do not render properly under Parsoid #129

BlankEclair opened this issue Aug 25, 2024 · 3 comments

Comments

@BlankEclair
Copy link
Contributor

https://publictestwiki.com/wiki/User:BlankEclair/Sandbox/Egg:

https://rainverse.wiki/wiki/Rainbow:Dragon_Rain_13:_Hands:

@BlankEclair
Copy link
Contributor Author

I added a debug print to PortableInfoboxParserTagController::renderInfobox() (which is the earliest that the extension can grab its input parameters), like so:

diff --git a/includes/controllers/PortableInfoboxParserTagController.php b/includes/controllers/PortableInfoboxParserTagController.php
index dbf54b7..ec19dc7 100644
--- a/includes/controllers/PortableInfoboxParserTagController.php
+++ b/includes/controllers/PortableInfoboxParserTagController.php
@@ -121,6 +121,7 @@ class PortableInfoboxParserTagController {
         * @return string|array
         */
        public function renderInfobox( $text, $params, $parser, $frame ) {
+               var_dump(get_class($frame));
                $markup = '<' . self::PARSER_TAG_NAME . '>' . $text . '</' . self::PARSER_TAG_NAME . '>';
                $parserOutput = $parser->getOutput();

When I go to a page with an infobox using action=parsermigration-edit, I get:

string(20) "PPTemplateFrame_Hash"
string(12) "PPFrame_Hash"

So it seems like the legacy parser passes PPTemplateFrame_Hash to $frame, and Parsoid passes PPFrame_Hash to $frame. PPTemplateFrame_Hash::getArguments() gets... well, arguments (source), but interestingly, it appears that PPFrame_Hash::getArguments() is a stub (source).

@BlankEclair
Copy link
Contributor Author

I give up debugging from here, this is way too deep into MediaWiki internals than I can handle.

@alex4401
Copy link
Contributor

It's these two tickets:
https://phabricator.wikimedia.org/T347507
https://phabricator.wikimedia.org/T301080

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

No branches or pull requests

2 participants