Page MenuHomePhabricator

VisualEditor generate wrong label for specific it.wiki template
Open, Needs TriagePublicBUG REPORT

Description

What happens?:
The generated label is:

Generato da: [[...|:...]]

What should have happened instead?:
The generated label should be:

Generato da: [[template:...|...]]

or maybe

Generato da: [[template:sezione vuota|...]]

Other information

Event Timeline

matmarex subscribed.

Parsoid generates incorrect data – for example, on https://it.wikipedia.org/w/index.php?title=Anni_1760&useparsoid=1:

data-mw='{"parts":[{"template":{"target":{"wt":"...","href":"./..."},"params":{"1":{"wt":"cronologia"}},"i":0}}]}'

In href, there should be a Template: prefix. Compare to other templates used on the same page:

data-mw='{"parts":[{"template":{"target":{"wt":"Decennio","href":"./Template:Decennio"},"params":{"1":{"wt":"176"}},"i":0}}]}'
data-mw='{"parts":[{"template":{"target":{"wt":"interprogetto","href":"./Template:Interprogetto"},"params":{},"i":0}},"\n\n[[Categoria:Decenni del XVIII secolo| 07]]"]}'

This happens to any template that starts with a full stop:

  • {{foo}} -> "./Template:Foo"
  • {{.foo}} -> "./.foo"