Skip to content

Commit

Permalink
Merge pull request #773 from WikiTeq/IEEE23-28/fix-for-ve
Browse files Browse the repository at this point in the history
Fix for VusualEditor
  • Loading branch information
JeroenDeDauw authored Mar 6, 2024
2 parents cbb1377 + bea8bb0 commit 9b01a6b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/SemanticMW/QueryHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,13 @@ private function getTitleOutput( string $titleText ) {
}

private function getParser(): \Parser {
return MediaWikiServices::getInstance()->getParser();
$user = \RequestContext::getMain()->getUser();
$parser = MediaWikiServices::getInstance()->getParser();
if ( !$parser->getOptions() ) {
$parser->setOptions( new \ParserOptions( $user ) );
}
$parser->clearState();
return $parser;
}

/**
Expand Down

0 comments on commit 9b01a6b

Please sign in to comment.