Page MenuHomePhabricator

Templates with language annotations not converted properly by VE
Closed, ResolvedPublic8 Estimated Story Points

Description

Which has no effect on the wikitext you get back to save, because you didn't edit the transclusion itself.

I just ran into this myself: https://meta.wikimedia.org/w/index.php?title=IRC/Channels&diff=12412456&oldid=12002898
In this case I copied the {{Channel}} from the wikimedia-design entry, and it copied correctly as a template, but I could still edit the contents directly (as I could before copying), and thus the transclusion itself remained the same.

Might be caused by Parsoid?

Event Timeline

Krenair raised the priority of this task from to Needs Triage.
Krenair updated the task description. (Show Details)
Krenair added projects: VisualEditor, Parsoid.
Krenair subscribed.
Esanders set Security to None.
Esanders subscribed.

The HTML seems okay, looks like a VE bug.

Esanders renamed this task from VE lets you directly edit contents of meta.wikimedia.org's {{Channel}} template at [[IRC/Channels]], rather than the template itself to Templates with language annotations not converted properly by VE.Jun 10 2015, 1:27 PM

Simplest HTML:

<span dir="ltr" about="#mwt1" typeof="mw:Transclusion" data-mw="{}">content</span>

LanguageAnnotation uses a match function (+ tag name) to find lang or dir attributes, this matches before TransclusionNode which uses an RDFa tag (+ tag name)

Match order in the model registry:

  1. tag, rdfaType and func specified
  2. rdfaType and func specified
  3. tag and func specified
  4. func specified
  5. tag and rdfaType specified
  6. rdfaType specified
  7. tag specified
  8. nothing specified

Change 218620 had a related patch set uploaded (by Esanders):
Give TranclusionNodes a matchFunction so they beat LanguageAnnotations

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

Change 218620 merged by jenkins-bot:
Give TranclusionNodes a matchFunction so they beat LanguageAnnotations

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

Jdforrester-WMF assigned this task to Esanders.
Jdforrester-WMF triaged this task as Medium priority.
Jdforrester-WMF edited a custom field.
Jdforrester-WMF moved this task from Nominated to Done on the VisualEditor 2014/15 Q4 blockers board.