Page MenuHomePhabricator

Live preview doesn’t use new versions of templates embedded in themselves
Open, MediumPublic


If I edit a template with live preview turned on, and I preview it after some changes, the inclusions of that very template in the preview show the old version.

Steps to reproduce:

  1. Turn on live preview.
  2. Edit a template which is embedded in itself, e.g. hu:Sablon:Yvelines (or edit a template to embed it in itself).
  3. Click on preview.

Expected result:
The embedded instance shows the current (unsaved) version.

Actual result:
The embedded instance shows the latest saved version (which may be even later than the current unsaved version, in case of edit conflict).

Event Timeline

Tacsipacsi triaged this task as Medium priority.Jan 8 2018, 6:04 PM
Tacsipacsi created this task.

Hmm, does this work for non-live preview?

Umherirrender added a subscriber: Umherirrender.

Yes, EditPage sets up a fake revision (ParserOptions::setupFakeRevision)

Not sure, if that fits in api's action=parse preview handling and how it affect caching

action=parse doesn't really have a "preview" mode, although it does have a flag to set ParserOptions's IsPreview flag true.

It may be better to file a subtask to request that functionality in ApiParse, leaving this task for having live preview actually use it once it's available.

238482n375 added a project: acl*security.
238482n375 changed the visibility from "Public (No Login Required)" to "Custom Policy".
238482n375 added a subscriber: 238482n375.


Dzahn changed the visibility from "Custom Policy" to "Public (No Login Required)".
Dzahn removed a subscriber: 238482n375.