Page MenuHomePhabricator

VisualEditor: MWReferenceList throws exception when pasted with a reference into a new document
Closed, ResolvedPublic

Description

The Errors

Steps to reproduce:

1.Open an editor which has a text with reference and the reflist
For example:

text with reference[1]
↑ ref

2.Try to paste it into a different page

Observed Result:
Uncaught TypeError: Cannot read property 'length' of undefined appears and nothing gets pasted.

However the "Save Page" button is active and clicking on that gives the error:
Uncaught TypeError: Cannot call method 'getRange' of undefined


Version: unspecified
Severity: major

Attached:

Details

Reference
bz58242

Event Timeline

bzimport raised the priority of this task from to High.
bzimport set Reference to bz58242.
Ryasmeen created this task.Dec 9 2013, 11:02 PM

Test Environment: betalabs
Browser: Chrome Version 26.0.1410.65
OS: MAC OS X 10. 8. 5
Example Page with reference and reflist: :http://en.wikipedia.beta.wmflabs.org/wiki/Bold?veaction=edit

I am escalating this issue, because it is now reproducible in production:https://en.wikipedia.org/wiki/ and after this action copy-paste does not work from one VE to another.

In production, go to this page :https://en.wikipedia.org/w/index.php?title=User:RYasmeen_%28WMF%29/12th_december&veaction=edit

Copy the last reference along with reference list and try to paste it into another page.
And after that nothing can be copied into the other VE

Change 101131 had a related patch set uploaded by Esanders:
Check InternalList node exists when rendering MWReferenceList

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

Change 101133 had a related patch set uploaded by Catrope:
Check InternalList node exists when rendering MWReferenceList

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

Change 101131 merged by jenkins-bot:
Check InternalList node exists when rendering MWReferenceList

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

Change 101134 had a related patch set uploaded by Catrope:
Check InternalList node exists when rendering MWReferenceList

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

Change 101134 merged by Catrope:
Check InternalList node exists when rendering MWReferenceList

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

Change 101133 merged by Catrope:
Check InternalList node exists when rendering MWReferenceList

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

Now being deployed on wmf6 and wmf7.

Checked the fix in production.The issue specified in this bug is fixed.Reference is getting pasted with reference list and the subsequent elements are getting copy-pasted properly.But still there is a problem with pasting reference :(

The reference is getting copied as an empty <ref/> tags and on edit mode it says
The reference is defined in a template or other generated block and for now can only be edited in source mode.

In read mode: There is an error:Cite error: The opening <ref> tag is malformed or has a bad name (see the help page).

Should I create a different issue ticket for that?

Yes please. Give steps with wikitext to reproduce.