Page MenuHomePhabricator

VisualEditor: Template is getting pasted as a table while doing copy-paste
Closed, ResolvedPublic

Description

Table format in destination page

Steps to reproduce:

1.Open the editor.
2.Copy a template with a parameter which has a value and paste it into a different page
3.Copy a template which does not have any parameter and paste it into a different page
4.Copy a template with a parameter which does not have any value.

Observed Result:

1.All the template copied are getting pasted as a table
2.If you switch to the edit source you will see :

the template copied in step 2 has a table format
the template copied in step 3 is getting pasted in an empty template wikitext format:{|
!

}

the template copied in step 4 is getting pasted in a template wikitext format with the page name inside it:{|
!Copy

}

Version: unspecified
Severity: normal

Attached:

Details

Reference
bz58241

Event Timeline

bzimport raised the priority of this task from to High.
bzimport set Reference to bz58241.
Ryasmeen created this task.Dec 9 2013, 10:44 PM

Created attachment 14042
The edit source section for the destination page

Attached:

After pasting a template, which has parameter with no value, it does not let user to edit that template on the edit mode.
and shows a tooltip "Sorry this element can be edited in source mode now" with yellow bordered box.

See the screenshot attached

Created attachment 14043
tooltip and yellow bordered box

Attached:

Can you give a more specific example. The templates I'm testing on copy and paste okay.

For an example
if you go to this page :http://en.wikipedia.beta.wmflabs.org/w/index.php?title=Paste

I have copied three templates from http://en.wikipedia.beta.wmflabs.org/wiki/Copy
and they are having these issues.

Change 100775 had a related patch set uploaded by Esanders:
Fix issues with copy-pasting MWTransclusionNodes

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

Change 100775 merged by jenkins-bot:
Fix issues with copy-pasting MWTransclusionNodes

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

Change 100943 had a related patch set uploaded by Catrope:
Fix issues with copy-pasting MWTransclusionNodes

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

Change 100943 merged by Catrope:
Fix issues with copy-pasting MWTransclusionNodes

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

(And back-ported to wmf6.)