Page MenuHomePhabricator

Cite: If there's no <references /> block on the page, insert the wikitext for one automatically in the right place
Closed, DeclinedPublicFeature

Description

Author: sgardner

Description:
When a reference is first added to the page, the list of references at the bottom should be appended automatically using the format that is appropriate (usually <references />).

The purpose of this request is to make life easier for editors. Currently, when an editor adds a citation to an article using the <ref></ref> syntax, the citation is not visible to readers until the editor also manually adds the wiki syntax (usually <references />). Also, in order to create a title for the references section in normal article style, the editor needs to manually add ==References== above <references />. I do not believe there is any use case in which an editor would add a citation to an article, without also wanting to append the list of references at the bottom of the article. Therefore, I think the list of references should be appended automatically whenever a reference is first added to the page. This would save editors two rote manual steps.


Version: unspecified
Severity: enhancement
See Also:
T68860: Cite: If there's no <references /> block on the page, show one automatically below the content rather than showing an error
T56906: Append a references list to bottom of the page when the first reference is added
T69847: Cite: If there's no <references /> block on the page for grouped references, maybe show them in some way

Details

Reference
bz30763

Event Timeline

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

This may be hairier than it sounds:

  • whether the appropriate thing to use is <references /> or {{reflist}} or something else would need to be configurable somehow
  • the name of the ==References== section would have to be similarly configurable (and translatable)
  • it's not entirely clear where the references list and section should be added. If you look at https://secure.wikimedia.org/wikipedia/en/w/index.php?title=Albert_Einstein&action=edit , the References section is not the last section on the page, and there's a bunch of invisible (language links, categories) and visible (various navigation boxes) things below the last section even. A dumb append to the bottom might be good enough, though, so people can move it elsewhere if they really care.

I think really the proper thing to do is to go a little farther:

  • create a sensible inline/popup view for references; use that for web output instead of an inline list of footnotes
  • continue to output the footnote-style list for print view, but...
  • let the *entire* printable reference list, including section title, be added and maintained by the plugin, at the end.

For back-compatibility, explicit use of <references/> could continue to output the footnote-style list inline (and like forcing the TOC location, this could suppress the auto-appended section/list).

Bug 66860 means that this a references list now /shown/ if there is no <references />, but *not inserted* into the wikitext.

Re-labelling this to be clear, and reducing priority as the main cause of demand (broken pages) is now moot.

Nemo_bis set Security to None.

I'm sympathetic to the task description's problem statement as I also find manually adding <references /> to be tedious. However, I'm pretty wary of automatically inserting wikitext into the page. Given that T68860 is fixed and T69700 is a separate task that would further eliminate the need for automatic wikitext insertion, I'm not sure there's much to be done in this task.

Is this a VisualEditor ticket? I agree that VisualEditor should enforce a <references /> tag. But "magically" changing the wikitext should not and can not be done for the reasons already given in the comments above. Each community does this different, in different places (not necessarily in the last line), sometimes with a template. The communities do have tools to clean up such instances if they care. Sure, a category would be nice (see T69700).

I suggest to close this as invalid/wontfix.

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 11:00 AM

Following my arguments from 8 years ago.