Help talk:Lint errors/self-closed-tag
Add topic| This page used the Structured Discussions extension to give structured discussions. It has since been converted to wikitext, so the content and history here are only an approximation of what was actually displayed at the time these comments were made. |
self-closed tags in the Hebrew Wikipedia
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
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.) Amir E. Aharoni {{πππ}} 10:28, 12 July 2017 (UTC)
- 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:Probably this one (and others):
<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>β©
The reason is that it is generating an unclosed span inside the span tag, so the output looks similar to this example:{{ΧΧ’Χ¨Χ|Χ©Χ=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 html validator agrees:<span dir="auto"><span></span>
For future readers the way to verify this is :Error: Unclosed element span.
- Special:Expandtemplates
- Paste the page contents in the wikitext text area
- Add the page name
- Click the checkbox to output the raw html
- Go to https://validator.w3.org/nu/
- Paste the raw html (make sure the outer portion is a well nested html document)
- 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. 197.218.90.188 (talk) 12:33, 12 July 2017 (UTC)
- Thanks, it's magic. I fixed it.
- Now who are you, mysterious stranger? I want to thank you :) Amir E. Aharoni {{πππ}} 12:46, 12 July 2017 (UTC)
- 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. ;-) SSastry (WMF) (talk) 14:39, 12 July 2017 (UTC)
- Worry not, I'll have more Linter questions :) Amir E. Aharoni {{πππ}} 15:50, 12 July 2017 (UTC)
- So what was the problem? A bug in cite web? IKhitron (talk) 16:16, 12 July 2017 (UTC)
- I don't know, check the diffs :) Amir E. Aharoni {{πππ}} 17:34, 12 July 2017 (UTC)
- I did, and then asked. IKhitron (talk) 17:35, 12 July 2017 (UTC)
Reaper
[edit]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) Amir E. Aharoni {{πππ}} 08:56, 8 October 2017 (UTC)
- 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> SSastry (WMF) (talk) 16:01, 8 October 2017 (UTC)
- Thanks! Amir E. Aharoni {{πππ}} 12:14, 9 October 2017 (UTC)
- 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. Whatamidoing (WMF) (talk) 20:14, 17 November 2017 (UTC)
- 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>Trappist the monk (talk) 20:45, 17 November 2017 (UTC) - @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? Whatamidoing (WMF) (talk) 06:22, 20 November 2017 (UTC)
- 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. IKhitron (talk) 09:45, 20 November 2017 (UTC)
- So we need global templates to truly solve this problem. Whatamidoing (WMF) (talk) 19:48, 21 November 2017 (UTC)