Page MenuHomePhabricator

Add warning message when <references> is not closed correctly
Closed, ResolvedPublic

Description

When a page has a non-closed <references> the rest of that page is not visible (except categories and interwikis)

incorrect version: http://de.wikipedia.org/w/index.php?oldid=81022314
correct version: http://de.wikipedia.org/w/index.php?oldid=81976459

You see that the correct version has a box "Normdaten" at the end of the page after the references.

Please add a message in this case, so the editor get a information about his mistake and can correct hat.

Thanks.


Version: unspecified
Severity: enhancement
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=15712

Details

Reference
bz26145

Event Timeline

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

salilpa007 wrote:

(In reply to comment #0)

When a page has a non-closed <references> the rest of that page is not visible
(except categories and interwikis)
incorrect version: http://de.wikipedia.org/w/index.php?oldid=81022314
correct version: http://de.wikipedia.org/w/index.php?oldid=81976459
You see that the correct version has a box "Normdaten" at the end of the page
after the references.
Please add a message in this case, so the editor get a information about his
mistake and can correct hat.
Thanks.

Hi

to solve this problem, there should be a preg to determine whether references is closed
much like the checking if someone left off the closing </ref> tag in
Cite/Cite_body.php line no 243

since am new to mediawiki. couldnt write a patch myself :(

hopefully i can solve this in near future :)

This might be a more general issue with the parser and getting warnings from it.

sumanah wrote:

Brad, do you think this bug is still valid? If so, would it be suitable for a new developer ("easy")?

Valid, yes. Easy, not really.

(In reply to comment #1)

to solve this problem, there should be a preg to determine whether references
is closed
much like the checking if someone left off the closing </ref> tag in
Cite/Cite_body.php line no 243

The check for a missing </ref> just looks to see if the current tag contains another <ref> inside of it. But it's unlikely to be the case that the article would contain a second <references> to be found inside the first in the same way.

  • Bug 46986 has been marked as a duplicate of this bug. ***

This old bug should be solved as it affects the articles' appearance in many cases (typically external links or navbars aren't shown).

See search for insource:/\<references\>.*\<references ?\/\>/ and seach for insource:/\<references\>/ -insource:/\/references/ for examples from enwiki.

If there is no warning message, at least a maintainance category (Category:Pages with citation errors) should be added.

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 7 2015, 5:26 PM
matmarex closed this task as Resolved.Apr 5 2016, 8:51 PM
matmarex claimed this task.
matmarex added a subscriber: matmarex.

I think this is mostly solved with https://gerrit.wikimedia.org/r/#/c/268335/, like T17712. An unclosed <references> tag will be ignored (literal unparsed "<references>" will appear in the output) and won't ruin page formatting; an autogenerated references list will be appended at the end of the article. Task T69700 is a request to have a tracking category or something to detect that.

Thgoiter added a comment.EditedApr 14 2016, 6:59 PM

(I don't understand the technical background of your link to gerrit.) Edits like this one are still possible. In this case, templates Normdaten and Personendaten are not included in the rendered article.

Sorry, I should've mentioned that this fix is only included in the 1.27.0-wmf.21 branch, which will only be deployed to Wikipedias later today, per the roadmap: https://www.mediawiki.org/wiki/MediaWiki_1.27/Roadmap. Give it a few more hours :)

OK, thanks for explaining

You can see the fix live now:

BeforeAfter