Last modified: 2014-03-01 00:14:12 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T47132, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 45132 - VisualEditor: Warn user when saving page with <ref>s but not <references />
VisualEditor: Warn user when saving page with <ref>s but not <references />
Status: ASSIGNED
Product: VisualEditor
Classification: Unclassified
Editing Tools (Other open bugs)
unspecified
All All
: Low enhancement
: ---
Assigned To: Editing team bugs – take if you're interested!
:
: 51910 (view as bug list)
Depends on: 39599
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-18 20:41 UTC by James Forrester
Modified: 2014-03-01 00:14 UTC (History)
9 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description James Forrester 2013-02-18 20:41:45 UTC
When a user saves a page, VE should check for references (<ref>s) created without the de-referencing block (<references /> or {{reflist}} or...) and intervene:

* prompt them to fix before saving (out of the notices area?);
* refuse to save before fixed (grey out the save button?); or
* auto-fix for them (insert a "== References ==\n<references />" section just above the categories), though this (a) sucks, (b) enforces a particular wiki's style on other wikis in code, and (c) would be difficult to internationalise
Comment 1 Krinkle 2013-06-21 01:08:12 UTC
Currently this would require scanning for the exact html it outputs as the <span style="color:red;">...</a> tag. Which can be tricky to do reliably.

Though the Cite extension could perhaps be the first to give their elements some kind of standard attribute for parse errors, it should probably do more like the TemplateData extension: Refuse to save without it and show a warning there instead. Then the API will return to VE with a nice { error: .. } block containing a error code which we can use to fetch a localised message.
Comment 2 Chris McKenna 2013-07-30 10:41:06 UTC
Bug 50779 makes it easy to accidentally delete the references list, so this should check for its presence every save not just when references have been added.
Comment 3 James Forrester 2013-07-30 13:52:44 UTC
*** Bug 51910 has been marked as a duplicate of this bug. ***
Comment 4 Chris McKenna 2013-08-12 15:59:58 UTC
The auto-fix option in comment 0 has been requested today by en.wp user Mahitgar. If the issues noted can be overcome, then it would be the most user-friendly way forward.

Regarding those issues, it is not obvious why this "sucks" - please could you elucidate?

Internationalisation of the section title could (I guess easily) be achieved by inserting the contents of a MediaWiki page instead of something defined in code. e.g. the equivalent of

==={{subst:MediaWiki:Refsection title}}===
<{{subst:MediaWiki:Reflist function name}} />


This doesn't solve the option of imposing en.wp style on other wikis though.
Comment 5 James Forrester 2013-08-14 22:40:04 UTC
(In reply to comment #4)
> The auto-fix option in comment 0 has been requested today by en.wp user
> Mahitgar. If the issues noted can be overcome, then it would be the most
> user-friendly way forward.
> 
> Regarding those issues, it is not obvious why this "sucks" - please could you
> elucidate?
> 
> Internationalisation of the section title could (I guess easily) be achieved
> by
> inserting the contents of a MediaWiki page instead of something defined in
> code. e.g. the equivalent of
> 
> ==={{subst:MediaWiki:Refsection title}}===
> <{{subst:MediaWiki:Reflist function name}} />
> 
> 
> This doesn't solve the option of imposing en.wp style on other wikis though.

Blindly putting the references section at the end of the article seems to not be great (it'd be after the "external links" and "see also" sections, and after any stub or thematic templates).
Comment 6 Jared Zimmerman (WMF) 2013-10-31 01:14:11 UTC
The last thing I want us to be doing is adding more error messages. I really think that we can get away with actually fixing the error for people. 

I'd rather see us put it in the wrong place and someone have to fix it than us give the user an error they probably don't know how to fix. 

Can we do a quick audit of major sites and where they put the reference list? I worry we're worrying a bit too much about about negative feedback that might not be as big a deal as we might think.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links