Help talk:Lint errors/self-closed-tag

About this board

Amire80 (talkcontribs)


Here's another that I'm failing to find, at he:Reaper.

The W3C validator trick doesn't help (or I'm using it incorrectly).

@SSastry (WMF)

SSastry (WMF) (talkcontribs)

Hmm .. Parsoid is, for some reason, pointing to the wrong substring. It looks like the wikitext that is generating it is this:

<ref>{{Citation|last=ABC News|title=Sia Performs 'Reaper' Live on 'GMA'|date=2016-01-29|url=|accessdate=2017-10-08}}</ref>

That wikitext seems to be generating this fragment in its output. <span dir="auto">Sia Performs 'Reaper' Live on 'GMA'<span /></span>

Amire80 (talkcontribs)


Whatamidoing (WMF) (talkcontribs)

That template seems use CS1, so pinging @Trappist the monk. If citation system adds a span tag to anything, then he'll know about it.

Trappist the monk (talkcontribs)

Not my fault. is using an older (don't know how much older) version of Module:Citation/CS1. Editors at have substantially modified what they copied from The <span dir="auto"> ... </span> is not from and is located at line 204.

I think that the fix is at lines 1047 and 1048. To prevent a leading or trailing single quote from converting the italic ('') markup into bold markup ('''), the older modules inserted a self-closed <span />. Because of html 5, that changed at to <span></span>

Whatamidoing (WMF) (talkcontribs)

@IKhitron, it looks like you edited the module last. Can you take a look at the lines that Trappist the monk identified as the likely source of the problem?

IKhitron (talkcontribs)

Hello all.

Yes, this is the problem, thanks a lot.

The module is very old indeed. It was imported a long time ago by User:Kotz. I took it from his hands and made a lot of changes to make it support Hebrew. User:Eranroz changed the metadata messages to be in Hebrew. There are also some changes to make it fit our grammatic rules - for example, we do not allow Hebrew text to be italic. As a result of all this, it became impossible to copy new versions from English module when it updates, because all the job of days or weeks should be done again for each update. We have no human resources for this, so we prefer to use the very old version - it's still wonderful and helps us very much.

So, when Linter started to show this problem, I just changed italic arguments from wiki markup to html tags, hoping one day we'll know how to fix the problem, about 30 times. Now, thanks to you, we can run a bot or AWB to remove all these fixes.

Whatamidoing (WMF) (talkcontribs)
Reply to "Reaper"

self-closed tags in the Hebrew Wikipedia

Amire80 (talkcontribs)


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.) (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=""><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&" class="Z3988"><span style="display:none;"> </span></span></span>↩

Probably this one (and others):

{{הערה|שם=CFF2016|{{cite web|url=|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
  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.

There are no older topics
Return to "Lint errors/self-closed-tag" page.