Page MenuHomePhabricator

VisualEditor: API does not apply PST (pre-save transform) when generating its diff
Closed, ResolvedPublic

Description

It is possible to insert a substituted template (by just putting in "subst:whatever" as its name). This will be saved correctly (substituted), but the diff shown in the review dialog shows the non-substituted wikitext.


Version: unspecified
Severity: minor
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=53201

Details

Reference
bz52345

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:09 AM
bzimport set Reference to bz52345.

Isn't this how normal diffs work? If I replace the sandbox with {{subst:test}}, it just shows the addition of the text "{{subst:test}}" when you hit show changes.

No, it shows the substituted code.

Sorry, my bad. I forgot I was using custom JS to generate diffs.

Marking as "minor" as we don't provide a built-in way for subst: to be added (yet) to transclusion invocations.

VE's API "diff" option instantiates its own DifferenceEngine but fails to set the PST option.

Change 129251 had a related patch set uploaded by Alex Monk:
Apply PST when generating diff

https://gerrit.wikimedia.org/r/129251

Change 129251 merged by jenkins-bot:
Apply PST when generating diff

https://gerrit.wikimedia.org/r/129251