Page MenuHomePhabricator

Impossible to copypaste a specific template across windows
Closed, ResolvedPublicBUG REPORT

Description

Steps to Reproduce:

  1. Open a sample page with "Portály" template on cswiki (eg. Fritz Wolfgang London).
  2. Select the template at the bottom of the page and copy it (Ctrl+C).
  3. Open a random page for editing.
  4. Paste the template (Ctrl+V).

Actual Results:

  • Nothing is pasted, possibly an empty line.

Expected Results:

  • The template is pasted with all its parameters.

This issue is specific to this template.

Details

Related Gerrit Patches:

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 24 2019, 9:44 AM

This happens because the template HTML starts with a <style> node (generated by TemplateStyles). When copying a template, VisualEditor stores some metadata on the first node (e.g. the name of the template). But when pasting, we remove all <style> nodes (due to T185532), which means that this node is lost and as a result we lose the entire template.

Change 523802 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] ve.dm.MWTransclusionNode: Protect <style> nodes too when copying

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

Change 523802 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] ve.dm.MWTransclusionNode: Protect <style> nodes too when copying

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

matmarex moved this task from Inbox to Low Priority on the Editing QA board.Aug 9 2019, 4:56 PM
Ryasmeen edited projects, added Verified; removed Editing QA.Sep 6 2019, 10:40 PM
Ryasmeen moved this task from QA to Product owner review on the VisualEditor (Current work) board.
ppelberg closed this task as Resolved.Sep 20 2019, 11:05 PM
ppelberg claimed this task.