Page MenuHomePhabricator

Flow should not manually forward metadata from ParserOutput
Open, Needs TriagePublic

Description

Found this when looking for calls to addModuleScripts(). In Flow:/includes/Content/BoardContent.php#L200-L224:

	$parserOutput->setText( $childContext->getOutput()->getHTML() );
	$parserOutput->addModules( $childContext->getOutput()->getModules() );
	$parserOutput->addModuleStyles( $childContext->getOutput()->getModuleStyles() );
	$parserOutput->addModuleScripts( $childContext->getOutput()->getModuleScripts() );

This should probably use addOutputPageMetadata() to avoid hardcoding calls like this. It's code duplication that's likely to rot, go out of data and cause weird and unpredictable corruption. For example, it seems it already forgets about getJsConfigVars() which means it will miss certain variables causing extension tags for Maps to probably be broken.

See T140920: <mapframe> is not visible in Flow (blank frame).

Event Timeline

Krinkle created this task.Jul 18 2016, 6:02 PM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJul 18 2016, 6:02 PM

Triage meeting discussed this and suggests we do it but only if it's easy. So if you run into difficulty, make a note about it and move to the "Interested" board.

Restricted Application added a project: Growth-Team. · View Herald TranscriptOct 12 2019, 4:11 AM