Page MenuHomePhabricator

VE doesn't render subst:-ed templates inserted in code
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Open a page to editing in a wikitext mode (for example go to https://pl.wikipedia.org/wiki/Special:MyPage/sandbox?uselang=en&action=edit ).
    • If asked whether to switch to visual editing or remain in code, pick the latter one.
  • Insert a substituted template, eg. type {{subst:fd}}.
  • Switch to the VisualEditor using the proper tab.
  • See the outcome.
  • For comparison: use the template wizard (Insert > Template) to insert subst:fd (do not pick from the autocomplete list as it removes subst prefix).

What happens?:
The editor renders the wikimarkup as typed: {{subst:fd}} instead of actually including the template fakt (the substitution output is e.g. {{fakt|data=2023-09}}) (should render [potrzebne źródło]). On the other hand, template inserted in the visual editing mode is rendered properly.

What should have happened instead?:
VisualEditor should treat already-present subst-ed templates like those that are inserted by the VE.

Software version (skip for WMF-hosted wikis like Wikipedia): plwiki

Other information (browser name/version, screenshots, etc.):

image.png (181×623 px, 12 KB)

Event Timeline

Msz2001 renamed this task from VE doesn't render subst:-ed templated inserted in code to VE doesn't render subst:-ed templates inserted in code.Mar 2 2023, 9:40 AM

Given VisualEditor is able to properly get a template preview while typing subst:Name as template name, I think this is more a bug than a feature request.

The same issue happen if you paste the wikitext {{subst:Template}} inside VisualEditor.

Maybe, I can’t say.

But note only the display is lost while switching editor: the resulting wikitext remains correct (i.e. no <nowiki> is inserted).