WMDE Technical Wishes/Reusing references/Research

From Meta, a Wikimedia project coordination wiki

Research results: reusing references[edit]

After the focus area “Reusing references” was determined by the German wiki communities, the Technical Wishes team started a call for problems. Many problems were submitted by contributors of the German-speaking wikis. Additionally, our team took a dive into Phabricator, where lots of technical problems around reusing references had been reported, several of them more than ten years ago. Members of the Technical Wishes team sketched user workflows around reusing references, and also tried the referencing system on their own, which brought more problems to light.

As a result, we have a collection of many different problems around reusing references. You can find a summary of all of them below. In some cases, solutions were suggested. We have not listed solutions here, and described the underlying problems instead.

Because we, the Technical Wishes team, won’t be able to tackle all of them, we have narrowed down the scope of this project to a specific area of problems. By focusing on one area, we are hoping to use some of the insights we get from working on one problem to solve other problems, which should lead to more improvements overall. The area we’ll be focusing on is reusing references within an article. This is where most problems were found, and the wish that was mentioned most often also falls into this category: reusing a reference with different details (e.g. a different page number) on the same article.

Problems with reusing references within an article[edit]

Here’s a list of all identified problems that are within the defined scope for the Technical Wishes team. We won’t be able to tackle all of them within the timeframe of this focus area. If you want to know which of these problems we’ll be working on or which ones we’re currently investigating for feasibility, please have a look at our project list on the overview page of our focus area.

Problems in the visual editor (VE)[edit]

Citation dialog doesn’t allow reuse of the same reference with different details, e.g. page number, chapter, …[edit]

I want to reuse a reference from the article I’m editing, but I want to cite a different page, a different chapter, or give other additional information (e.g. a quote). In the “re-use” tab of the citation dialog, I can only select this reference as it is, and it doesn’t provide the option to change its details, e.g. change or add a page number, for the specific reuse of the same reference. (T96536) I also can’t use the {{rp}} template in the citation dialog in the visual editor.

VisualEditor does not always accurately count how many times a reference is used on a page[edit]

When a named reference is defined in the reference list (i.e. not in the article text), the reference preview popup in the visual editor counts the definition of the reference as  an extra use of it on the page. (T241885)

Editing a copied reference updates the original reference without warning[edit]

I want to reuse a reference from the article that I’m editing, but I want to cite a different page number. I copy the footnote marker to reuse it, paste it and then edit the reference to cite a different page. But when I edit the copied reference, it also updates the original reference without a clear warning or indication that this change was applied to both instances of the reference. (T239337, T212609, T122905)

Impossible to name references or change a reference name[edit]

When I edit a reference in the visual editor, I cannot assign a name to it, so that it can be reused. Reference names that have been defined in wikitext are shown in the re-use dialog in the visual editor, but they can’t be edited anywhere in the visual editor. (T52568, T222741, T245199, [1], [2])

Impossible to edit a reference when it's embedded in a template[edit]

When a reference is added within a template (like an infobox or a reflist), it cannot be edited in the visual editor. (T52896).

Impossible to reuse a reference from the main text of the article in an image caption[edit]

I want to add a reference inside an image caption. I want to reuse a reference that is already used in the article. When I open the media settings dialog, go to the caption field and “add citation”, the re-use tab doesn’t list any of the references from the main article. (T62919)

VisualEditor shows wrong error for broken references[edit]

I am editing in VisualEditor and I want to edit a broken reused reference where the original definition got lost, for example because the paragraph was accidently removed in wikitext, or because I pasted over a named reference without its definition from another article. But I can’t edit this reference. The VisualEditor shows an error message, saying I can only edit this reference in source mode, because it’s defined in a template or other generated block. (T244671)

Impossible to reuse a reference from the main text of the article in a template[edit]

I want to add a reference inside a template (e.g. an infobox). I want to reuse a reference that is already used in the article. When I open the template dialog, I don’t have access to the visual editor citation dialog to look for and reuse references. I can only add references using wikitext syntax. (T52474, T63505)

Numbers of footnote markers sometimes don’t match the numbers in the reference list[edit]

In the visual editor, the numbers of the footnote markers in the body of the article sometimes don't match the reference numbers in the <references> section at the bottom of the article. This problem only occurs while editing an article, and once the article is saved, the numbers are correct. (T52474)

Pasted reused reference is sometimes given an existing automatic number[edit]

When I paste a reference from another article, it sometimes happens that the visual editor assigns an automatic name to this reference with a number that already exists in the article, which creates an error, but only after the page is saved. (T215867)

Copy-pasted duplicate reference is given a new name by VE[edit]

When I paste a reference from another article (from inside a template, or also from a Word document, a previous revision of the page, etc.), it sometimes happens that the visual editor gives the pasted reference a new automatic name although a reference with the same content already exists on the page, thus creates a duplicated reference. (T312050, T272251)

Sometimes VE breaks the connection between reused and parent named reference[edit]

When copying a named reference that is reused multiple times in an article  and pasting it back into the article, the reference sometimes gets renamed automatically, meaning it is no longer linked to the reused references. (T103415). When replacing the {{reflist}} template, which contains a named reference that is reused in the article, with a <references> section, the parent named reference disappears and the reused references are left behind without any content (T152070). In both cases, this creates an error message only after the page is saved.

The “find and replace” feature in VisualEditor cannot find text in footnote body, marker, or reference list[edit]

I am editing in the visual editor and want to search for a footnote marker number (like [15]), content in a footnote or in the reference list. I use <control> + F, but I don’t get any search results. (T110496, T110364, T208751)

Sometimes search for reference group names in the re-use tab of citation dialog returns no results[edit]

I am working on an article that uses reference groups. I am trying to find and reuse a reference from the group “A”. References from that group are listed in the “re-use” tab of the visual editor citation dialog, but I cannot search for this group name or filter the list to only show references from that group. (T53838)

Unknowingly using the same URL or ISBN in the citation dialog as an existing reference on the page creates duplicates in the reference list[edit]

I am using the visual editor and want to add more references to articles via the citation dialog. In the “automatic” tab, I insert some content (URL, ISBN, DOI, etc.), without knowing that it is already used in a reference on that article page. The visual editor doesn’t detect and merge references; instead, it creates duplicates in the reference list. (community wishlist 2022)

Problems in wikitext[edit]

Impossible to use the <ref> syntax for reusing the same reference with different details, e.g. page number, chapter, …[edit]

I want to reuse a reference from the article that I’m editing, but I want to cite a different page number. I can’t use <ref> syntax for this. My only option is to create a whole new reference with a different page number, which also makes the references list very long.

On some wikis, the {{rp}} template offers a workaround, but this only works for pages, not for chapters, etc. (T100645, T239228, T242227)

Auto-numbered references generated by the visual editor are problematic[edit]

When someone has created a reused reference via the visual editor, the visual editor creates named references with automatic numbers, such as name =":0", name=":1", etc in wikitext. I see these numbers when I edit the wikitext and am confused by them, because the numbers give me no indication about the reference content.  and the numbers don’t necessarily match the number of the footnote marker in the article. (T92432, [1], [2])

The “re-use” tab is disabled in the 2017 wikitext editor[edit]

The 2017 wikitext editor includes the citation dialog from the visual editor but the “re-use tab” is disabled. (T321693, T164954)

Adding an identical reference to a page creates duplication[edit]

I am adding a reference to an article. A reference with identical content already exists in this article, but I don’t know that. The new reference gets a new footnote marker number. If the existing reference is named, that name isn’t assigned to the new reference. There is no duplicate warning or auto-merging of identical references. (T274432, T202593)

Deleting a paragraph where a named reference is defined breaks its reuses on the page[edit]

When I am removing a paragraph where a named reference is defined, there is no warning that this reference is reused elsewhere in this article. Once I preview or when I save the article, an error is shown that the other instances of this reference have no content.

Reusing an existing name for new bibliographic content means the new content is not shown in the visual editor or the article[edit]

I am adding a new reference to an article and give it a name so I can reuse it, e.g. <ref name=”Noah2023”>, without knowing that another reference in this article was already named ”Noah2023”. As a result, the published article, the article preview and VisualEditor only show the reference content of the named reference whose definition appears first in the wikitext, and the other source is not shown at all.

Out of scope[edit]

The following problems were submitted by wiki contributors or encountered by the Technical Wishes team, but they are outside of the defined scope for this focus area. That means they won’t be addressed by the Technical Wishes team.

Problems within an article, not per se about reusing references[edit]

Several problems were submitted that were not about reusing references but around using them in general. These problems were very helpful for understanding the whole topic of referencing and the shortcomings that exist in this area. We won’t be able to prioritize those general problems, but we are hopeful that our work around reusing references will also alleviate some of them.

Problems with reusing references from outside of an article[edit]

Central storage for citations (WikiCite)[edit]

A wish to have a central space where all citations are stored and managed was mentioned several times. This is clearly outside the scope of this focus area and the Technical Wishes team. The Shared Citations project from WikiCite, however, is developing a proposal for such an approach.

Impossible to add an automatic citation in the reference list[edit]

I am editing in the visual editor and I want to create a bibliography (e.g. list of books) for an article using the “automatic” tab in the citation dialog. But I can only use this tab to create a footnote with a footnote marker and an entry in the reference list. I cannot generate an automatic citation that is not wrapped in <ref> tags.

Converting a reference with automatic URL converter stops with no fallbacks[edit]

I am editing in the visual editor and want to convert a basic reference that contains a URL into a formatted reference using a template. I click on the footnote marker and then on the “convert button”. This opens the “automatic” tab of the citation dialog with the URL copied into the URL field. If the dialog can’t convert the URL into a reference, I am asked to click on the “manual” tab in the same dialog. When I do that, the URL is not copied over from the other tab. I need to close the citation dialog and copy the URL from the basic reference. (T284729 )

Citation dialog recognizes QIDs, but applies templates not optimized for Wikidata linking[edit]

I am editing in the visual editor and want to insert a reference using a QID, i.e. a reference containing a citation from bibliographic data stored in Wikidata. The citation dialog “automatic” tab accepts QIDs, but it inserts the information from Wikidata into templates that are not optimized for Wikidata linking (instead of using the template {{Cite Q}}). (T289287, [1])

Citation templates are different across different language wikis[edit]

I am translating an article from a wiki in one language to a wiki in another language, and the source wiki uses citation templates. Because the citation templates have different names and or/parameters in the other language wiki, I have to manually transfer the citation content from one template to another.

Note: A feature already built into Content Translation can automatically convert these templates, if the templates and its parameters are mapped in the tool, but that’s not the case for all templates and languages.

References pasted from Zotero are stripped of structured data and appear as HTML[edit]

I am using the visual editor and want to drag & drop or copy & paste a reference from Zotero (using "copy bibliography") to an article. But the visual editor doesn’t recognize the structured bibliographic data that Zotero offers and converts the reference to plain text, formatted as HTML (like "Last, First, <i>Book Title</i>.").

Edits to individual citations are frequent and flood personal watchlists[edit]

As an editor who actively watches my personal watchlist, I'm trying to identify recent edits to content that is important to me. But edits to individual citations on pages I'm watching are frequent and flood my watchlist; I cannot easily filter these out. This is true for all sorts of edits, but particularly relevant to citations, because citations are frequently edited independently of content.

Cannot easily copy data from existing non-template citation from the article page to create a template citation in the citation dialog[edit]

I am an experienced editor and I am using the visual editor to convert an existing <ref> tag citation into a template (in a reference or in the Bibliography section). When the citation dialog is open, I cannot view or select other page content. I have to copy and paste data, switching back and forth many times.

I cannot use the citation dialog to put references within a template[edit]

I am using the visual editor and want to add a citation inside a template (e.g. an infobox). I cannot use the citation dialog from the template dialog, nor copy-paste the reference into the template dialog. Values of template parameters, including citations, can only be added as raw wikitext in the template dialog. (T168334)

Wikitext source is hard to read when references are defined within the article body[edit]

I am working in wikitext mode, and I'm trying to proof-read and clean-up the wikitext source of existing, often complex articles. I am currently not focused on references. But the wikitext source is hard to read when there are many and long <ref> tags in there. When reference content is defined within paragraphs, this makes it hard to see where the paragraph's text continues, which is sometimes multiple lines lower.

Note: This is a question of community standards so it is out of scope for the Technical Wishes team. It may be improved by our work (more reuse → shorter references).

Possible workarounds for this problem are:

  • Do proofreading of article content in VisualEditor.
  • Use syntax highlighting to visually separate article content from tags etc.
  • The WikEd gadget comes with a WYSIWYM mode where <ref> can be collapsed in the wikitext editor.
  • List-defined references (LDR) move the long wikitext code to the bottom of the article. Some contributors suggest to automate or even enforce this, but not all agree.

It's hard to find where a reference was defined in an article[edit]

I am trying to find the location where a reference was defined in an article. But it is hard because references can be named anywhere in the wikitext where the reference was first added.

Note: This is a question of community standards so it is out of scope for the Technical Wishes team.

General problems[edit]

It is hard to find information on how to correctly reuse a reference[edit]

On the help pages around references, it is hard to find understandable information on how to reuse references (at least on German Wikipedia). Part of the problem is that a good solution for reusing a reference with different details does not exist yet.

Note: This problem is out of scope for the Technical Wishes team because help pages are generally in the hands of community. What we will do is to create or update help pages on mediawiki.org and give pointers to the wiki communities via Tech/News, once a solution has been implemented, so that wiki communities can update their local help pages based on that.