https://bugzilla.wikimedia.org/show_bug.cgi?id=39433
Web browser: ---
Bug #: 39433
Summary: Revision Magic Words breaks Counter function
Product: MediaWiki extensions
Version: unspecified
Platform: All
OS/Version: All
Status: UNCONFIRMED
Severity: minor
Priority: Unprioritized
Component: Widgets
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Mobile Platform: ---
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.
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l