Page MenuHomePhabricator

Translate extension mutates the $options argument in ParserOutputPostCacheTransform hook
Open, Needs TriagePublic

Description

See https://gerrit.wikimedia.org/g/mediawiki/extensions/Translate/+/5eff51db8831f6abced92173821445d43f03d724/src/PageTranslation/Hooks.php#197

We added an appropriate ParserOption in https://gerrit.wikimedia.org/r/c/mediawiki/core/+/972047 (in MW 1.42) to provide a better mechanism to do with without mutating the $options array, but we need to actually patch Translate to use this. And of course it needs to be backward compatible because of the compatibility policy for Translate.

Event Timeline

Note that setting the ParserOption to suppress edit links at the present time splits the parser cache. That's probably not an issue since the page will *always* be rendered with that setting.