Page MenuHomePhabricator

Adding or updating a reference in VisualEditor does not update fake references blocks inside templates
Closed, ResolvedPublic8 Estimated Story Points

Description

When you add a new citation in VE, templates which wrap the <references /> tag do not update to display it until the page is saved. Examples include [[https://en.wikipedia.org/wiki/Template:Reflist|{{reflist}}]] on the English Wikipedia and [[https://es.wikipedia.org/wiki/Plantilla:Listaref|{{listaref}}]] on the Spanish Wikipedia. This bug doesn't block any of the core citation workflows (creating, editing, and reusing) since those are accessed from the toolbar and the in-text reference numbers, but it's still very annoying.

However, it remains unfixed because it's an extraordinarily hard technical challenge, verging on impossible given the current architecture of Mediawiki. No one has any idea what a workable solution would look like. Just to give one facet of the problem, you could implement this in VE right now if you completely re-parsed the entire page every time the user touched a template or a reference—which would be a horrible user experience and place insane loads on the servers. It's possible that in the future, someone will think up a brilliant solution that avoids all these huge issues, so this task remains open.

In the meantime, the planned solution is to update the <references /> tag, which does update properly during editing, to support multiple columns and alternative list styles so they have all the functionality of these templates (T53260). When that task has been completed, communities will be able to replace the templates with references tags at whatever pace and with whatever tools they prefer (if there's demand for it, it would probably be possible to do a more immediate, bot-driven changeover).

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:45 AM
bzimport set Reference to bz50769.

(In reply to comment #0)

What it says on the tin; the addition of a reference is not reflected in an
update to {{reflist}} or <references/> or whathaveyou.

I can't replicate the bug as described, but re-purposing to be about our desire to update fake reference lists inside templates on edit, rather than the current unhelpful not-updated-'til-page-save issue.

Note that we can't currently see a way to do this without round-tripping the entire page, which would be a sub-optimal solution, to put it mildly.

  • Bug 51607 has been marked as a duplicate of this bug. ***

So to clarify, it is a known bug that adding references will display the updated reference list when the <references /> tag is used in the article, but not when the {{reflist}} template is used?

nshahquinn-wmf renamed this task from VisualEditor: Adding a reference cannot update fake references blocks inside templates to Adding a reference in VisualEditor does not update fake references blocks inside templates.Jun 16 2015, 1:19 AM
nshahquinn-wmf updated the task description. (Show Details)
nshahquinn-wmf lowered the priority of this task from Medium to Lowest.Jun 16 2015, 6:35 PM
nshahquinn-wmf updated the task description. (Show Details)
nshahquinn-wmf updated the task description. (Show Details)
Ciencia_Al_Poder renamed this task from Adding a reference in VisualEditor does not update fake references blocks inside templates to Adding or updating a reference in VisualEditor does not update fake references blocks inside templates.Jun 29 2016, 1:55 PM
Ciencia_Al_Poder subscribed.

Note that we can't currently see a way to do this without round-tripping the entire page, which would be a sub-optimal solution, to put it mildly.

So, if <references/> directly on the page are supposed to work (they're updated on edit) but when they're inside a template not, it should be possible to make parsoid tag the template with a special property so only that template region gets updated (or the references list) and not the entire page. Note that I'm speaking without knowledge about how the entire thing works.

Change 408604 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/Cite@master] Treat template-generated reference lists as real ones

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

Change 408604 merged by jenkins-bot:
[mediawiki/extensions/Cite@master] Treat template-generated reference lists as real ones

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

Hi. Our wiki does not show any references in reflists at all in VE now, the list is empty. All of them are created by reference template, rather than by tag. I was not sure it's new indeed, because I do not use VE, but people say it wasn't like this before.

Deskana assigned this task to Esanders.
Deskana set the point value for this task to 8.