Topic on Help talk:Lint errors/self-closed-tag

self-closed tags in the Hebrew Wikipedia

8
Amire80 (talkcontribs)

Hi,

In the Hebrew Wikipedia, LintErrors/self-closed-tag lists two pages with <span> problems. I'm failing to find them. They don't seem to appear in the pages' wiki syntax. They probably come from one of the references, but both pages have many of them, and I cannot find where they are exactly.

Can anybody help please?

Thank you!

(Tagging people who could be interested or who could help: Arlolra, SSastry (WMF), IKhitron.)

197.218.90.188 (talkcontribs)

Wow, I randomly came across this got curious about this, and started digging.

It is actually very right, but it is not pointing to the exact location because it is emphasizing the actual output rather the the input. The problem is with the references that are being built by templates (yet another reason they are a bad idea). The template outputs this:

<li id="cite_note-CFF2016-29"><a href="#cite_ref-CFF2016_29-0"><b>^</b></a> <span class="reference-text"><span class="citation web"><a rel="nofollow" class="external text" href="http://www.festival-cannes.com/en/films/hell-or-high-water"><span style="unicode-bidi:embed;">"Hell or High Water at Cannes Film Festival"</span></a>. <i><span dir="auto"><span></span></i><a href="/wiki/Cannes_Film_Festival" class="mw-redirect" title="Cannes Film Festival">Cannes Film Festival</a><i><span></span></span></i><span class="reference-accessdate">. בדיקה אחרונה ב-29 בנובמבר 2016</span>.</span><span title="ctx_ver=Z39.88-2004&rfr_id=info%3Asid%2Fhe.wikipedia.org%3A%D7%A7%D7%A4%D7%98%D7%9F+%D7%A4%D7%A0%D7%98%D7%A1%D7%98%D7%99%D7%A7&rft.atitle=Hell+or+High+Water+at+Cannes+Film+Festival&rft.genre=article&rft.jtitle=%27%27Cannes+Film+Festival%27%27&rft_id=http%3A%2F%2Fwww.festival-cannes.com%2Fen%2Ffilms%2Fhell-or-high-water&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal" class="Z3988"><span style="display:none;"> </span></span></span>↩

Probably this one (and others):

{{הערה|שם=CFF2016|{{cite web|url=http://www.festival-cannes.com/en/films/hell-or-high-water|title=Hell or High Water at Cannes Film Festival|work=''[[Cannes Film Festival]]''|accessdate=November 29, 2016}}}}

The reason is that it is generating an unclosed span inside the span tag, so the output looks similar to this example:

<span dir="auto"><span></span>

The html validator agrees:

Error: Unclosed element span.

For future readers the way to verify this is :

  1. Special:Expandtemplates
  2. Paste the page contents in the wikitext text area
  3. Add the page name
  4. Click the checkbox to output the raw html
  5. Go to https://validator.w3.org/nu/
  6. Paste the raw html (make sure the outer portion is a well nested html document)
  7. Run the check

This will give an output with the error. It might also be useful to become familiar with Parsoid/API for the lint extension. It outputs the exact location of the error within the text area. In this case it pointed exactly to the template that adds the reference. From there it was obvious that either the template or the markup in the page was causing the problem, and the validator makes it easy to find it.

There might be other errors lurking in the page, but that's the primary problem.

Amire80 (talkcontribs)

Thanks, it's magic. I fixed it.

Now who are you, mysterious stranger? I want to thank you :)

SSastry (WMF) (talkcontribs)

Well, this is the best kind of result. I wake up, I see I that I am tagged. Come here to see that someone reported a problem, and someone else found the solution, and I don't need to do anything more. ;-)

Amire80 (talkcontribs)

Worry not, I'll have more Linter questions :)

IKhitron (talkcontribs)

So what was the problem? A bug in cite web?

Amire80 (talkcontribs)

I don't know, check the diffs :)

IKhitron (talkcontribs)

I did, and then asked.