<references/> with no <ref> in article body should not output an error
Closed, ResolvedPublic

Assigned To
TheDJ, wikibugs-l

Author: nicdumz

A page with only "<references/>"

Will output a big, red "Cite error: Invalid <references group="" /> tag; group name "" not defined in <ref>"

I'm marking this as a critical issue, because according to the last dumps it affects more than 10K pages on fr: (Still counting how many en: pages are affected)

Version: unspecified
Severity: normal
URL: http://en.wikipedia.org/w/index.php?title=User:NicDumZ/Test&oldid=204205912

bzimport added a project: Cite.Via ConduitNov 21 2014, 10:07 PM
bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz13653.
bzimport created this task.Via LegacyApr 8 2008, 1:16 PM
bzimport added a comment.Via ConduitApr 8 2008, 1:26 PM

ayg wrote:

Why is this behavior incorrect? If there are no <ref>s, it makes sense to raise an error if <references /> is present. For instance, on enwiki, a <references /> with no refs will almost always give you an empty ==References== section, which is wrong anyway. The error message does what it's supposed to do, draw attention to a mistake that should be fixed.

Arguably, you're right, this mistake is a minor one that would best be handled silently. Honestly, our error-checking is very inconsistent and it's hard to say whether we should be silent (which we usually are) or noisy (which Cite usually is). Either way, this is not major. A few articles will look a little odd and people will fix them as they see them. It helps to draw attention to articles without references, too. ;)

bzimport added a comment.Via ConduitApr 8 2008, 5:48 PM

thomasV1 wrote:

it also currently affects a few thousand pages on wikisource,
because the proofreadpage extension automatically appends <references/>
to page footer.

I blanked the error message on fr.ws and en.ws, until the issue is resolved.

bzimport added a comment.Via ConduitApr 8 2008, 8:13 PM

bhgbhgbhg wrote:

A noisy warning about empty is wrong because it's a technical warning in the absence of a technical problem. An empty <ref></ref> tag is a problem, because it indicates an incomplete footnote, but a <references /> tag without references is not a technical problem. Making it appear to be one will simply trigger the removal of <references /> tags from articles which are currently unreferenced, which is a very bad idea.

That might sound like a good idea, having just encountered dozens of articles which had <ref></ref> references but no <references />. That's a real problem, and it's more likely to occur if <references /> is removed from every article which is currently unreferenced ... and it's a much more serious problem than the minor stylistic glitch of an empty ==References== section.

Unreferenced articles should be tagged with {{unreferenced}}, and one widely-used way of doing this is to add a section ==References== <references /> {{unreferenced}} -- in other words, the <references /> tag is already in place for when refs added. Why impede this usage?

TheDJ added a comment.Via ConduitApr 9 2008, 10:28 AM

Fixed in r33003

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.