Steps to replicate the issue (include links if applicable):
Add a reference group with a named reference in it that is not in the text, like so:
<references> <ref name="r">ref</ref> </references>
Render it with Parsoid.
What happens?:
The reference is displayed without error.
What should have happened instead?:
A cite_error_group_refs_without_references should be emitted, like it is the case with the legacy-parser implementation.
Note
As investigated and correctly reported by @EmptySora, this issue is actually an issue for any error that should be reported in a reference defined in a references block. T384598 has been closed as duplicate for this reason.
Implementation (for review)
Since errors are being added to nodes and read from there for the display, this case is problematic because an unused list defined ref does not have a node. Therefore there is no place to display the error with the current code structure.
Possible solutions:
- Add a new separate place to store errors (see also the discussed in the comment of this tickets).
- But since the unused refs look like a unique use case, I am suggesting a simple workaround for this use case. (If more use cases come up, the cleaner solution could still be added later.) See https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Cite/+/1267101.







