Last modified: 2014-06-23 13:47:46 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 T24635, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 22635 - Multiple problems with refs inside <references>...</references> blocks
Multiple problems with refs inside <references>...</references> blocks
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
Cite (Other open bugs)
unspecified
All All
: Low normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-02-24 16:28 UTC by cypsy
Modified: 2014-06-23 13:47 UTC (History)
4 users (show)

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


Attachments

Description cypsy 2010-02-24 16:28:39 UTC
=#1=
  ==1.1: Issue==
  {{#tag:ref}}s in a <references> 
  block supposedly cannot themselves 
  contain _unnamed_ <ref>s (see also #2, below)
  ==1.2: Test case==
    ===Article text===
    Lorem ipsum<ref name="expl_A" group="n" />
    ===Explanatory notes section===
    <references group="n">
    {{#tag:ref
    |AAAA <ref>Ref #1</ref>
    |group="n"|name="expl_A"}}
    </references>
    ===References section===
    <references />
  ==1.3 Test case result==
  Failure. For one, it will generate a  
    "<ref> tag defined in <references> has 
    no name attribute." message. 
  Obviously, the <ref> here does not need a name. 
  Secondly, the <ref> will not be dealt with.
  Third, just adding a name does not solve the 
  problem. See #2, below.

=#2=
  ==2.1: Issue==
  For a _named_ <ref> (compare case #1) inside a 
  {{#tag:ref}} inside a <references> block, 
  the ref handler will carp and ignore the ref.
  ==2.2: Test case==
    ===Article text===
    Lorem ipsum<ref name="expl_A" group="n" />
    ===Explanatory notes section===
    <references group="n">
    {{#tag:ref
    |AAAA <ref name="ref1">Ref #1</ref>
    |group="n"|name="expl_A"}}
    </references>
    ===References section===
    <references />
  ==2.3 Test case result==
  Failure. Error message
    "<ref> tag with name "ref1" 
    defined in <references> is not 
    used in prior text."
  The <ref> is not dealt with.

=#3=
  ==3.1: Issue==
  ref handler will carp and ignore cross-refs 
  to an existing, predefined, named <ref>s 
  (compare case #1/#2)
  ==3.2: Test case==
    ===Article text===
    Lorem ipsum<ref name="expl_A" group="n" />
    Carpe diem<ref name="ref1">Ref #1</ref>
    ===Explanatory notes section===
    <references group="n">
    {{#tag:ref
    |AAAA <ref name="ref1" />
    |group="n"|name="expl_A"}}
    </references>
    ===References section===
    <references />
  ==3.3 Test case result==
  Failure. Error message
    "<ref> tag with name "ref1" 
    defined in <references> is not 
    used in prior text."
  The <ref> is not dealt with.

=#4=
  ==4.1: Issue==
  A ref inside the <references> block that 
  is *only* linked from another ref in the 
  <references> block, is supposedly nonexistent.
  ==4.2: Test case==
    ===Article text===
    Lorem ipsum<ref name="expl_A" group="n" />
    ===Explanatory notes section===
    <references group="n">
    {{#tag:ref
    |BBBB
    |group="n"|name="expl_B"}}
    {{#tag:ref
    |AAAA link to B<ref name="expl_B" group="n" />
    |group="n"|name="expl_A"}}
    </references>
    ===References section===
    <references />
  ==4.3: Test case result==
  Failure. For one, it will twice 
  generate an inappropriate 
    "<ref> tag with name "expl_B" 
    defined in <references> is not 
    used in prior text." 
  (changing the order of the two 
  #tag:refs makes no difference)
  Secondly, the <ref name="expl_B" group="n" />
  is ignored.
  If however the "expl_A" is moved into the
  article text, everything is just fine.

=#5=
  ==5.1: Issue==
  Corollary to #4: a ref tag that is *also* 
  used outside the <references> block will 
  *still* not appear.
  ==5.2: Test case==
    ===Article text===
    Lorem ipsum<ref name="expl_A" group="n" />
    Carpe diem<ref name="expl_B" group="n" />
    ===Explanatory notes section===
    <references group="n">
    {{#tag:ref
    |Explanation B
    |group="n"|name="expl_B"}}
    {{#tag:ref
    |A link to B<ref name="expl_B" group="n" />
    |group="n"|name="expl_A"}}
    </references>
    ===References section===
    <references />
  ==5.3: Test case result==
  Failure. The <ref> inside the #tag:ref
  is "invisible". No message.

=#6=
  ==6.1: Issue==
  Ungraceful handling of refs that have 
  no backlinks
  ==6.2 Test case==
    ===Article text===
    Some text (no refs)
    ===References section===
    <references>
    {{#tag:ref
    |This is a ref without backlinks
    |name="some_name"}}
    </references>
  ==6.3 Test case result==
  The ref handler will emit an "error" that 
    "<ref> tag with name "expl_B" defined 
    in <references> is not used in prior text."
  This is unnecessary bitchiness that second
  guesses the editor. What the ref handler 
  really ought to do is print it without 
  backlinks (in a separate <ul>). If the 
  name has a typo, editors will figure it out.
  [the same should be done for <ref>s in a 
  <references> block that have no name]
  Editors ought not to be screamed at.

=#7=
  ==7.1: Issue==
  If a note defined outside the <references> block
  is also referenced from inside the <references> 
  block, the note "disappears" entirely.
  ==7.2: Test case==
    ===Article text===
    Lorem ipsum<ref name="expl_A" group="n" />
    similique sunt in culpa<ref 
                       name="expl_B" group="n" />
    cognito ergo poof.{{#tag:ref|AAAAA
                      |group="n"|name="expl_A"}}
    ===Explanatory notes section===
    <references group="n">
    {{#tag:ref|Link to expl. A.<ref 
                       name="expl_A" group="n" /> 
    |name="expl_B" |group="n"}}
    </references>
  ==7.3 Test case result==
  The note expl_A disappears. Instead,
  a spurious "error" message is emitted in 
  its place.
    "Invalid <ref> tag; no text was provided 
    for refs named expl_A"

=Notes=
A) These problems are all limited to tags inside 
   <references>...</references>. They don't apply
   outside the <references> block. 
B) The ref handler is much too emphatic. It probably 
   needs to deal with input gracefully, and not shake 
   its fist at editors so much. Please.
Comment 1 Gadget850 2010-05-22 12:28:55 UTC
This looks like the same issue reported in Bug 20707.
Comment 2 Gadget850 2010-06-13 02:29:22 UTC
All references defined in the reference list must be invoked in the content, else an error message will show "Cite error: <ref> tag with name "#1" defined in <references> is not used in prior text". But, the first undefined reference shows the message "Cite error: <ref> tag defined in <references> has group attribute "" which does not appear in prior text", even if there is no group defined.

http://en.wikipedia.org/wiki/Help:Cite_errors/Cite_error_references_missing_key
Comment 3 JimmB 2012-01-27 15:54:00 UTC
This looks like an ARRAY BASE issue to me.  One piece of code is using an ARRAY BASE OF ZERO and the other is using a base of ONE. I'm not a good enough programmer to find the problem, but hopefully this will give someone a clue where to look.

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


Navigation
Links