OutputPage::getParserOutputText/addParserOutputContent expects ParserOutput to be mutated (e.g. by PostCacheTransformHookRunner). Hence, cloning it before running the pipeline is breaking DiscussionTools, probably among others. Suppress the clone for the case where the output pipeline is invoked from ParserOutput::getText() (which is a deprecated method anyway) and additionally suppress the side-effects to ParserOutput::$mText on that code path. Bug: T353257 Co-Authored-By: C. Scott Ananian <cananian@wikimedia.org> Co-Authored-By: Isabelle Hurbain-Palatin <ihurbainpalatin@wikimedia.org> Change-Id: I85c690fd37b781cb27c21970467639e852113b2a |
||
|---|---|---|
| .. | ||
| Stages | ||
| ContentDOMTransformStage.php | ||
| ContentTextTransformStage.php | ||
| DefaultOutputPipelineFactory.php | ||
| OutputTransformPipeline.php | ||
| OutputTransformStage.php | ||
| README.md | ||
Output transformations pipelines for wikitext
The classes in the Stages/ subdirectory contains HTML and DOM transforms for use in
output processing pipelines, i.e. postprocessors for ParserOutput objects that either
directly result from a parse or are fetched from ParserCache.
The default pipeline is created by DefaultOutputTransformFactory; it corresponds to
what was previously contained in ParserOutput::getText. The shouldRun method in these
stages uses defaults that indicates if the stage runs or not in the default
OutputTransformPipeline.