Page MenuHomePhabricator

Can't paste wikitext references
Closed, ResolvedPublic8 Story Points

Description

Steps to reproduce:

  1. Copy this:

<ref name="Example">Burci, Gian Luca; Vignes, Claude-Henri (2004-01-01). [https://books.google.com/books?id=Xou_nD9jJF0C ''World Health Organization'']. Kluwer Law International. ISBN 9789041122735. Pages 15–20.</ref>

  1. Open a page in the visual editor and paste it in. Make no other edits.
  1. Wait for the wikitext to convert. See spurious claim that it doesn't exist when you select the ref number:

  1. See error when you try to review your changes or save the page: "Could not start the review because your revision matches the latest version of this page."

Details

Related Gerrit Patches:
mediawiki/extensions/VisualEditor : wmf/1.27.0-wmf.23Wikitext paste: Discard autoGenerated items after conversion
mediawiki/extensions/VisualEditor : masterWikitext paste: Discard autoGenerated items after conversion

Event Timeline

Restricted Application added a project: VisualEditor. · View Herald TranscriptMay 3 2016, 2:10 AM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald Transcript
Elitre added a subscriber: Elitre.May 3 2016, 10:10 AM
Esanders added a subscriber: Esanders.

Parsoid have stopped inlineing the HTML for references, and we deliberately throw away the auto-generated reference list...

ssastry added a subscriber: ssastry.May 3 2016, 1:50 PM

Parsoid have stopped inlineing the HTML for references, and we deliberately throw away the auto-generated reference list...

I haven't looked more at what this is about, but do you know if this this new?

Esanders renamed this task from Can't paste wikitext for refs into Firefox to Can't paste wikitext references.May 3 2016, 2:12 PM
Esanders triaged this task as High priority.

Change 286656 had a related patch set uploaded (by Esanders):
Wikitext paste: Discard autoGenerated items after conversion

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

We used to be able to get the references contents from body.html, but not we only get body.id - which means our approach of filtering 'autoGenerated' items from the imported HTML throws away the only copy of the reference body.

The above patch moves the 'autoGenerated' filtering to after the HTML has been converted, solving the issue.

We used to be able to get the references contents from body.html, but not we only get body.id - which means our approach of filtering 'autoGenerated' items from the imported HTML throws away the only copy of the reference body.

Yes, providing only body.id instead of body.html for <ref> tags has been in place for a long time now .. since T88290: Update data-mw encoding for <ref> tags to point to the HTML content in the <references /> output rather than duplicating it.

This was reported in Google Chrome 49.0.2623.112 and I reproduced it in Firefox 45 but not Safari 9. For the problems in Safari, see T125034 instead.

Jdforrester-WMF set the point value for this task to 8.

Change 286863 had a related patch set uploaded (by Jforrester):
Wikitext paste: Discard autoGenerated items after conversion

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

Change 286656 merged by jenkins-bot:
Wikitext paste: Discard autoGenerated items after conversion

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

Change 286863 merged by jenkins-bot:
Wikitext paste: Discard autoGenerated items after conversion

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