VisualEditor: Re-use an existing reference shouldn't require a reference list to be or have been on the page to work
Closed, ResolvedPublic

Description

Script error for each citation

Test Environment-test2
Steps to Reproduce-

Scenario#1-
1> Select the ” Cite “ drop down and add a Journal, News, Book, one of each citations.
2> Now click on “Insert” and select “Media”. Click on any picture returned in the dialog(do not enter any search term)
3> In the Media Settings dialog click on “Insert” again and select “Media” from the Caption toolbar. Click on any picture returned in the dialog.
4> Now close all the dialogs.
5> Repeat again steps #2,3 and 4.
6>In the main VE window click on “Cite” and select “Basic”. Reference dialog opens.
5> In the Reference dialog select “Use an existing reference”.
6> Script Error is shown as existing reference.

Scenario#2-
1> Go to the Media Settings dialog.
2> While General Settings is highlighted, select the ” Cite “ drop down and add a Journal, News, Book, one of each citations to the Caption pane.
3> Now click on “Insert “dropdown and select “Media”.
4>Click on any picture in the media search dialog. Media Settings dialog pops. Close this dialog.
5> Repeat steps 3 and 4 again.
5> Notice that the previously opened Media Settings dialog is still open with the citations in the Caption pane.
6> Click on “Cite” again and select “Basic”. Reference dialog opens.
7> In the Reference dialog select “Use an existing reference”.
8> Script Error is shown as existing reference.


Version: unspecified
Severity: normal

Attached:

Swainr created this task.Via LegacyJul 15 2014, 11:21 PM
Jdforrester-WMF added a comment.Via ConduitJul 16 2014, 4:05 PM

(In reply to Ritu Swain from comment #0)

Created attachment 15949 [details]
Script error for each citation

Test Environment-test2
Steps to Reproduce-

Scenario#1-
1> Select the ” Cite “ drop down and add a Journal, News, Book, one of each
citations.
2> Now click on “Insert” and select “Media”. Click on any picture returned
in the dialog(do not enter any search term)
3> In the Media Settings dialog click on “Insert” again and select “Media”
from the Caption toolbar. Click on any picture returned in the dialog.
4> Now close all the dialogs.
5> Repeat again steps #2,3 and 4.
6>In the main VE window click on “Cite” and select “Basic”. Reference
dialog opens.
5> In the Reference dialog select “Use an existing reference”.
6> Script Error is shown as existing reference.

The problem here is the "re-use existing reference" code seems to rely on there being a reference list on the page (or there having been one at some point in this edit?) – if there's no reference list yet, it shows the references as blank or with a Lua script error. Is this something as simple as populating the internal list as needed?

Attached:

Ryasmeen added a comment.Via ConduitJul 16 2014, 7:26 PM

This bugs is found in test2 so the reason why it is showing script error for the Cite News,Cite Journal,Cite Book but not Cite Web, the template data for those options are not defined in test2.
So if you just add those Cite Options and add a reflist , you will also see script errors in the reference list.

However there is one issue here, when you first time add any reference, and open use existing reference dialog, the reference name will not appear but after that if you do any other action like adding a media, or a link or a reflist it appears.

Krenair added a comment.Via ConduitJul 31 2014, 1:16 AM

(In reply to Rummana Yasmeen from comment #2)

However there is one issue here, when you first time add any reference, and
open use existing reference dialog, the reference name will not appear but
after that if you do any other action like adding a media, or a link or a
reflist it appears.

That sounds like bug 67342. Is this valid?

Jdforrester-WMF added a comment.Via ConduitJul 31 2014, 1:42 AM

This looks like it's now fixed.

(Note that the "re-use" list can take a few seconds to update, so if you've just created a cite it may render as "[4]" rather than "[4] Foo. Bar (Baz)" which will happen later if you wait.

Thanks, Krenair!

Swainr added a comment.Via ConduitAug 1 2014, 7:43 PM

Issue Resolved in test2.

Ryasmeen added a comment.Via ConduitAug 5 2014, 6:28 PM

The delay to load citations in RE-Use dialog is pretty noticeable now.Previously,it was not like that.Is it an effect of this fix?

Krenair added a comment.Via ConduitAug 6 2014, 11:16 AM

Probably an effect of whatever caused this?

Ryasmeen added a comment.Via ConduitAug 6 2014, 6:39 PM

okay, so there is no need to have a new bug on it I guess.

Add Comment