HomePhabricator

Prevent issues due to template caching - backport from master

Authored by MGChecker on Apr 5 2018, 11:34 PM.

Description

Prevent issues due to template caching - backport from master

If a template is called without parameters multiple times, the default
behavior of MediaWiki is to cache the template instead of reparsing it.
However, if this template is using variables that have been changed
between two calls, this change isn't taken into account. By considering
the #var and #varexists parser function as volatile, template caching is
omitted if the template contains these parser functions, preventing this
issue. This feature was introduced with T33834 to prevent similar issue
with the Cite extension. As this changes the behavior of the parser in
these particular cases, the $egVariablesAreVolatile setting is added to
allow users to fallback to treating these parser functions as non-volatile.
This additional configuration option isn't permanent, but temporary for
transition to the new behavior.

Bug: T191574
Change-Id: I64e8452bd8ce8d9ccf13a3cf7cd56b11609e6cfa
(cherry picked from commit ea75376303869f05ff81897b280ddc206db492cc)

Details

Committed
KghblnApr 25 2018, 3:59 PM
Parents
rEVARafb7032b7e8b: Relocate parser tests
Branches
Unknown
Tags
Unknown
References
REL1_31, refs/changes/46/428946/2
ChangeId
I64e8452bd8ce8d9ccf13a3cf7cd56b11609e6cfa