Remove deprecated Parser::enableOOUI(), take 2

This adds a missing call to OutputPage::setupOOUI(), to fix a code path
where `<templatedata>` is expanded via API call (eg, during Parsoid
rendering) and an OOUI theme has not been set up.  This hacky workaround
is pretty bogus, since the output will not have the proper user skin
or directionality, but it avoids a crash (and duplicates the previous
behavior, without using the deprecated method).

Change-Id: Ie3f37b8b972dc6e89e3cd334672954d3632c1b20
This commit is contained in:
C. Scott Ananian 2020-04-08 16:10:33 -04:00
parent 3f270b9ad7
commit 4dcda73ef7

View file

@ -155,6 +155,7 @@ class TemplateDataHooks {
'jquery.tablesorter.styles',
] );
$parser->getOutput()->addModules( 'jquery.tablesorter' );
OutputPage::setupOOUI(); // FIXME: This hard-codes default skin and LTR dir
$parser->getOutput()->setEnableOOUI( true );
return $ti->getHtml( $parser->getOptions()->getUserLangObj() );