Page MenuHomePhabricator

Copying the (plain) text of citations from a reference template, and pasting that text into a Basic citation form, doesn't work as expected
Closed, DeclinedPublic

Description

This is an example of unexpected behavior: https://fr.wikipedia.org/w/index.php?title=Économie_territoriale&diff=prev&oldid=121933123

Steps to reproduce:

  1. Open that page (or any similar one) in VisualEditor.
  2. Scroll down to the ==References== section.
  3. Find a citation that is created with the {{ouvrage}} or a similar citation template and displayed in that section by the {{Références}} template.
  4. Select and copy the text of that citation.
  5. Click the "Cite" button and go to Manual > Basic.
  6. Paste in the citation. (Make changes here, if you want to.)
  7. Save the page.

The diff shows two unusual results:

  • Some of the copied "text" got lost. In particular, it's odd that the title of the book is missing.
  • Some of the information is wrapped in HTML tags that label <time> elements and <abbr>eviations .

The editor, who was trying to cite a different page number in the same work, probably hoped that the entire citation template would be copied this way.

Event Timeline

Whatamidoing-WMF raised the priority of this task from to Needs Triage.
Whatamidoing-WMF updated the task description. (Show Details)
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald Transcript

I've been trying to reproduce this. I've been successful once today, but then I went back to make sure I had all of the steps in order and was starting with an empty paste buffer, and now I can't.

The problem is doing step 4 after doing step 1. It's easy to reproduce this error by copying the text of the citation from an article in Read mode. But it's at least very difficult (and supposed to be impossible) to select text in the ref block when you're in the visual editor. Perhaps this requires copying from Read mode?

For this article, the plain text of the citation, if you select it all in Read mode, copy and paste it into a text file, says:

↑ Améziane Ferguène, Économie territoriale et développement local : Concepts et expériences, Paris, Éditions Campus ouvert,‎ 2013, p. 35

The visible result when pasting it into the VisualEditor is:

↑ Améziane Ferguène, , Paris, Éditions Campus ouvert,‎ 2013, p. 35

The resulting wikitext is:

<ref>↑ Améziane Ferguène, , Paris, Éditions Campus ouvert,‎ <time>2013</time>, <abbr>p.</abbr> 35</ref>

And the original HTML is:

<li id="cite_note-:0-13"><span class="noprint renvois_vers_le_texte"><a href="#cite_ref-:0_13-0">↑</a></span> <span class="reference-text"><span class="ouvrage" id="Fergu.C3.A8ne2013"><span class="ouvrage" id="Am.C3.A9ziane_Fergu.C3.A8ne2013">Améziane Ferguène, <cite class="italique">Économie territoriale et développement local&#160;: Concepts et expériences</cite>, Paris, Éditions Campus ouvert,‎ <time>2013</time>, <abbr class="abbr" title="page(s)">p.</abbr>&#160;35<span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=%C3%89conomie+territoriale+et+d%C3%A9veloppement+local&amp;rft.place=Paris&amp;rft.pub=%C3%89ditions+Campus+ouvert&amp;rft.stitle=Concepts+et+exp%C3%A9riences&amp;rft.aulast=Fergu%C3%A8ne&amp;rft.aufirst=Am%C3%A9ziane&amp;rft.date=2013&amp;rft.pages=35&amp;rfr_id=info%3Asid%2Ffr.wikipedia.org%3A%C3%89conomie+territoriale" id="COinS_34029"></span></span></span></span></li>

At minimum, if the plain text that you copied (even if you copied it in Read mode) includes the title of the book, then that title ought to be present when you paste it into VisualEditor.

Whatamidoing-WMF renamed this task from Copying citations from a reference template doesn't work as expected to Copying the (plain) text of citations from a reference template, and pasting that text into a Basic citation form, doesn't work as expected.Feb 2 2016, 10:52 PM
Whatamidoing-WMF reopened this task as Open.
Whatamidoing-WMF set Security to None.

The {{reflist}} template may be a red herring. The same (wrong) behavior is seen if you just place this plain citation template on the page, sans <ref> tags or anything else related to Cite.php:

* {{Ouvrage|langue = français|auteur1 = Améziane Ferguène|titre = Économie territoriale et développement local|lieu = Paris|éditeur = Éditions Campus ouvert|année = 2013|pages totales = |isbn = |lire en ligne = |passage = 35|sous-titre = Concepts et expériences}}

Perhaps the appropriate title might be "Why doesn't VisualEditor paste the title of books from {{Ouvrage}} at fr.wp?"

Jdforrester-WMF changed the task status from Open to Stalled.Mar 22 2016, 7:12 PM
Jdforrester-WMF subscribed.

There is no References section in the link you provide…

There is no References section in the link you provide…

Unfortunately closing this Phabricator task as no further information where to try reproducing has been provided.

@Whatamidoing-WMF: After you have provided the information asked for and if this still happens, please set the status of this task back to "Open" via the Add Action...Change Status dropdown. Thanks!