Page MenuHomePhabricator

Book refs cannot extend references defined in {{#tag:references}}
Closed, ResolvedPublic5 Estimated Story Points

Description

Consider this wikitext:

<ref extends="A">A.1</ref>

{{#tag:references|
<ref name="A">A</ref>
}}

(which is simplified from that generated by enwiki's Template:Reflist)

Expected result

Book refs bug expected.png (75×148 px, 1 KB)

Actual result on en.wikipedia.beta.wmflabs.org

Book refs bug actual.png (87×1 px, 9 KB)

Event Timeline

Change 562499 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/Cite@master] Test cases for extends pointing to the <references> section

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

Change 562499 merged by jenkins-bot:
[mediawiki/extensions/Cite@master] Test cases for extends pointing to the <references> section

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

awight added a subscriber: awight.

The error is actually with the parent ref. It must be used outside of the <references> section:

<ref extends="A">A.1</ref>
<ref name="A" />

{{#tag:references|
<ref name="A">A</ref>
}}

I closed this too quickly. Behavior is indeed different if <references> is used instead, which is incorrect. The snippet given in the task description should be allowed, and implementation will require changes to the ReferenceStack "undo" logic.

Change 562854 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/Cite@master] Fix incomplete undo/redo stack implementation

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

thiemowmde set the point value for this task to 5.
thiemowmde moved this task from Backlog to Tickets in sprint on the Book-Referencing board.
thiemowmde moved this task from Sprint Backlog to Review on the WMDE-QWERTY-Sprint-2020-01-08 board.

Change 562854 merged by jenkins-bot:
[mediawiki/extensions/Cite@master] Fix incomplete undo/redo stack implementation

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

WMDE-Fisch moved this task from Demo to Done on the WMDE-QWERTY-Sprint-2020-01-08 board.
WMDE-Fisch added a subscriber: WMDE-Fisch.

Just validated on beta.