Page MenuHomePhabricator

[Epic] Fix issues with {{reflist}} or missing references lists and main+details sub-references
Closed, ResolvedPublic

Assigned To
None
Authored By
WMDE-Fisch
Jun 20 2025, 8:38 AM
Referenced Files
None

Description

Context

This is meant as an umbrella ticket to manage WMDE-TechWish 's refactoring work in Cite and VE to fix know issues with the {{reflist}} template or missing references lists and main+details[1] sub-references. The main reason for these issues is the current implementation of how a reference including main and details content is handled in VE. Currently this is done by adding a "synthetic list defined" MWReferenceNode for storing the main content to the references list. When the reference list is not present on fresh articles, when it gets deleted or due to the use of a {{reflist}} template this leads to some problems.

[1]

<ref name="book" details="page 1">Miller</ref>

Solution

We identified the need to store references more independently of a synthetic MWReferenceNode. The reference nodes are very close to <ref> tags in Wikitext and will only appear once in the document when a ref or a main+details occurs. InternalItemNodes are the objects that store the content of references. So to solve the described problems we're working on changes that allow us to access two different InternalItemNodes from sub-references without the need that the main content is also associated with a distinct MWReferenceNode. It still can be for cases where the main ref is ( manually ) list defined or elsewhere reused in the article, but it does not has to.

Goals

Known use cases with issues

When using main+details with the {{reflist}} template or with a missing reference list a VE user can...

Publishing step:

Optional

VisualDiff:

Related Bugs

{{Reflist}}

T395083: VE: Cannot render main content from inline main+details when {{reflist}} is used

Deleted/Missing References List

T402900: Avoid orphaning subrefs when a reference list is deleted
T404297: Adding main+details references to an empty article leads to content loss

Other

T403573: Synthetic list defined refs can be orphaned

WIP

https://docs.google.com/document/d/13ZScENROJkVj1J-PJjF2qgVLtTg5TgEO7meguT9v724/edit?tab=t.q8g9ceit3aom#heading=h.dmy7uhvasd4o

Related Objects

StatusSubtypeAssignedTask
DuplicateNone
ResolvedNone
DuplicateNone
DeclinedNone
Resolvedawight
InvalidNone
InvalidNone
Resolvedawight
DuplicateNone
DeclinedNone
Resolvedawight
InvalidNone
DeclinedSpikeNone
InvalidNone
InvalidNone
ResolvedNone
ResolvedBUG REPORTTobi_WMDE_SW
DuplicateNone
DeclinedNone
InvalidNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedBUG REPORTNone
ResolvedBUG REPORTTobi_WMDE_SW
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedMareikeHeuerWMDE
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedTobi_WMDE_SW
ResolvedTobi_WMDE_SW
ResolvedTobi_WMDE_SW
InvalidNone
ResolvedTobi_WMDE_SW
ResolvedNone
ResolvedNone

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
WMDE-Fisch renamed this task from [Epic] Fix known issues with the {{reflist}} template or missing references lists and main+details sub-references to [Epic] Fix issues with {{reflist}} or missing references lists and main+details sub-references.Mar 25 2026, 9:03 AM

Change #1277560 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Cite@master] Reduce usages of MWDocumentReferences.static.refsForDoc

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

Change #1277560 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Reduce usages of MWDocumentReferences.static.refsForDoc

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

Change #1180837 merged by jenkins-bot:

[VisualEditor/VisualEditor@master] Optimize/document ve.dm.InternalListNodeGroup implementation

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

Change #1170169 merged by jenkins-bot:

[VisualEditor/VisualEditor@master] Remove InternalList's dependency on document.buildingNodeTree

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

Change #1298305 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (f49818bd3)

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

Change #1298305 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (f49818bd3)

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

WMDE-Fisch claimed this task.

Issues regarding the {{reflist}} template are resolved. So the epic is done. We're ready for deploying the feature to Wikis with {{reflist}}

Leftovers are tracked separately

Change #1302948 had a related patch set uploaded (by DLynch; author: DLynch):

[VisualEditor/VisualEditor@master] Restore InternalList's dependency on document.buildingNodeTree

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

Change #1302948 merged by jenkins-bot:

[VisualEditor/VisualEditor@master] Restore InternalList's dependency on document.buildingNodeTree

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

Change #1302951 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (0930c3a9e)

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

Change #1302952 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/extensions/VisualEditor@wmf/1.47.0-wmf.7] Update VE core submodule to master (0930c3a9e)

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

Change #1302953 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/extensions/VisualEditor@wmf/1.47.0-wmf.6] Update VE core submodule to master (0930c3a9e)

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

Change #1302951 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (0930c3a9e)

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

Change #1302953 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@wmf/1.47.0-wmf.6] Update VE core submodule to master (0930c3a9e)

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

Change #1302952 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@wmf/1.47.0-wmf.7] Update VE core submodule to master (0930c3a9e)

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

Mentioned in SAL (#wikimedia-operations) [2026-06-16T21:58:59Z] <kemayo@deploy1003> Started scap sync-world: Backport for [[gerrit:1302953|Update VE core submodule to master (0930c3a9e) (T406841 T429174 T397501 T424632 T429355)]], [[gerrit:1302952|Update VE core submodule to master (0930c3a9e) (T397501 T424632 T429355)]]

Mentioned in SAL (#wikimedia-operations) [2026-06-16T22:01:11Z] <kemayo@deploy1003> kemayo: Backport for [[gerrit:1302953|Update VE core submodule to master (0930c3a9e) (T406841 T429174 T397501 T424632 T429355)]], [[gerrit:1302952|Update VE core submodule to master (0930c3a9e) (T397501 T424632 T429355)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-06-16T22:07:10Z] <kemayo@deploy1003> Finished scap sync-world: Backport for [[gerrit:1302953|Update VE core submodule to master (0930c3a9e) (T406841 T429174 T397501 T424632 T429355)]], [[gerrit:1302952|Update VE core submodule to master (0930c3a9e) (T397501 T424632 T429355)]] (duration: 08m 11s)