Page MenuHomePhabricator

Template swallows other parts of comment
Open, Needs TriagePublic

Assigned To
None
Authored By
ppelberg
Jun 18 2020, 2:40 AM
Referenced Files
F31874930: image.png
Jun 22 2020, 2:15 PM
F31874934: image.png
Jun 22 2020, 2:15 PM
F31874928: image.png
Jun 22 2020, 2:10 PM
F31869959: Screen Shot 2020-06-17 at 7.28.11 PM.png
Jun 18 2020, 2:40 AM

Description

This task is about resolving an issue where a template expands to incorporate/swallow content from elsewhere in the comment being drafted.

Behavior

  1. Visit: https://en.wikipedia.beta.wmflabs.org/wiki/Talk:Cats
  2. Click any "Reply" link
  3. Switch to the tool's source mode if you're not already in it
  4. Enter the following
Hello

{{quote|World}}
  1. Switch to the tool's visual mode

Actual

  1. ⚠️ Notice the first line of the comment is now part of the {{Quote}} template:
    image.png (178×668 px, 13 KB)

Expected

  1. ✅ Notice the first line of the comment appears as editable text (read: it is not part of the {{Quote}} template)

Event Timeline

This content is being interpreted as a "complex transclusion". The explanation in T137942: Template + First paragraph treated like a complex transclusion might be relevant.

Note that many of the templates on beta are broken in that they have extra linebreaks. In general it is better to test with live templates, although in this case it is broken (differently) on live too:

After switching to visual the template has been expanded to editable text:

image.png (134×187 px, 2 KB)

After switching back both the template and the expansion are in the source:

image.png (107×555 px, 7 KB)

Note that many of the templates on beta are broken in that they have extra linebreaks. In general it is better to test with live templates

Good call. Noted.

...in this case it is broken (differently) on live too:

After switching to visual the template has been expanded to editable text:

image.png (134×187 px, 2 KB)

After switching back both the template and the expansion are in the source:

image.png (107×555 px, 7 KB)

@Esanders is the scenario you uncovered above deserving of a new tasks or would it be best to repurpose this task to resolve it.[1]


  1. I've reproduced the above here: https://en.wikipedia.org/w/index.php?title=User_talk%3APPelberg_%28WMF%29&type=revision&diff=964006022&oldid=960023714

Let's create two tasks as they may have different solutions.

Let's create two tasks as they may have different solutions.

On it. Can you please give T256333 a read and edit it for accuracy and completeness?

This will be obsolete after T256150

Considering the decision we made today to move forward with T256150 (for reasons explained in T256150#6265908), I am moving this to the backlog.