Page MenuHomePhabricator

VisualEditor: Galleries containing refs produce errors, unless the <references /> are displayed within the gallery
Closed, ResolvedPublic

Description

Intention:
Edit a page containing a gallery. The gallery contains <ref> citations.

Steps to Reproduce:

  1. Open the page in VisualEditor.
  2. Notice the big red errors inside each gallery that contains a <ref> citation.

Actual Results:
Big red errors are present at the bottom of each gallery that contains a <ref> citation. Depending on whether the ref is part of a group, these are the two errors I saw:

There are <ref group=$1> tags on this page, but the references will not show without a {{reflist|group=$1}} template (see the help page).

There are <ref> tags on this page, but the references will not show without a {{reflist}} template (see the help page).

Expected Results:
That VisualEditor would not produce an error. (There were proper {{reflist}} templates at the bottom of the page.)

Reproducible: Always


Version: unspecified
Severity: normal

Details

Reference
bz57216

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:21 AM
bzimport added a project: VisualEditor.
bzimport set Reference to bz57216.

If you change a caption in the gallery so that it contains a {{reflist}}, then VisualEditor displays the citations within the gallery (under the green can't-edit-this hash), and this error is not present.

Also, as seen by editing https://en.wikipedia.org/w/index.php?oldid=596381198 you cannot re-use any references that are within a gallery block.

I don't think this is valid any more, is it?

This has been fixed, sort of: Instead of a big red error, it now puts a references block at the end of the gallery (re-starting the numbering, and including only refs from the gallery).