Last modified: 2014-06-13 18:44:43 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 T52896, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 50896 - VisualEditor: Be able to edit references defined within a template
VisualEditor: Be able to edit references defined within a template
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!
:
Depends on:
Blocks: 65301
  Show dependency treegraph
 
Reported: 2013-07-07 19:22 UTC by Derk-Jan Hartman
Modified: 2014-06-13 18:44 UTC (History)
4 users (show)

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


Attachments

Description Derk-Jan Hartman 2013-07-07 19:22:07 UTC
https://en.wikipedia.org/w/index.php?title=Peach_Springs_Trading_Post&oldid=563257259

ref1 is defined inside the infobox template. The second use of this named reference is inside a textblock, but when you hover the [1] you get a stopsign cursor and cannot use this usage of the ref to open the editor.
Comment 1 John Broughton 2014-06-13 18:38:50 UTC
This should NOT be a low priority. It's quite common for an article to have ALL references inside a template - see, for example, https://en.wikipedia.org/wiki/Helminthopsis . 

At the moment, VE is able to figure out that the citation information is elsewhere - a tooltip appears that says "This reference is defined in a template or other generated block, and for now can be only edited in source mode." If VE can figure that out, then it should be able to perform the following three additional steps:

* Check if the information is in the {{reflist}} template (match the "ref name=" parameter in the body of the text to a ref name parameter within the reflist template)

* If a match is found, pull the relevant citation information from the reflist template, allowing the user to edit it

* After the edit is finished, put the (modified) citation information back into the reflist template

(Side note: for edit conflict purposes, this is an edit of the section where the reflist template is located, not where the footnote label exists within the body of the text).

If VE is NOT modified to allow users to edit such references/citations, users are going to be (randomly) frustrated because they can't edit any footnotes in some articles using VE (see above) and because in some articles (https://en.wikipedia.org/wiki/Pope_Francis , for example), there are occasional footnotes that aren't editable in VE.
Comment 2 James Forrester 2014-06-13 18:44:43 UTC
(In reply to John Broughton from comment #1)
> This should NOT be a low priority. It's quite common for an article to have
> ALL references inside a template - see, for example,
> https://en.wikipedia.org/wiki/Helminthopsis . 
> 
> At the moment, VE is able to figure out that the citation information is
> elsewhere - a tooltip appears that says "This reference is defined in a
> template or other generated block, and for now can be only edited in source
> mode." If VE can figure that out

We figure that out because we can tell that there's no actual reference on the page, so presumably it was made with a hack.

>, then it should be able to perform the following three additional steps:

This doesn't actually follow.


> * Check if the information is in the {{reflist}} template (match the "ref
> name=" parameter in the body of the text to a ref name parameter within the
> reflist template)

No. That would require making up a list of hack templates that each wiki uses, which is a WONTFIX if ever there was one. See instead bug 51260 which will mean we can get rid of this class of template hacks once and for all.
 
> * If a match is found, pull the relevant citation information from the
> reflist template, allowing the user to edit it

Again, this would require a list of hack extraction approaches for each of the hack templates. WONTFIX. Sorry, but these templates are ghastly abominations and should have been strangled at birth.

> * After the edit is finished, put the (modified) citation information back
> into the reflist template

That requires magic psychic modification of wikitext. Yet again, WONTFIX. Sorry.


> (Side note: for edit conflict purposes, this is an edit of the section where
> the reflist template is located, not where the footnote label exists within
> the body of the text).

You are mistaken about how edit conflict detection works. Sections don't come into it. See endless suggestions and bugs passim where this myth has been disproven.

> If VE is NOT modified to allow users to edit such references/citations,
> users are going to be (randomly) frustrated because they can't edit any
> footnotes in some articles using VE (see above) and because in some articles
> (https://en.wikipedia.org/wiki/Pope_Francis , for example), there are
> occasional footnotes that aren't editable in VE.

Or, alternatively, we could dump the stupid templates that make it harder for users even using wikitext to know what on Earth is happening, and instead use the wikitext the way it was designed, without resorting to hacks of doom?

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


Navigation
Links