From 4dcda73ef74af705f0ce6680ed319ca157450cb4 Mon Sep 17 00:00:00 2001 From: "C. Scott Ananian" Date: Wed, 8 Apr 2020 16:10:33 -0400 Subject: [PATCH] Remove deprecated Parser::enableOOUI(), take 2 This adds a missing call to OutputPage::setupOOUI(), to fix a code path where `` 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 --- includes/TemplateDataHooks.php | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/TemplateDataHooks.php b/includes/TemplateDataHooks.php index 07f2eac1..34a7d692 100644 --- a/includes/TemplateDataHooks.php +++ b/includes/TemplateDataHooks.php @@ -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() );