Page MenuHomePhabricator

In VisualEditor, references in templates cannot be reused and are numbered separately from references in the text.
Open, MediumPublic

Description

For example, look at this old version of w:en:Popocatépetl. It has 21 references, 3 of them in the infobox only. When you open it in VE, those first 3 cannot be accessed from the re-use menu. In addition, all 21 appear in the references list, but each reference x in the text corresponds to entry x + 3 in the references list.

See Also:
T52505
T53289
T54398
T55777
T54262

Details

Reference
bz50474

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
  • Bug 51058 has been marked as a duplicate of this bug. ***
  • Bug 63210 has been marked as a duplicate of this bug. ***
  • Bug 52742 has been marked as a duplicate of this bug. ***
  • Bug 69373 has been marked as a duplicate of this bug. ***

Notes for testing the future fix:

  • The references placed in the Infobox template should be numbered correctly along with the other page references
  • There should be no discrepancy in displaying reference numbering in Read mode or VE mode
  • also, check reference for class="toccolours" - the warning msg should be displayed: "This reference is defined in a template or other generated block, and for now can only be edited in source mode."

It doesn't seem to have been mentioned above that this bug can cause the loss of a citation, which might affect the severity or priority. If you have a ref inside a group note (e.g. inside a tag) and delete all other copies of the ref, including the base copy, VE is unable to transfer the base text to the copy of the ref in the tag, so the citation is lost.

GermanJoe added a subscriber: GermanJoe.

See en-Wiki feedback "Citation numbers messing up". This problem is repeatedly mentioned on en-Wiki, confuses editors and hinders editing of developed articles with complex reference structures. I would like to propose the whole issue with "references in templates" and "references generated by templates" as blocker. I am aware, that 5 other tasks are possible related to this problem (See also), maybe the whole topic area needs another fresh look for a solution. - the problem is known for almost 2 years now, and should get a higher priority and more frequent updates on its status.

In the weekly triage meeting on 2015-05-06, we discussed this task. Though we acknowledge that this is moderately confusing for users, fixing this is a very large piece of work (which reflects why it has not been completed in the past two years either). I've marked this as blocked by a piece of work that we hope to finish out this quarter, which will hopefully help make this slightly less epic to fix.

nshahquinn-wmf renamed this task from VisualEditor: References created by templates numbered alone, not with the rest of the page, and don't show up as references to insert to References in templates are numbered separately from references in the text and cannot be reused in VisualEditor.Jun 16 2015, 2:04 AM
nshahquinn-wmf updated the task description. (Show Details)
nshahquinn-wmf renamed this task from References in templates are numbered separately from references in the text and cannot be reused in VisualEditor to In VisualEditor, references in templates and image captions cannot be reused and are numbered separately from references in the text..Jun 16 2015, 8:47 PM
nshahquinn-wmf updated the task description. (Show Details)
nshahquinn-wmf renamed this task from In VisualEditor, references in templates and image captions cannot be reused and are numbered separately from references in the text. to In VisualEditor, references in templates cannot be reused and are numbered separately from references in the text..Jun 16 2015, 9:01 PM
nshahquinn-wmf added a project: Epic.

As a stop-gap measure, is it feasible to have the footnotes that are contained in templates (and therefore not "in" the document) be displayed differently? You would get the usual [1] for whatever is the first footnote in the article body, but the first one in an infobox would be marked as [X] or [Template 1] or something that doesn't match the typical ones.

This information is already shown in context and the reference list. If we change the numbering that will probably be more confusing.

Since T114105 was merged into this ticket, is there anything I could do to help solve this issue?

Since T114105 was merged into this ticket

In case anyone following that original ticket (or several like it) is confused about why these get merged here:

VisualEditor handles regular "Harvard" (parenthetical) citations perfectly; see true Harvard style at https://en.wikipedia.org/w/index.php?oldid=521737742&veaction=edit as an example. Plain Harvard is just plain text, after all; a proper Harvard citation is just (Author Date) with an optional page number. Any system that lets you type common characters can handle plain Harvard citations.

The problem is when it's not truly Harvard citations, but instead it's a non-Harvard short citation wrapped up in ref tags using a template such as {{sfn}} – when the system is presented with {{sfn|Author|Date|123}} instead of <ref name="Author Date">Author Date, page 123.</ref> (which VisualEditor can handle) or (Author Date, page 123) (which VisualEditor can also handle).

In that case, the main technical issue is exactly the same as {{infobox|field=data<ref>Source</ref>}}: the ref is stuck in a transclusion rather than in the article being edited. This has multiple effects, including impossible numbering and bad displays (because the transcluded doc gets its own <references /> list; see T114105 for a screenshot). As I understand it, some of these problems will be solved here, and others may be fixed through other mechanisms, e.g., T110909: Parsoid tripped up by extensions that process wikitext. But the bugs get merged here, because it's not possible to merge them to multiple related tasks.

Solving this (and its subtasks) would be a huge success. I'd be grateful.