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

Description

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).

Tacsipacsi triaged this task as Normal priority.

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

Anomie added a subscriber: Anomie.Jan 8 2018, 6:38 PM

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.

matmarex removed a subscriber: matmarex.Jan 8 2018, 6:43 PM