Jump to content

Wikipedia talk:Linter

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Portal Multiline table in list

[edit]

Others may have already figured this out, but I thought I would share what I have learned about Multiline table in list lint errors in the Portal namespace. These errors are usually coming from {{Transclude excerpts as random slideshow | paragraphs=1-2 ...}} and one of the articles being transcluded having a table-bearing template near the top, not on its own line, and the fix is to put the table-bearing template on its own line. I fixed Portal:Banks by editing Banq, changing

{{redirect|Banc|the Welsh bank branded as simply "Banc"|Development Bank of Wales}}'Banq' and 'banc' are alternative spellings used in company names to evade legal restrictions on the use of the word 'bank' while maintaining a similar pronunciation. This practice is common in the financial services industry, particularly in the United States.{{Banking |banks}}

to

{{redirect|Banc|the Welsh bank branded as simply "Banc"|Development Bank of Wales}}'Banq' and 'banc' are alternative spellings used in company names to evade legal restrictions on the use of the word 'bank' while maintaining a similar pronunciation. This practice is common in the financial services industry, particularly in the United States.
{{Banking |banks}}

I fixed User:Cactus.man/Sandbox/P-Sco/Selected3 by editing Scotland during the Roman Empire, changing

{{History of Scotland}}'''Scotland during the Roman Empire''' refers to the [[protohistory|protohistorical]] period during which the [[Roman Empire]] interacted within the area of modern [[Scotland]]. Despite sporadic attempts at conquest and government between the first and fourth centuries AD, most of modern Scotland, inhabited by the [[Caledonians]] and the [[Maeatae]], was not incorporated into the Roman Empire with Roman control over the area fluctuating.

to

{{History of Scotland}}
'''Scotland during the Roman Empire''' refers to the [[protohistory|protohistorical]] period during which the [[Roman Empire]] interacted within the area of modern [[Scotland]]. Despite sporadic attempts at conquest and government between the first and fourth centuries AD, most of modern Scotland, inhabited by the [[Caledonians]] and the [[Maeatae]], was not incorporated into the Roman Empire with Roman control over the area fluctuating.

The first step is to determine which transclusion is bringing in the offending template, and the second step is to put the template on its own line, so that it doesn't get brought in by {{Transclude excerpts as random slideshow}}. —Anomalocaris (talk) 21:21, 9 December 2024 (UTC)[reply]

Thanks for this information! Finally I now know how to fix these. Gonnym (talk) 21:32, 9 December 2024 (UTC)[reply]
Thanks for figuring this out! I have been ignoring these transient, frustrating errors for a long time. – Jonesey95 (talk) 23:37, 9 December 2024 (UTC)[reply]
The page User:The Transhumanist frequently shows up with this lint error for the same reason. Just now I fixed templates-not-their-own-line in Resource depletion, Biodiversity loss and Gray goo. It was tedious finding them, but the job is done for now. (The Transumanist: No action is needed on your part, but if you are interested in fixing lint errors, we welcome your support.) —Anomalocaris (talk) 08:13, 26 December 2024 (UTC)[reply]
Nice to know there's a way to hunt these. I'm still seeing T's page reappearing, so there's still something related to their page/that portal? that remains in a connected page, or something has returned. With far less frequency though, and that's surely due to your findings and fixings. I'm also seeing Portal:Japan with a similar error statement, but as reporting as a bogus image, and it's reappearing a few times a day. I'd assume its a similar kind of issue? Zinnober9 (talk) 17:47, 10 January 2025 (UTC)[reply]
I think the Portal:Japan bogus file options may be caused by code referred to in this discussion or in this subsequent discussion. – Jonesey95 (talk) 00:47, 11 January 2025 (UTC)[reply]
I was hoping it was something as easy as dropping a template to a new line somewhere. That doesn't seem as nice. Oh well. At least it isn't as annoying as some other portal errors that exist. Thanks for the background on these. Zinnober9 (talk) 05:52, 11 January 2025 (UTC)[reply]
I wonder if a search or SQL query can made to search for templates starting right after other templates end (so search for }}{{) while having an exception list of templates not to look for, so any citation or inline maintenance templates. Gonnym (talk) 11:24, 13 January 2025 (UTC)[reply]
That might need to happen. Not sure what sort of hit rate and false flag rates we'd run into, but worth looking into at some point. {{pb}} can likely be ignored as the primary search for this query as I don't recall ever seeing any crazy happening to that template. If it's neighboring something, I wouldn't discount it as a neighbor to another template in case the {{pb}} puts the other in an unhappy scenario. Zinnober9 (talk) 21:27, 13 January 2025 (UTC)[reply]

Multiline table in list errors all fixed!

[edit]

Thanks to the discussion at Template talk:WikiProject banner shell#It should be possible to use this template on its own talk page, the last three Multiline table in list errors are fixed! —Anomalocaris (talk) 12:38, 27 December 2024 (UTC)[reply]

Bot running today (and probably tomorrow)

[edit]

Qwerfjkl (bot) is running on Linter errors today, if you're wondering why the error count is dropping so fast. If you find straight text find-and-replace patterns that represent more than 100 errors across multiple pages, please add them to the bottom of the relevant table at Wikipedia:Linter/Signature submissions. Follow the existing formatting conventions, like this. I compile new patterns and submit them to the bot periodically.

Note that the bot is not currently able at this time to use regular expressions to find or replace text; such patterns are welcome, but someone else will need to work on them. – Jonesey95 (talk) 19:09, 19 January 2025 (UTC)[reply]

I think we should really clear the current entries from the page instead of finding new patterns as at some point it will become too large too be useful. Gonnym (talk) 10:59, 21 January 2025 (UTC)[reply]
Clearing these frequent errors is a great idea. Anyone is welcome to work on fixing any of the patterns that have been identified. I work on small batches that I find all the time, and sometimes I take on a larger batch. I usually leave pages with no errors except obsolete tags, so that existing bots have a better chance of finishing the work.
I disagree about adding new patterns. I collect them here for editors and bots to work on, and I feed non-regex patterns to the bot every month or two when there is a large enough collection to make a bot run worth the effort. The most recent bot run eliminated about 38 patterns from the page and took large chunks out of a few more. It fixed about 30,000 errors in less than 48 hours. Without collecting new patterns on the page, it will be much more difficult to feed the bot. – Jonesey95 (talk) 15:35, 21 January 2025 (UTC)[reply]
Completed entries are regularly being removed (Jonesey95 removed 30kb from the page size of eliminated patterns yesterday). I do understand you in the way of "the page is getting big", but in my way of thinking, I'd much rather the page be populated and Qwerfjkl have some choices in patterns to go after rather than sitting around waiting for us to find more patterns. I'm sure we'll reach a point later on where patterns won't be as prevalent and will need a little more hunting and the page will shrink in size again, but right now, big page equals big cleanup. Zinnober9 (talk) 15:40, 21 January 2025 (UTC)[reply]
Qwerfjkl does not pick patterns, that's what Jonesey95 does. Gonnym (talk) 19:01, 21 January 2025 (UTC)[reply]

For the past month or so, I moved from lint errors to Category:CS1 errors. I came back to lint errors and saw a big reduction, so, congratulations to all who have been working on them. To clarify this discussion, please confirm that what's happening here is, for linty markup patterns that occur on multiple pages, editors are asked to submit the linty markup and proposed workarounds on Wikipedia:Linter/Signature submissions, and then Jonesey95 or others will carefully verify the proposed fix is correct, and if so, run Qwerfjkl (bot) to fix the error. Is that right? —Anomalocaris (talk) 18:17, 21 February 2025 (UTC)[reply]

I wouldn't say that I'm the gatekeeper, but as far as I know, I'm the only person who has been feeding find/replace patterns to the bot. The rest of your summary looks correct. I would add: Any editors are welcome to work on batches of patterns, especially those using regular expressions, since there is not a currently active bot that processes custom regular-expression patterns. I sometimes grab a batch of 10 to 200 results, create a pattern in my AutoEd script, and process that list of pages. It's a nice way to reduce the overall error count by 100 to 1000 or more, and processing one page at a time means that I can pick off stray missing end tags or other Linter errors that don't fit a common pattern. – Jonesey95 (talk) 21:48, 21 February 2025 (UTC)[reply]
I'm happy to accept replacements from anyone. Ideally I would gather them myself, but I've been pretty busy this year with real life engagements, and I don't think that will change any time in the next few months. — Qwerfjkltalk 11:58, 22 February 2025 (UTC)[reply]
I love how the concern from some editors to create this omni-bot (that has yet to be created) to reduce edits on the same page, has resulted in many edits to the same page and a way less efficient process. Gonnym (talk) 13:30, 23 February 2025 (UTC)[reply]

Broken DISPLAYTITLE

[edit]

With this edit, Linter broke the page's WP:DISPLAYTITLE. A <center> tag was replaced with a styled <div>, which is not allowed there. Paradoctor (talk) 12:10, 30 January 2025 (UTC)[reply]

Since that was my edit, sorry. Was not aware that div wasn't allowed in displaytitles.
It previewed fine (well, centered and usertalk + name overlapping as they had had it) and I thought it displayed as expected after, but I see it isn't displaying correctly in my version in the page history. That said, "span" is not centering it at all as was the user's intent, so that isn't the fix either since it's on the left side of the page. I looked at the possibility of swapping it to {{center}} with a test edit in my sandbox, but that also breaks/reports a broken WP:DISPLAYTITLE, and I don't see any centering options from the Template:DISPLAYTITLE, so I'm at a loss at the moment for a better solution. Zinnober9 (talk) 16:35, 30 January 2025 (UTC)[reply]
I played around with various things in my sandbox and was unable to find a replacement for <center>...</center>. I have posted a help request at mw:Help_talk:Lint_errors/obsolete-tag, but I do not expect help any time soon, based on that page's traffic. – Jonesey95 (talk) 17:17, 30 January 2025 (UTC)[reply]
The only wiki-side solution I see is to add #firstHeading { text-align:center } to the page's CSS, but Linter can't do that, so the user needs to do it.
I'm well aware that the <span> won't work. I used it only to preserve the intent while making the argument safe for consumption, as I didn't want to just remove the tag. Paradoctor (talk) 17:41, 30 January 2025 (UTC)[reply]
P.S.: Just realized that the #firstHeading style would apply to any and all pages, so no joy there either, unless one is good with that. Paradoctor (talk) 19:43, 30 January 2025 (UTC)[reply]

HTML5 misnesting all fixed (except for a couple of protected pages and error examples)

[edit]

Whew! A few thousand pages of mostly one-by-one fixes later, Special:LintErrors/html5-misnesting is cleared out, except for a couple of protected pages and error examples. Great work, everyone! That's our last high-priority group (I don't count "Duplicate IDs" as high-priority). Just 142,620 misnested tags, thousands of which are bot-fixable, and we'll be left with just low-priority issues. – Jonesey95 (talk) 21:22, 18 February 2025 (UTC)[reply]

Nice, congrats us! There's now only one full protected HTML5 misnest, the rest being error examples. There's also are a few "delete table" issues that have popped up recently, but those won't likely last either. One is a testcase and the other six are currently stumping me.
Looking forward to the misnested errors dropping at a good rate next. Zinnober9 (talk) 03:23, 19 February 2025 (UTC)[reply]

Template:Asbox

[edit]

Something on Template:Asbox (Template:Article stub box) is triggering 6k+ (and still growing) "misnested code tag" errors. I believe the error started Thursday or Friday, but not seeing any changes to the template in that timeframe or any recent edits using code tags. Anyone know? Zinnober9 (talk) 16:04, 2 March 2025 (UTC)[reply]

This problem could have been triggered by patch Thursday, Wikimedia's weekly sofware updates. —Bruce1eetalk 17:19, 2 March 2025 (UTC)[reply]
See this thread. I'm assuming a MediaWiki change caused this. I believe that the count will top out below 7,000 pages if my searches in that discussion were good ones. – Jonesey95 (talk) 17:56, 2 March 2025 (UTC)[reply]
Yup, that's it. Thank you. Was hoping it was a quick and simple error in a recent edit from the "offending" template instead of a quirky byproduct of a MediaWiki change, but it sounds like a bot can handle this issue in the coming days. Thank you both! Zinnober9 (talk) 18:56, 2 March 2025 (UTC)[reply]

sic stripper

[edit]

So this was a weird one. Found a wiki italics surrounding a tq template containing a sic template. These combinations as pairs were fine, but when you have a perfect storm of all three together, then the italics makes the sic template strip the tq template. I found swapping to <i>...</i> cleared it. Is this a known issue and there's a Phab ticket on this? Or is there some extra parameter (say on sic) that I've overlooked? Zinnober9 (talk) 19:38, 6 March 2025 (UTC)[reply]

This is not a bug, it's just invalid syntax. The markup opened an italic tag, then opened a q tag, then closed the italic tag. That is misnesting. I usually fix cases like this by "unnesting" the italic markup, like this: You stated cambie un poco la historia porqur [sic] algunas something.Jonesey95 (talk) 21:19, 6 March 2025 (UTC)[reply]
That had been my first thought, but then when I tested the original with an inactive sic, ''You stated {{tq|cambie un poco la historia porqur sic algunas something}}...'', it was clean, so lost confidence that was what was happening. Zinnober9 (talk) 02:18, 7 March 2025 (UTC)[reply]

Latent obsolete HTML in module namespace

[edit]

There was obsolete HTML in List of mountains in the Canadian Rockies coming from Module:Mountains Prism, which had this markup:

return "<font color=red>" .. value .. "</font>"<code>

which I modified to

return "<span style=\"color:red\">" .. value .. "</span>"

There could be other modules that could output font, center, strike, or tt tags, and we don't know about them because they happen in error messages that aren't occurring. Someone who knows more about this than me could write a search for such markup. —Anomalocaris (talk) 07:00, 9 March 2025 (UTC)[reply]

Insource search results for the above: font, center, tt. Gonnym (talk) 10:43, 9 March 2025 (UTC)[reply]
I think that I have fixed all of the problem cases in those search results. – Jonesey95 (talk) 15:09, 9 March 2025 (UTC)[reply]
Hmm, I fixed only one of four latent font tags in Module:Mountains Prism and Jonesey95 fixed the other three, good work! Insource search results for strike: There were no results matching the query. —Anomalocaris (talk) 04:24, 10 March 2025 (UTC)[reply]

New bogus file options error

[edit]

A new bogus file options error is being reported: {{!}} in file captions, for example in Pentagon Renovation Program. The caption contains a pipe, and {{!}} is used to prevent the pipe being interpreted as a file option separator. But this is no longer working, and only the portion of the caption after {{!}} is displaying.

Replacing {{!}} with &#124; doesn't help. The only solution I've found is to replace {{!}} with <nowiki>|</nowiki>, for example here. Does anyone have a better solution. —Bruce1eetalk 08:35, 9 March 2025 (UTC)[reply]

In that specific example, what does the pipe add to the caption? Gonnym (talk) 10:53, 9 March 2025 (UTC)[reply]
I don't see the point of a pipe in that caption. Another example I don't see the point of is Soon and Baliunas controversy with this caption: "Center for Astrophysics | Harvard & Smithsonian". But clearly that is what the editors want, and strictly speaking, we shouldn't be changing how the page renders after our repairs. —Bruce1eetalk 11:17, 9 March 2025 (UTC)[reply]
Well, we aren't automatons either. If you see an error, don't hack a way to make that error work. A pipe isn't a substitute for any valid punctuation en.wiki uses. Not sure if this was really their intention when they added these new errors, but they do highlight actual errors that should be fixed. Gonnym (talk) 11:49, 9 March 2025 (UTC)[reply]
I think these pipes are what the editors intended. But I agree that pipes are not correct punctuation, and perhaps the solution is to replace them with something more appropriate, for example a comma. —Bruce1eetalk 12:38, 9 March 2025 (UTC)[reply]