Page MenuHomePhabricator

Cite: If there's no <references /> block on the page, show one automatically below the content rather than showing an error
Closed, ResolvedPublic

Description

From T56906#636445:

Why not treat references like the TOC and always have MediaWiki output them at the bottom of the page (or section when in preview mode in wikitext) unless a <references/> tag is present?

This would treat newbies slightly better with a first-approximation of a non-failure state, which means fewer nasty errors.

See Also: T56906, T18854, T32763, T74858

Details

Reference
bz66860

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:26 AM
bzimport added a project: Cite.
bzimport set Reference to bz66860.

Bug 29774 might possibly be tangentially/accidentally fixed by this, but it's not a blocker; that's complaining about the parser order of the page.

Change 141583 had a related patch set uploaded by Alex Monk:
If there's no main <references /> block on the page, show one automatically below the content

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

Change 141583 merged by jenkins-bot:
If there's no main <references /> block on the page, show one automatically below the content

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

We (WMDE) had this on our radar too and came to the same conclusion. So thank you!

https://de.wikipedia.org/wiki/Wikipedia:Umfragen/Technische_W%C3%BCnsche/Top_20/Wunsch_1

Possible follow-ups:

  1. Add a <div> around the automatically appended references so users can style them either in their personal CSS or the project's Common.css.
  1. Add a possibility to auto-categorize these cases so users can find them.

@kaity had some ideas and designs around auto formatting and grouping that might be applicable.

Has this been integrated? I tried to simulate it by removing an existing {{reflist}} and saving a page but still received an error.

I thought the goal was to mimic the TOC behavior?

(In reply to Jared Zimmerman (WMF) from comment #6)

Has this been integrated? I tried to simulate it by removing an existing
{{reflist}} and saving a page but still received an error.

I thought the goal was to mimic the TOC behavior?

Per https://gerrit.wikimedia.org/r/#/c/141583/ it's not been deployed yet.

There are a few issues with the automatic addition of the reference list:

  • Follow-on editors are going to be confused since the markup is missing
  • There is no heading
  • The reference list will often show in the wrong place

I propose that 'MediaWiki:Cite error refs without references' still be triggered. The default message would not show an error but would put the page into a hidden maintenance category.

@Gadget850, I'll reiterate, that yes, those cases are less than ideal, but having a missing reflist, or showing the big red error on articles seems to far outweigh them. The missing heading will be a good clue for more advanced editors to come back and clean things up for helpful, well intentioned new editors who are having troubles navigating the complexities of wiki editing.

I think the hidden maintenance category could be a good addition, but i don't see it as a blocker for integrating this.

(In reply to Gadget850 from comment #9)

There are a few issues with the automatic addition of the reference list:

  • Follow-on editors are going to be confused since the markup is missing

I'm sure they will learn soon enough. This is how the TOC flag works, and intentionally mirrors it.

  • There is no heading

The desired heading, level and other context varies per wiki, so the software can't know what to put in unless we do some horrible hack.

  • The reference list will often show in the wrong place

This is also a matter of wikis' individual tastes, but yes, for some wikis the absolute bottom of the page is not how they currently want these to show up.

I propose that 'MediaWiki:Cite error refs without references' still be
triggered. The default message would not show an error but would put the
page into a hidden maintenance category.

Interesting idea. Given the vast change in semantics, presumably this should be a new message (and the old one deleted)?

(In reply to James Forrester from comment #11)

(In reply to Gadget850 from comment #9)

  • There is no heading

The desired heading, level and other context varies per wiki, so the
software can't know what to put in unless we do some horrible hack.

Exactly my point. The maintenance category would allow maintenance editors to find and fix the issue, just as they currently do.

  • The reference list will often show in the wrong place

This is also a matter of wikis' individual tastes, but yes, for some wikis
the absolute bottom of the page is not how they currently want these to show
up.

Again, the maintenance category would allow maintenance editors to find and fix the issue.

I propose that 'MediaWiki:Cite error refs without references' still be
triggered. The default message would not show an error but would put the
page into a hidden maintenance category.

Interesting idea. Given the vast change in semantics, presumably this should
be a new message (and the old one deleted)?

The name is not a big issue. But 'MediaWiki:Cite error refs without references' would be obsolete when this is deployed and should be removed if not reused.

(In reply to Gadget850 from comment #12)

(In reply to James Forrester from comment #11)

(In reply to Gadget850 from comment #9)

I propose that 'MediaWiki:Cite error refs without references' still be
triggered. The default message would not show an error but would put the
page into a hidden maintenance category.

Interesting idea. Given the vast change in semantics, presumably this should
be a new message (and the old one deleted)?

The name is not a big issue. But 'MediaWiki:Cite error refs without
references' would be obsolete when this is deployed and should be removed if
not reused.

Yes. Maybe we should just prompt for the name of a category, and if set, categorise them; otherwise they would be uncategorised?

So- reopen this bug or open a new one?

(In reply to Gadget850 from comment #14)

So- reopen this bug or open a new one?

A new one would be appropriate. This bug is complete.

Now deployed. The automatic reference list is generated when {{reflist}} or <references /> is missing.

The automatic reference list is not generated when there is a group; 'MediaWiki:Cite error group refs without references' is still triggered and an error shows.

(In reply to Gadget850 from comment #17)

The automatic reference list is not generated when there is a group;
'MediaWiki:Cite error group refs without references' is still triggered and
an error shows.

Yeah, I'm not sure what you would expect it to do there.

Bug 68293 - Cite: Indent before automatic reference list displays list style as unordered

matthiasbecker1967 wrote:

Reiterating the proposal to keep maintenance category because normally the references tag should not apppear at the end of the page. As all editors know the end of the page have to be the categories and in some Wikipedia language versions metadata like [[:de:Vorlage:Personendaten]] or [[:en:Template:Person data]]; therefor the missing tag still states to be an issue to be kept with, even if the reader does not get aware of it.

(In reply to Matthias Becker from comment #21)

Reiterating the proposal to keep maintenance category

Did you missed bug 67700?

Bug 68324 - Cite: Add namespace detection for automatically generated reference list

fbstj set Security to None.

The feature may be overzealous: currently, <references/> seems to be ignored, in favour of the automatic insertion at the end. The syntax without space is perfectly correct; in fact, it's been the syntax suggested by the extension itself for many years.

P.s.: I think T32763 asked (only) what this bug asks.

Linking to an archived wiki page is not useful as it cannot be edited to understand the issues. But looking at https://it.wikipedia.org/wiki/Elias_Canetti, the page has <references/> but no <ref> tags.

The article that you linked, it:Elias Canetti, currently has <references/> before the only <ref>…</ref>, and <references/> only prints the refs defined before it. Adding the space makes no difference. There's no bug, or if there is one, it's an entirely different bug.

matmarex: You are correct. My search is acting odd on that page. There are no <ref> tags before <references/>, so it does nothing. There are <ref> tags after, so it triggers the automatically generated reference list. This is working as designed.