Page MenuHomePhabricator

Copy-and-pasting a reference between VE surfaces causes a Parsoid 500 error
Closed, ResolvedPublic8 Estimated Story Points

Description

Steps to reproduce

  1. Open https://en.wikipedia.org/wiki/User:Neil_P._Quinn-WMF/Parsoid_500_a?veaction=edit and https://en.wikipedia.org/wiki/User:Neil_P._Quinn-WMF/Parsoid_500_b?veaction=edit.
  2. Copy and paste the reference from surface b into surface a.
  3. The auto-generated <references /> block now displays "2. This reference is defined in a template or other generated block, and for now can only be edited in source mode." instead of the reference text.
  4. Try reviewing your changes (or saving). The save dialog returns the error "Could not start the review because your revision matches the latest version of this page."
  5. Add something between the two references, like a space or an X or a line break.
  6. Try reviewing your changes (or saving). Parsoid now returns a 500 error.

Browsers

Occurs in Firefox and Safari, but not Chrome.

Event Timeline

nshahquinn-wmf raised the priority of this task from to High.
nshahquinn-wmf updated the task description. (Show Details)
nshahquinn-wmf subscribed.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

It breaks as described above in Firefox. On Chromium, the formatting looks odd (the pasted reference being bigger than the original one) but there is no lack of detected changes if the references are adjacent, and no Parsoid error if the references are separated by an 'X'.

nshahquinn-wmf renamed this task from Copy-and-pasting a reference between VE surfaces causes a Parsoid 500 error. to Copy-and-pasting a reference between VE surfaces in Firefox causes a Parsoid 500 error..Jun 29 2015, 6:38 PM
nshahquinn-wmf set Security to None.
nshahquinn-wmf renamed this task from Copy-and-pasting a reference between VE surfaces in Firefox causes a Parsoid 500 error. to Copy-and-pasting a reference between VE surfaces causes a Parsoid 500 error..Jun 29 2015, 6:45 PM
nshahquinn-wmf updated the task description. (Show Details)

I don't notice anything blatantly weird in the paste buffer. Ed?

Jdforrester-WMF renamed this task from Copy-and-pasting a reference between VE surfaces causes a Parsoid 500 error. to Copy-and-pasting a reference between VE surfaces causes a Parsoid 500 error.Jul 3 2015, 5:50 PM

There is no reference body, just an id. We need to tell the converter to never use originalDomElements if the HTML is for the clipboard.

Change 223770 had a related patch set uploaded (by Esanders):
Never use orignal data optimisation when in clipboard mode

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

Change 224172 had a related patch set uploaded (by Jforrester):
Never use original data optimisation when in clipboard mode

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

Change 223770 merged by jenkins-bot:
Never use original data optimisation when in clipboard mode

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

Change 224172 merged by jenkins-bot:
Never use original data optimisation when in clipboard mode

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