Where is the unmatched <ref> tag? [closed]

+3 votes
341 views

Prior question was closed, so I have to open a new one.

Issue remains after adding the missing '=' to the named ref as suggested in last question.

Not sure if this is a false positive or not, but I'm unable to locate the unmatched <ref> in this profile.  Can anyone else find it or is this a false positive?

Would be nice if the warning message gave a line number in the file or some other way to narrow down where to look and gave a different error if the issue is missing equal sign in named ref.

Here is screenshot of the error:

WikiTree profile: John Jacob
closed with the note: No space permitted before '=' of <ref> in error checking code.
in WikiTree Tech by William Foster G2G6 Pilot (121k points)
closed by William Foster

2 Answers

+6 votes
 
Best answer

I don't want to modify the original in question. So here are a few errors I found:

He was the son of Robert Jacobs 1544 - 1628 Alice Goodman Jacobs born 1540<ref name ="heritage" />

Extra space before the equals symbol. There are several like this and, to be honest, I don't know WikiText well enough to know if this would break the object declaration. I know it would in some markup languages. (Note: I think this point is moot. The space doesn't seem to matter.)

<ref>Acts of the Privy Councils, cited by Kenneth Jacob</ref>

No prior "ref" established, so this element was never defined; no "name" parameter; no quotation marks bracketing the element.

<ref>British Library, Manuscript Book of John Philpott of Dover, Egerton Manuscript 2120, cited by Kenneth Jacob</ref>

Ditto. There are several like this. In short, the markup in this profile looks sort of a mess. Best to go through everything line by line rather than relying on text searches, I think.

Edited to add: Not WikiTree specific, but I've found it handy; same general markup structure: https://en.wikipedia.org/wiki/Help:Wikitext#References_and_citing_sources

by Edison Williams G2G6 Pilot (441k points)
selected by William Foster
<ref> some stuff put here </ref> is a plain ref tag and is a single usage. This is most common. The name is so you can use the SAME reference in multiple spots.
Unnamed <ref> are not errors.  Not sure if the space before '=' is an issue, will remove them to be safe.
Bingo, removing space before '=' made error message go away.

Sounds like the error checking code needs to be more forgiving since the actual wiki rendering works fine with the space and it is being overzealous to flag that.
Can't name a multi-word parameter declaration without enclosing them in quotation marks though, can you?
That would be my expectation, why do you mention that?

Withdrawing my answer.  :-)  I can do HTML5, CSS/LESS, JS, and PHP in my sleep. But I have some weird subconscious barrier to yet another markup language for Wiki.

Sorry for the intrusion. Glad removing the extra space seemed to work. Carry on....   ;-)

my initial guess would have been the space between 'name =...', but I tried it on one of my profiles and did not get an error when saving. But glad to hear removing the space fixed the error.

Dennis, did you try it with <ref name = "somename" />  Maybe the closing ref baked in to the opening is the source of the false positive?
yeah, it weird. I can't seem to reproduce the error on purpose. Its as if you had a non-obvious, non-ascii character in there somewhere. I've seen the error before when someone used curly quotes instead of ascii quotes (copy-paste from MS Word). Those were difficult to see also.

But my typical coding habits would never allow me to put spaces before or after the = sign anyway (unless the specific language required it). Spaces are evil (and curly quotes are more evil).
+5 votes
Would it make a difference if you put a space in there?  Instead of
<ref name="hugh"/>

you had
<ref name="hugh" />
by Ros Haywood G2G Astronaut (1.9m points)
I changed them all for good measure, but it does not help with the error message.
Rats! Thought I was on to something there...

What exact wording are you getting in the error message?
I won't know the wording until I know what the error is.
not only am I not finding an error message, I'm not showing there used to be one either.
See image of error in updated question, just reconfirmed, it still gives error for me.

Well, using ctrl-F I see there are 61 < and 63 > so something isn't right.

(never mind. 2 > are at the bottom designating lineage outside the bio area.

I disagree:

bash-3.2$ grep -c '>' ~/Tmp/wiki.txt
40
bash-3.2$ grep -c '<' ~/Tmp/wiki.txt
40

ok, I've even tried dumping it into notepad just in case something weird got hidden. The only things wrong I see are <references/> is supposed to be immediately under ==Sources== (but that wouldn't cause the error) and the use of span in one source which is not recommended. 

maybe remove <span id='S1772'>S1772</span> ?????

Aside from that I'd say false error and send an inquiry to info@wikitree.com

Checked online. that span id should have quotes, not apostrophes and actually isn't even needed.

How do you link to a source in the same profile if you don't use span?  Span comes from old GED imports.
the <ref name = "identifier"> whatever source is here </ref> and then do <ref name = "identifier"/> for the rest.

That is why we ALWAYS have <references/> under ==Sources== so it shows in sources.
Stephen, don't you mean <ref name= "identifier"> (no space after the word 'name'); and <ref name= "identifier" /> (space before />) ? I don't know code from Spode, but this is what works for me. Sounds like a quibble, but that's what was causing my issue a couple of years ago. Even simpler, leave off the quotation marks and any spaces between identifier words. (Thanks again, Dennis Wheeler!)

Stevanie, I've never had a problem with the spaces. And the quotes are a good habit unless you always use an identifier with no spaces.

As far as between name and =, I've seen it work with a space but generally I don't put one. My brain thought it was typing text instead of code. SOWWY

https://www.wikitree.com/wiki/Help:Sources#Repeated_use_of_the_same_source_in_the_same_profile

Steven, are you trying to tell Stephanie your name is spelled with a 'v'? ;-)
XD  -- oops, my sideways laughing face isn't enough characters. @v@ (this one is an owl rolling its eyes-- wanted to get a v in there...)

Related questions

+6 votes
1 answer
284 views asked May 16, 2018 in WikiTree Help by William Foster G2G6 Pilot (121k points)
+7 votes
2 answers
+6 votes
3 answers
227 views asked Apr 4, 2018 in Policy and Style by Susan Fitzmaurice G2G6 Mach 6 (62.1k points)
+10 votes
3 answers
+7 votes
3 answers
175 views asked Feb 14, 2018 in The Tree House by Beulah Cramer G2G6 Pilot (568k points)
+5 votes
1 answer
185 views asked Dec 8, 2017 in WikiTree Help by Gaston Tardif G2G6 Mach 1 (15.5k points)
+6 votes
6 answers
+7 votes
3 answers
235 views asked Mar 4, 2018 in WikiTree Tech by Bertram Sluys G2G6 Mach 3 (37.9k points)

WikiTree  ~  About  ~  Help Help  ~  Search Person Search  ~  Surname:

disclaimer - terms - copyright

...