Page MenuHomePhabricator

If a reference is defined in a template, and re-used outside of it, and you delete the template, then the reference contents get lost; similarly, copying citations defined inside a template doesn't work
Open, LowestPublicFeature

Description

Steps to Reproduce:

  1. Start with a page that contains:

(a) a template with a named ref inside it: {{quote|Text.<ref name=Foo>Example citation</ref>}}

(b) Some text outside the template that re-uses that citation: Text.<ref name=Foo />

  1. Open the page in VisualEditor and remove the template.

Actual Results:
The named ref becomes undefined. VisualEditor doesn't "see" the citation inside the template, so it can't rescue the re-used template-based citation content when the template is deleted.

Expected Results:
That the citation content would be preserved, just like it is preseved when the first instance of a re-used citation in regular page text (outside of templates) is removed.

Reproducible: Always


Version: unspecified
Severity: enhancement

Details

Reference
bz65301

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 3:09 AM
bzimport set Reference to bz65301.

Also, if the only refs are hidden in templates, then when you add a <references /> block, you get the error mesage that "There are no references on this page to include in this list."

Jdforrester-WMF renamed this task from VisualEditor: If a reference is defined in a template, and re-used outside of it, and you delete the template, then the reference contents get lost to If a reference is defined in a template, and re-used outside of it, and you delete the template, then the reference contents get lost; similarly, copying citations defined inside a template doesn't work.Feb 2 2016, 8:20 PM
Jdforrester-WMF lowered the priority of this task from Low to Lowest.
Jdforrester-WMF set Security to None.
Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 11:14 AM
Aklapper removed subscribers: rmoen, TrevorParscal.