Last modified: 2014-08-11 01:16:08 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 T52474, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 50474 - VisualEditor: References created by templates numbered alone, not with the rest of the page, and don't show up as references to insert
VisualEditor: References created by templates numbered alone, not with the re...
Status: ASSIGNED
Product: VisualEditor
Classification: Unclassified
Data Model (Other open bugs)
unspecified
All All
: Normal normal
: ---
Assigned To: Editing team bugs – take if you're interested!
:
: 51058 52083 52478 52742 53486 53777 63210 69373 (view as bug list)
Depends on: 48524
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-30 19:31 UTC by Oliver Keyes
Modified: 2014-08-11 01:16 UTC (History)
17 users (show)

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


Attachments
How it should look (943.22 KB, image/png)
2013-06-30 19:32 UTC, Oliver Keyes
Details
How it actually looks (943.22 KB, image/png)
2013-06-30 19:32 UTC, Oliver Keyes
Details
How it actually looks (1.22 MB, image/png)
2013-06-30 19:52 UTC, Oliver Keyes
Details

Description Oliver Keyes 2013-06-30 19:31:35 UTC
More specifically, it can't count references. See the screenshots, specifically the citation at the end of the "early days" section.
Comment 1 Oliver Keyes 2013-06-30 19:32:11 UTC
Created attachment 12700 [details]
How it should look
Comment 2 Oliver Keyes 2013-06-30 19:32:33 UTC
Created attachment 12701 [details]
How it actually looks
Comment 3 Oliver Keyes 2013-06-30 19:52:37 UTC
Created attachment 12705 [details]
How it actually looks
Comment 4 Rainer Rillke @commons.wikimedia 2013-06-30 19:59:59 UTC
Yes, there are references with the same name, split into multiple entries but I don't understand how the screenshots you attached should demonstrate that.
Comment 5 Rainer Rillke @commons.wikimedia 2013-06-30 20:01:28 UTC
Ah, I see the new screenshot. You wanted to write "Early years"?
Comment 6 Oliver Keyes 2013-06-30 21:02:44 UTC
Indeed. In my defence it's 10pm on a Sunday :/
Comment 7 ssastry 2013-06-30 23:08:50 UTC
Looks like the ref-counter has been reset after the 2nd ref-tag was processed and also, 13 references are duplicated (the first 2 are not duplicated).

The bug cannot be duplicated locally.  So, I suspect something is off when refs are being reused from Varnish caches.
Comment 8 ssastry 2013-07-01 16:10:38 UTC
It seems that this bug doesn't cause any wikitext corruption, but only affects display in VE.  Still something we should fix on the Parsoid end, but not as troublesome as I initially thought this was.
Comment 9 Gabriel Wicke 2013-07-01 16:35:32 UTC
IIRC the VE renders (and numbers) references natively without using our rendering at all. Which would make this a VE bug. Trying to confirm.
Comment 10 Gabriel Wicke 2013-07-01 16:37:39 UTC
Moved to VE, as the numbering seems to be re-done in VE.
Comment 11 Roan Kattouw 2013-07-01 17:27:57 UTC
(In reply to comment #9)
> IIRC the VE renders (and numbers) references natively without using our
> rendering at all. Which would make this a VE bug. Trying to confirm.
That's correct. VE does not see the first two references because they are in a template, and so it mistakenly believes the one in "Early years" is the first one.

We could mitigate this by using the numbering Parsoid gives us.
Comment 12 Oliver Keyes 2013-07-01 17:28:55 UTC
This also prohibits references utilised in templates from being used elsewhere on the page via the template inspector. Blah :/.
Comment 13 Gabriel Wicke 2013-07-01 17:40:20 UTC
Parsoid provides ref info also inside template-generated content, and our ref / references rendering code make use of that. I have proposed to share that code in bug 50505. 

Using the Parsoid rendering on first load could be a workaround, but hacking dynamic updates into that sounds like more trouble than it's worth.
Comment 14 Gabriel Wicke 2013-07-01 20:57:40 UTC
I think so far we have seen several issues in this area:

* References from templated content are not being picked up by VE, which causes

** the numbering to be off

** those references to be missing in references

** edits to refs whose primary (first in DOM order) definition is templated just update the first non-templated ref alias in the page. Those changes are then not rendered in the PHP parser. Correct behavior would be to explain why that reference cannot be edited.

* Some refs are duplicated in the references section
Comment 15 Gerrit Notification Bot 2013-07-01 21:18:04 UTC
Change 71528 had a related patch set uploaded by GWicke:
WIP Bug 50474: Remove children of references node

https://gerrit.wikimedia.org/r/71528
Comment 16 Gerrit Notification Bot 2013-07-01 21:32:04 UTC
Change 71528 merged by jenkins-bot:
Bug 50474: Remove children of references node

https://gerrit.wikimedia.org/r/71528
Comment 17 Gabriel Wicke 2013-07-01 21:36:57 UTC
The ref duplication issue (last bullet point) was actually a Parsoid bug which is fixed with the commit above. It only manifested itself in templated references sections which are not rendered by VE. The fix is deployed to production.

The other VE issues remain, but fortunately are less visible to users unless they modify references.
Comment 18 James Forrester 2013-07-26 23:10:34 UTC
*** Bug 52083 has been marked as a duplicate of this bug. ***
Comment 19 Amir E. Aharoni 2013-07-27 13:09:17 UTC
Resolving Bug 28980 could relieve at least part of this problem by lifting the need to use <ref> because of localization issues.
Comment 20 James Forrester 2013-08-29 23:37:24 UTC
*** Bug 52478 has been marked as a duplicate of this bug. ***
Comment 21 kwwilliams 2013-08-29 23:44:06 UTC
Describing a widely used template as a "hack" and refusing to fix the bugs associated with VE in terms of editing it is not a valid solution. The template does work and the references work fine using the normal editor. There's no way to code the template to not include the #ref.

It is not within the scope of the VE project to refuse to fix problems because they are hard.

I strongly, strongly object to the implication in the addition to 52478 that implies that this bug in VE will never be fixed.
Comment 22 James Forrester 2013-08-30 00:17:33 UTC
(In reply to comment #21)
> Describing a widely used template as a "hack" and refusing to fix the bugs
> associated with VE in terms of editing it is not a valid solution.

Who said I was refusing to fix it?

> The template does work and the references work fine using the normal editor.
> There's no way to code the template to not include the #ref.

<ref>{{foo}}</ref> works just fine, because that's how it was designed to be used. If you want an easier way to edit, use VE. ;-)

> It is not within the scope of the VE project to refuse to fix problems
> because they are hard.

This is off-topic, but actually, it is very much part of Wikimedia's job to make decisions about whether it is worth spending large amounts of donor funds on marginal use cases rather than features that can't be done in other ways.

> I strongly, strongly object to the implication in the addition to 52478 that
> implies that this bug in VE will never be fixed.

There is no such implication; there is clearly the inference in your reading of it, however. We will fix this bug - the comment just explains the priority of this bug in relation to others.
Comment 23 kwwilliams 2013-08-30 00:31:05 UTC
There's no way to code a single template that generates both a reference and table markup without using {{#tag:ref}}. 

If you didn't think "any reference created by a template shouldn't work, deliberately" would be read as a refusal to fix that particular aspect of this bug, I have no idea what you intended it to mean.

I also don't see that this bugzilla specifically addresses the ability for the names and contents of template generated references to be available to an editor that is using the "add reference" dialog.
Comment 24 Gabriel Wicke 2013-08-30 00:35:59 UTC
We might actually be able to use the same CSS technique I developed for auto-numbered external links in bug 53505 for citations. That would at least fix the numbering without extra effort, but won't help with <references> rendering and editing.
Comment 25 James Forrester 2013-08-30 00:37:50 UTC
(In reply to comment #23)
> There's no way to code a single template that generates both a reference and
> table markup without using {{#tag:ref}}. 

True. This should have given you pause to consider /why/ it wasn't available until recently. :-)

> If you didn't think "any reference created by a template shouldn't work,
> deliberately" would be read as a refusal to fix that particular aspect of
> this bug, I have no idea what you intended it to mean.

Translation: When we made MW's citation system, the intent right from the start was to never, ever let people create nested references, or references that need to be parsed multiple times, because it creates endless issues.

Unfortunately, when later the {{#tag:xxx}} system was created, the person implementing that didn't remember this issue and instead has indeed given rise to all manner of epic problems.

> I also don't see that this bugzilla specifically addresses the ability for
> the names and contents of template generated references to be available to an
> editor that is using the "add reference" dialog.

That would be the "don't show up as references to insert" part of the title. :-)
Comment 26 James Forrester 2013-08-30 00:41:36 UTC
*** Bug 53486 has been marked as a duplicate of this bug. ***
Comment 27 kwwilliams 2013-08-30 06:23:34 UTC
(In reply to comment #25)
> (In reply to comment #23)
> > There's no way to code a single template that generates both a reference and
> > table markup without using {{#tag:ref}}. 
> 
> True. This should have given you pause to consider /why/ it wasn't available
> until recently. :-)

Laughing while you dismiss my comments adds a layer of rudeness to the discussion that is completely unnecessary.
Comment 28 James Forrester 2013-10-28 23:43:01 UTC
*** Bug 53777 has been marked as a duplicate of this bug. ***
Comment 29 James Forrester 2013-11-25 12:12:36 UTC
*** Bug 51058 has been marked as a duplicate of this bug. ***
Comment 30 James Forrester 2014-05-30 02:27:48 UTC
*** Bug 63210 has been marked as a duplicate of this bug. ***
Comment 31 James Forrester 2014-06-09 16:40:02 UTC
*** Bug 52742 has been marked as a duplicate of this bug. ***
Comment 32 Bartosz Dziewoński 2014-08-11 01:16:08 UTC
*** Bug 69373 has been marked as a duplicate of this bug. ***

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


Navigation
Links