Mailing List Archive

incorrect category entries / German Wikipedia
Hi,

in German Wikipedia there are two incorrect entries in
https://de.wikipedia.org/wiki/Kategorie:Wikipedia:Seite_mit_Syntaxhervorhebungsfehlern

This category is filled by Mediawiki software, something
like Syntaxhighlight-source-category or similar.

Please explain, how it's possible, that there are these two incorrect
entries of pages
with "<source>" indeed but commented out.

Thank you
Martin ...
Re: incorrect category entries / German Wikipedia [ In reply to ]
Both pages start with <source>, which is a deprecated alias for
<syntaxhighlight>. Replacing it with e.g. <nowiki> will remove the
pages from the category.

Wait, you ask. We are talking about .js pages, don't we? There is not
wikitext. Still, for historical reasons, even .js pages are parsed by
the wikitext parser to populate database tables like the one needed
for Special:WhatLinksHere.

This behavior is the reason why .js pages often start with a comment
that contains <syntaxhighlight> or preferably <nowiki>. This
effectively tells the wikitext parser "there is nothing to see here,
please go away". Still it will parse at least this initial tag and
report it when it's an outdated <source>.

I hope this helps.

Kind regards
Thiemo
_______________________________________________
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
Re: incorrect category entries / German Wikipedia [ In reply to ]
Hi Thiemo,

it helps a little.

The most interesting thing is, that <source> within the mentioned .js pages
is commented out. So it should not be read as deprecated alias, should it?

Thanks
Martin ...




Am Fr., 9. Juni 2023 um 09:13 Uhr schrieb Thiemo Kreuz <
thiemo.kreuz@wikimedia.de>:

> Both pages start with <source>, which is a deprecated alias for
> <syntaxhighlight>. Replacing it with e.g. <nowiki> will remove the
> pages from the category.
>
> Wait, you ask. We are talking about .js pages, don't we? There is not
> wikitext. Still, for historical reasons, even .js pages are parsed by
> the wikitext parser to populate database tables like the one needed
> for Special:WhatLinksHere.
>
> This behavior is the reason why .js pages often start with a comment
> that contains <syntaxhighlight> or preferably <nowiki>. This
> effectively tells the wikitext parser "there is nothing to see here,
> please go away". Still it will parse at least this initial tag and
> report it when it's an outdated <source>.
>
> I hope this helps.
>
> Kind regards
> Thiemo
> _______________________________________________
> Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
> To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org
> https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
>
Re: incorrect category entries / German Wikipedia [ In reply to ]
Yea, that's really confusing. For consumers that read the page as
JavaScript the <source> is in a comment, true. But the wikitext parser
doesn't know what JavaScript comments are. It ignores the // at the
start of the line. You can test this when you copy-paste the source
code from the .js page into a normal wikitext page and click preview.

The <source> tag really is executed and it really is correct to track
this as "this page uses the outdated <source> alias".

Best
Thiemo
_______________________________________________
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
Re: incorrect category entries / German Wikipedia [ In reply to ]
okay, thank you, with this I'll open a bug report. Do you know the
extension or software, that categorizes the mentioned pages?

Am Fr., 9. Juni 2023 um 10:46 Uhr schrieb Thiemo Kreuz <
thiemo.kreuz@wikimedia.de>:

> Yea, that's really confusing. For consumers that read the page as
> JavaScript the <source> is in a comment, true. But the wikitext parser
> doesn't know what JavaScript comments are. It ignores the // at the
> start of the line. You can test this when you copy-paste the source
> code from the .js page into a normal wikitext page and click preview.
>
> The <source> tag really is executed and it really is correct to track
> this as "this page uses the outdated <source> alias".
>
> Best
> Thiemo
> _______________________________________________
> Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
> To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org
> https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
>
Re: incorrect category entries / German Wikipedia [ In reply to ]
As said there is no bug. The pages need to be updated.
_______________________________________________
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
Re: incorrect category entries / German Wikipedia [ In reply to ]
On Fri, Jun 9, 2023 at 9:13?AM Thiemo Kreuz <thiemo.kreuz@wikimedia.de>
wrote:

> Both pages start with <source>, which is a deprecated alias for
> <syntaxhighlight>. Replacing it with e.g. <nowiki> will remove the
> pages from the category.
>

Or just get rid of it. Adding a formatting tag was useful back in 2011 when
that page was created, because MediaWiki did not automatically
syntax-highlight JS pages back then. But it does now, so those tags don't
serve any purpose.
Re: incorrect category entries / German Wikipedia [ In reply to ]
I’d replace // <source> // </source> with // <nowiki> // </nowiki>, which is what I add to all my user scripts. The use case is preventing things like userSignature = “~~~~” from being rendered as the developer’s hard-coded signature on page save.



Sincerely,

Novem Linguae