Page MenuHomePhabricator

[Epic] Fix issues with {{reflist}} or missing references lists and main+details sub-references
Open, In Progress, Needs TriagePublic

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
In ProgressNone
DuplicateNone
DeclinedNone
Resolvedawight
InvalidNone
InvalidNone
Resolvedawight
DuplicateNone
DeclinedNone
OpenNone
ResolvedNone
ResolvedNone
OpenMareikeHeuerWMDE
OpenNone
Resolvedawight
InvalidNone
DeclinedSpikeNone
InvalidNone
InvalidNone
ResolvedNone
OpenBUG REPORTNone
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

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

[VisualEditor/VisualEditor@master] Remove unused ve.dm.InternalList.getUniqueListKey method

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

Change #1249239 merged by jenkins-bot:

[VisualEditor/VisualEditor@master] Remove unused ve.dm.InternalList.getUniqueListKey method

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

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

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

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

Change #1250548 abandoned by Esanders:

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

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

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

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

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

Change #1243080 merged by jenkins-bot:

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

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

WMDE-Fisch renamed this task from [Epic] Use InternalItems only instead of synthetic LDRs to store content for sub-refs to [Epic] Fix known issues with the {{reflist}} template or missing references lists and main+details sub-references.Mar 24 2026, 5:29 PM
WMDE-Fisch updated the task description. (Show Details)
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