Last modified: 2012-12-31 16:21:18 UTC
On first save, the smarty "counter" function: <!--{counter name="counter" assign="count"}--> counts double when the parser meets a revision related magic word: {{REVISIONID}} {{REVISIONUSER}} {{REVISION*}} ... Ex: The page 'Page' with content: {{REVISIONUSER}} {{#widget:Counter}} where 'Widget:Counter' is: <!--{counter name="counter" assign="count"}--><!--{$count|default:'empty'}--> Will display: UserOfRevision 2 Instead of: UserOfRevision 1 But after purge, the result becomes correct. Explanation: when the parser meets a revision related magic word, it sets the 'vary-revision' flags. This flag causes the re-parsing of the page after the revision is saved (once we got the info we want for the magic words). But the counter is not reset between the two parse. Causing it to count 2 times instead of 1.