Help talk:Lint errors/self-closed-tag

About this board

Amire80 (talkcontribs)

Hi,

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=https://www.youtube.com/watch?v=UMhLZjmC7Ao|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)

Thanks!

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.

he.wiki is using an older (don't know how much older) version of Module:Citation/CS1. Editors at he.wiki have substantially modified what they copied from en.wiki. The <span dir="auto"> ... </span> is not from en.wiki and is located at https://he.wikipedia.org/wiki/Module:Citation/CS1 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 en.wiki 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

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.

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