Page MenuHomePhabricator

"Citation needed" template context offers to replace the template with a citation, but only adds a citation after it
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:

The placeholder citation ([...]) appears after the citation needed template.

CleanShot 2026-02-20 at 23.19.11@2x.png (266×948 px, 42 KB)

Once done, a new citation is added after the citation needed template.

CleanShot 2026-02-20 at 23.20.07@2x.png (270×950 px, 70 KB)

What should have happened instead?:

The citation needed template should have been replaced with the placeholder and then the new citation.

Event Timeline

This was caused by https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Citoid/+/1204577 which made the replace function only work on reference nodes.

Note, for that button to be available it needs to have been configured via the MediaWiki:Visualeditor-template-tools-definition.json message (e.g. on enwiki).

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

[mediawiki/extensions/Citoid@master] Revert "Fix "replace" behavior deleting unrelated nodes"

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

Change #1242238 merged by jenkins-bot:

[mediawiki/extensions/Citoid@master] Revert "Fix "replace" behavior deleting unrelated nodes"

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

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

[mediawiki/extensions/Citoid@master] CitoidInspector should never destroy reference lists

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

Tobi_WMDE_SW claimed this task.

Change #1243832 merged by jenkins-bot:

[mediawiki/extensions/Citoid@master] CitoidInspector should never destroy reference lists

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