Page MenuHomePhabricator

Cite: 'Cite error references missing key' not properly invoked
Closed, DuplicatePublic

Description

"MediaWiki:Cite error references missing key" should be invoked when a reference is defined in a list, but not called in the content. For the first instance of such an error, "MediaWiki:Cite error references missing group" is erroneously invoked.

See http://en.wikipedia.org/wiki/Help:Cite_errors/Cite_error_references_missing_key


Version: unspecified
Severity: normal

Details

Reference
bz24600

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 11:10 PM
bzimport added a project: Cite.
bzimport set Reference to bz24600.
bzimport added a subscriber: Unknown Object (MLST).

I can confirm this behavior. Here is the most minimal example I can come up with:

<ref name="a" />
<references>
    <ref name="a">a</ref>
    <ref name="b">b</ref>
</references>
<references>
    <ref name="c">c</ref>
</references>

When the first <references> is rendered, it shows "Cite error: <ref> tag with name "b" defined in <references> is not used in prior text." This is because this groups contains another ref named "a" that is used in the text. Therefor the group is known.

In contrast to that, the second <references> shows "Cite error: <ref> tag defined in <references> has group attribute "" which does not appear in prior text." This is because the entire group is unused.

I'm not sure if this should qualify as a bug. It certainly is inconsistent and surprising.

Interesting! The first error makes sense, I'd say. The second I agree is misleading, let's rewrite it.

However, If this happens in a named group then the resulting error message seems reasonable, and I can imagine it would help by distinguishing between a ref typo with mismatched name, vs. a typo with mismatched group.

How about special-casing only the default group "", and reusing the cite_error_references_missing_key message in that case?

I always enjoy your enthusiasm, @awight. But please note this issue is from 2010. If it's really easy to change the current behavior without breaking anything else, then sure, let's do it. But if it requires more resources, we should not pull it in our current Cite-Extends project, as it is really unrelated.

"Let's rewrite it" has become a bit of a battle cry, good point :-) Agreed that we would schedule along with other cleanup work, later or never, so for now let's just decide whether it's a bug and what can be improved.