Jump to content

Wikipedia:Village pump (technical)

From Wikipedia, the free encyclopedia
(Redirected from Wikipedia:VPT)
 Policy Technical Proposals Idea lab WMF Miscellaneous 
The technical section of the village pump is used to discuss technical issues about Wikipedia. Bug reports and feature requests should be made in Phabricator (see how to report a bug). Bugs with security implications should be reported differently (see how to report security bugs).

If you want to report a JavaScript error, please follow this guideline. Questions about MediaWiki in general should be posted at the MediaWiki support desk. Discussions are automatically archived after remaining inactive for five days.

[edit]

My Edit records link, no longer functions properly. GoodDay (talk) 13:36, 4 February 2025 (UTC)[reply]

Is that an old link? The url should look like this https://xtools.wmcloud.org/ec/en.wikipedia.org/X201. Alternatively, go to the bottom of your Contributions page and click Edit Count. - X201 (talk) 14:23, 4 February 2025 (UTC)[reply]
I was required to sign in but after that your link worked. There was a warning on replication lag, which could be causing issues. -- LCU ActivelyDisinterested «@» °∆t° 19:41, 4 February 2025 (UTC)[reply]
Tried again @X201: & @ActivelyDisinterested:, by updating to [1], still won't work. It keeps telling me to log in to continue. GoodDay (talk) 01:31, 10 February 2025 (UTC)[reply]
still won't work because "For performance reasons, the requested data is only available to logged-in users" thus you would login to continue. -- GreenC 18:06, 15 February 2025 (UTC)[reply]

Petscan dead?

[edit]
Resolved
 – Appears to be up again. — xaosflux Talk 19:26, 10 February 2025 (UTC)[reply]

Wikipedia:PetScan seems not to be running any more. Is this a temporary glitch, or something more serious? It's part of several workflows I'm currently using. — The Anome (talk) 13:08, 8 February 2025 (UTC)[reply]

Try this page. This external volunteer run tool has been having some recurring issues. — xaosflux Talk 20:50, 8 February 2025 (UTC)[reply]
@Xaosflux — Reporting PetScan Not running today for past sereral hours; was Okay yesterday. Error This web service cannot be reached. JoeNMLC (talk) 16:44, 15 February 2025 (UTC)[reply]
The link to report errors about that is in my comment above. That utility is not managed by the English Wikipedia. — xaosflux Talk 17:20, 15 February 2025 (UTC)[reply]

reqphotos & maps

[edit]

Is there any way to take articles which are tagged with {{photo requested}} and display them in an interactive map? I've poked around the reqphoto pages, but didn't come across anything. — Fourthords | =Λ= | 19:52, 9 February 2025 (UTC)[reply]

Wiki Loves Monuments does that kind of stuff. Some places in the photo competition have a coordinate, that gets stored in a sql database. That database is then used to show the places on a map.
Sorting pages transcluding "template:photo requested" with locational categories would be orders of magnitude simpler. Snævar (talk) 19:22, 10 February 2025 (UTC)[reply]
Yes. Navigate to the most relevant subcategory in Category:Wikipedia requested photographs by location and use the "Map all coordinates using OpenStreetMap" option. – SD0001 (talk) 09:25, 11 February 2025 (UTC)[reply]
That's terrific! Exactly the sort of thing I was looking for, thanks!! — Fourthords | =Λ= | 18:36, 15 February 2025 (UTC)[reply]

Thumbnail background

[edit]

The English Wikipedia used to have white background for thumbnail images with transparency. It was specified explicitly in MediaWiki:Common.css from 2010 until 2017, when that style was removed locally because is was implemented globally (T154077). However, relatively recently that global style for the white background disappeared, so all transparent thumbnails became gray (here and on other Wikipedias as well). I guess that this change was related to introducing the "dark theme" but could not find any explanations why it must result in reducing the contrast in both cases instead of using the appropriate theme-dependent background (white/black, same as the page itself). Does anybody know the story behind this change and whether it was intentional? Is it possible to make specific thumbnails appear "opaque" (having background = page color) without modifying the files? — Mikhail Ryazanov (talk) 22:51, 11 February 2025 (UTC)[reply]

The background for images ended up being 'background-color-interactive-subtle', which is, as you guessed, a dark theme color variable - change 3. That change had two preceding changes - change 1 and change 2.
You could override the style in a similar way english wikipedia did originally in common.css, just add additional declarations to it to make it apply to one image only. Snævar (talk) 23:17, 11 February 2025 (UTC)[reply]
Plain
In {{stack}}
With class=skin-invert
Could you please clarify how to override the background for a specific thumbnail?
The only relevant thing I've found in the documentation is class=skin-invert to allow "inverting" the image colors in the dark mode (technically, apply filter: invert(1) hue-rotate(180deg), which should be equivalent to inverting the luma). This, however, is also problematic because the dark-mode background is inverted with the image, and it actually is redefined to hard-coded value #c8ccd1, which makes the gray line in this example image practically invisible (what is even more weird, when I've tried to place these images inside {{stack}} or {|class="floatright" ..., their backgrounds in the dark mode became very different). This particular image is perhaps not an example of how to make good images but it is kind of illustrative in the sense that many images with transparent background are intended to be displayed over white background (or that the user will choose the background wisely) rather than arbitrary shades of gray. — Mikhail Ryazanov (talk) 07:08, 12 February 2025 (UTC)[reply]
Like this - use a unique class each time:
<div class="potato">[[File:Example.png|thumb]]</div>
with the following CSS:
.potato figure[typeof~='mw:File/Thumb'],
.potato figure[typeof~='mw:File/Frame'] { enter css values here }
Snævar (talk) 14:09, 14 February 2025 (UTC)[reply]
OK, but where "the following CSS" should go? — Mikhail Ryazanov (talk) 21:38, 14 February 2025 (UTC)[reply]
Probably this is something we could ask to change upstream. Izno (talk) 00:14, 12 February 2025 (UTC)[reply]
I also hope so. Would you please take care of this? — Mikhail Ryazanov (talk) 07:08, 12 February 2025 (UTC)[reply]

Random vital articles

[edit]

On the WP:Vital articles pages for each level, there is a random article button on each level as well as each category. Originally, the random article button was for the top-level categories beginning with Category:Wikipedia level-1 vital articles, level 2, level 3, and so on, but the articles are now sorted by article quality and category. I put a temporary solution in to combine multiple categories into one, but I am hoping for a solution that randomizes the vital articles better. I particularly like this feature of vital article for two reasons. Obviously, one is to improve the articles, but I also find it a neat way to read random articles as a reader. Any ideas on how I can do this? Interstellarity (talk) 00:50, 12 February 2025 (UTC)[reply]

As far as I know, this is not possible. Categories can be infinitely deep, so you cannot 'randomly' select something from them. That's why using subcategories is often not a good idea and have multiple categories is better, especially when you are essentially applying labels to something. —TheDJ (talkcontribs) 10:16, 12 February 2025 (UTC)[reply]
It's not a one-button solution and there's a bit of a learning curve, but PetScan can do this. All talk pages descending from Category:Wikipedia level-3 vital articles (depth 2) in random order. —Cryptic 10:45, 12 February 2025 (UTC)[reply]
@Cryptic Where can I ask for help using this tool to create a button? The only thing I've been able to do is for the articles to go into mainspace rather than talk space, which is a step in the right direction, but it's not what I'm looking for in the final outcome. I am hoping that whatever help you can provide me, whether it's asking somewhere else or from you, that would be great. Interstellarity (talk) 15:38, 13 February 2025 (UTC)[reply]
Interstellarity, here? This is the technical village pump. For instance, under Other sources > Namespaces you can select "Change to talk page". — Qwerfjkltalk 13:15, 14 February 2025 (UTC)[reply]
That's not what I wanted. I wanted to the random articles to go to the main namespace, not the talk namespace. Interstellarity (talk) 13:47, 14 February 2025 (UTC)[reply]
@Interstellarity Try toolforge:randomincategory, e.g. toolforge:randomincategory/B-Class_level-1_vital_articles&category2=C-Class_level-1_vital_articles&category3=FA-Class_level-1_vital_articles&category4=GA-Class_level-1_vital_articles&category5=Start-Class_level-1_vital_articles --Ahecht (TALK
PAGE
)
20:48, 18 February 2025 (UTC)[reply]
@Ahecht: That's basically what the current script is based on. I was hoping for a simpler solution, but I'm assuming that's the best you could come up with. Interstellarity (talk) 23:21, 18 February 2025 (UTC)[reply]
@Interstellarity if I have a chance, I'll look into having randomincategory traverse a single level of child categories. There would be a significant impact on the time it takes to run the script, so I'd have to see how feasible it is. --Ahecht (TALK
PAGE
)
13:50, 19 February 2025 (UTC)[reply]
@Ahecht Thank you for your help. I really appreciate it. Interstellarity (talk) 21:03, 19 February 2025 (UTC)[reply]

49-state US flag

[edit]

I happened to be looking at File:US flag 49 stars.svg, and I noticed it's included in a lot of Olympic athletes' pages, including ones too young to have competed in the 1960 Olympics, the only one where it would be appropriate. Is this incorrectly included in a template somewhere? I tried to go down the rabbit hole of Olympic template inclusions but quickly got lost.—Chowbok 22:01, 14 February 2025 (UTC)[reply]

The flag is updated on July 4 following the admission of new states to the Union since the previous July 4. Alaska was admitted on January 3, 1959 and Hawaii on August 21, 1959 so the 49-star flag was in use from July 4, 1959 until July 3, 1960. The 1960 Summer Olympics took place in August-September 1960, by which time the 50-star flag was in use. --Redrose64 🌹 (talk) 00:05, 15 February 2025 (UTC)[reply]
@Chowbok: As the edit notice for this page says: "Where did you encounter the problem? Please add links when possible." The flag had 50 stars at the 1960 Olympics but 49 at the 1959 Pan American Games so it could for example be articles displaying {{Footer Pan American Champions 4x100m Men}}. PrimeHunter (talk) 00:06, 15 February 2025 (UTC)[reply]
I checked the first article in the WhatLinksHere list, which was Brian Boitano; its only use of the 49-star flag was from the transclusion of {{NavigationOlympicFigureSkatingChampionsMen}}. That template uses it just once: for the American winner of Figure skating at the 1960 Winter Olympics – Men's singles, an event that took place in February 1960. This all seems correct to me. jlwoodwa (talk) 02:26, 15 February 2025 (UTC)[reply]
Aha. I gotcha. Thanks!—Chowbok 02:58, 15 February 2025 (UTC)[reply]
[edit]

In the page Oura Health there is an instance of an Interlanguage link, per:

  • {{Interlanguage link|English article title|language code|Title in foreign language}}

In this case, it is:

  • {{ill|io-tech|fi|io-tech}}

Per:

  • Laine, Petrus (2024-10-04). "Oura Health julkaisi uuden sukupolven Oura Ring 4 -älysormuksen" [Oura Health launches new generation Oura Ring 4 smart ring] (in Finnish). io-tech [fi]. Retrieved 2025-02-14.

While this page does not exist in the English Wikipedia, it does exist in Finish Wikipedia project, however, it shows as a redline link (page does not exist). So, since there is no corresponding English Wikipedia page, it occurred to me to delete the English title, per:

  • {{ill||fi|io-tech}}

But this produced an error.

At Template:Interlanguage link page, there is a note below:

Non-existent foreign article

On Wikipedia, links to nonexistent pages normally show as red links. There is no way for this template, or any code on Wikipedia, to check whether an article on another language's Wikipedia exists. Links to all foreign-language articles, including nonexistent foreign-language articles, show as blue links.

... yet it shows as a red link...

Typically, one would add an Interlanguage link precisely because no corresponding Wikipedia page exists in the home language (in this case, English) - yet it appears that in order to link to another Wikipedia language page one is required to supply the name of the (non-existent) English Wikipedia page. This would appear to be a Catch-22 situation.

The implication would then appear to be that it is necessary to create an English Wikipedia page to address this issue - but that would not only require undue effort on behalf of editors, but it would also defeat the purpose of linking to another Wikipedia project page.

Surely, there must be a simple and intuitive way to link to other language Wikipedia pages - no? Enquire (talk) 00:52, 15 February 2025 (UTC)[reply]

It is perfectly acceptable to have a red link when the English Wikipedia would benefit from having an article on that topic. Having a red link for the English WP associated with an interlanguage link may be regarded as a request for the creation of an article on that topic in the English WP. Alt.Donald Albury (talk) 02:12, 15 February 2025 (UTC)[reply]
I support encouraging editors to create pages in new Wikipedia that mirror pages in other languages - but I would have expected that Interlanguage links would take the Wikipedia reader to the referenced other language Wiki page. As is, visitors would be forgiven by thinking that the link is broken and/or that no such page exists. Enquire (talk) 06:41, 15 February 2025 (UTC)[reply]
I can see that the blue link that is the interlanguage link after the red link is may not be sufficiently obvious. Perhaps that link can be made more obvious to the casual reader, but I'm not sure what would work. Alt.Donald Albury (talk) 07:15, 15 February 2025 (UTC)[reply]
Red links are not prohibited. --Redrose64 🌹 (talk) 12:48, 15 February 2025 (UTC)[reply]
Now I see it. I support encouraging users to create Wiki articles in their home language but, as @Alt.Donald Albury noted, the cited ILL is not at all obvious - I admit that I, myself, did not notice that before I started this thread. That maybe is (in part) because, in this instance, due to kerning, fi appears quite narrow.
In consequence, I would like to propose that the ILL template be modified. Currently, as in this example, the ILL renders as:
Instead, I propose that the template be amended to render as follows:
In this way it is quite clear that, while an English Wikipedia page does not exit (red line link) that a Finnish Wikipedia page does. Also, this would evidence reciprocity in as much as the syntax for the (red line) English page (which does not exist) is the same as for the Finnish page (which does exist). Enquire (talk) 20:35, 15 February 2025 (UTC)[reply]
I would prefer io-tech [finnish], getting "finnish" from the "fi" language code is easy with {{#language:fi|en}}. Snævar (talk) 21:56, 15 February 2025 (UTC)[reply]
Það myndi líka virka. [That would also work.] Enquire (talk) 22:40, 15 February 2025 (UTC)[reply]
Recall that the displayed text should be readily understood by readers, and so personally I don't think the literal interlanguage wikitext link should be displayed. I suggest (Finnish) would be simplest (using {{#language:language_code|en}} as suggested by Snævar to generate the language). isaacl (talk) 00:49, 16 February 2025 (UTC)[reply]
Either way would address the issue. As is currently, it is not clear and intuitive as to how to access the available (existing) interlanguage Wikipedia article. Note, there would be no need to invoke an interlanguage Wikipedia page if the home language (in this instance, English) page existed - and so, it follows, that the link to Wikipedia page that actually exists (in this instance, Finnish) is clearly identified.
Enquire (talk) 01:16, 16 February 2025 (UTC)[reply]
The purpose of keeping the interlanguage link small, similar in size to the ubiquitous reference numbers, is presumably to not interrupt the flow of prose when used in article text while also indicating to readers that there is something additional to the text they may want to look at. Creating a large "(Finnish)" or similar would affect readability, as well as not fixing the stated problem. The most likely way a reader would interpret anything written in the same size and formatting as normal prose is as prose, which in this case would be thinking that "(Finnish)" means that "io-tech" is a Finnish word. CMD (talk) 03:07, 16 February 2025 (UTC)[reply]
It is not really about the length, but rather about how long the reader lingers on the Finnish language code vs. the language name. It may be common for people from United States or New Zealand (apparently) to learn about language codes, but language codes are not taught in grade school or at a secondary education level where I come from. I do not think understanding language codes is something that is taught in Europe. Language codes are definitely one of the things I have learned by being on Wikipedia. As such, an non Wikipedian reader that is European would linger more on the language code, and gets interrupted by it, than he would with the language name. Snævar (talk) 09:43, 16 February 2025 (UTC)[reply]
If you want to create an interlanguage link without an en.wiki redlink, use the applicable iso code as a namespace. For example, [[:fi:io-tech|io-tech]] makes io-tech. The ill template is specifically intended to create an en.wiki redlink, which may prompt an article creation, and then to hide the interlanguage links automatically when the redlinked article is created (without articles using ill to link to the former redlink needing to be edited). CMD (talk) 03:13, 16 February 2025 (UTC)[reply]

Wikidata help

[edit]

Hello, I noticed that many of enwiki's Korea-related articles lack Hangul-script redirect, like 주체 for the transliterated title Juche. I already got Petscan to give me a list of articles in Category:Korea that transclude hangul templates https://petscan.wmcloud.org/?psid=31871180]. From this list, what would be the simplest way to get their respective Korean titles?

I imagine I would use Wikidata for this, but I only know basic python. Ca talk to me! 12:29, 15 February 2025 (UTC)[reply]

Petscan is down again, as it seems wont to be; but if what you did to get your list of pages can be done in a single local database query - some things Petscan does can't, like pulling from a pagepile or from Wikidata - I can turn that into a list of interlanguage links. I take it you looked for mainspace pages in the Category:Korea tree transcluding any of a list of templates? Which ones? What max depth? Any other constraints? Or if you made a copy of the list before Petscan died and link to them all from a user subpage, I can work from that. —Cryptic 17:48, 15 February 2025 (UTC)[reply]
...and it's back up. quarry:query/90806User:Ca/ko links. —Cryptic 03:30, 16 February 2025 (UTC)[reply]
Thank you very much! Ca talk to me! 06:57, 16 February 2025 (UTC)[reply]

Diff presentation change

[edit]
Resolved
 – User error. ―Mandruss  IMO. 09:06, 16 February 2025 (UTC)[reply]

I'm seeing a dramatic change in the presentation of diffs, hiding the wikitext code in favor of something probably closer to VE (I don't know since I've never looked at VE).

  • Did I miss discussion about this?
  • Is there a user pref that I can use to return to the old way?

Mandruss  IMO. 08:00, 16 February 2025 (UTC)[reply]

Sounds like mw:VisualEditor/Diffs. Unless you've hidden or otherwise restyled them, there should be enormous "Visual" and "Wikitext" buttons wasting your screen space towards the upper right. Click on the Wikitext one. —Cryptic 08:44, 16 February 2025 (UTC)[reply]
Lol. Stray click, I guess. What would I do without VPT? ―Mandruss  IMO. 09:06, 16 February 2025 (UTC)[reply]
I agree with wasting and this would be better as a user pref, which would prevent future occurrences of this same error, this same confusion, and this same VPT thread. But whatever, that's a discussion for a different time and a different page. ―Mandruss  IMO. 09:21, 16 February 2025 (UTC)[reply]
If you use MonoBook skin, and can wait some hours, I can dig up all the little tweaks that I have made (mainly in my user style sheets) in order to keep my diffs looking exactly the same as they did in 2009/10. I started doing this when Vector was dumped on us: some of its features occasionally spill over to MonoBook. --Redrose64 🌹 (talk) 09:44, 16 February 2025 (UTC)[reply]
I don't use Monobook, but in any case I dislike personal tweaks and prefer to remain as "vanilla" as possible. I even try to limit my use of scripts/gadgets to things that really—really—help me, like the one that converts timestamps to my local time. The simpler my environment, the less trouble, as I see it. ―Mandruss  IMO. 11:19, 16 February 2025 (UTC)[reply]
I will use both views depending on circumstance, and sometimes switching back and forth, and thus personally I appreciate having a toggle present on the diff page. isaacl (talk) 15:52, 16 February 2025 (UTC)[reply]
Not a problem. Supportable with a user pref with three options: Visual, Wikitext, or Toggle. Have it your way. ―Mandruss  IMO. 19:05, 16 February 2025 (UTC)[reply]

MediaWiki:Logentry-rights-autopromote

[edit]

The formatting of log entries at Special:Log/rights has changed to show exactly which user rights were added or removed, instead of just showing the lists of all the old groups and all the new groups following phab:T369466.

But the log entries automatically granting extended confirmed rights still follow the old format. This should perhaps be fixed by editing or deleting MediaWiki:Logentry-rights-autopromote. GTrang (talk) 23:15, 16 February 2025 (UTC)[reply]

It seems that no one has yet responded to what I asked here. So, I have now started an MfD at Wikipedia:Miscellany for deletion/MediaWiki:Logentry-rights-autopromote. GTrang (talk) 03:46, 18 February 2025 (UTC)[reply]

Formatprice template says "$1000 million"

[edit]

Hi all. Ideally there'd be a way to combine and automate the whole final inflation statement I want to see in prose, that I already had to break into three different templates. Here's where I am: approximately {{US$|474 million|long=no}} (equivalent to ${{formatprice|{{inflation|US|474000000|1993|r=3}}}} in {{Inflation-year|USD}})

If not, can someone suggest a way to correct the ${{formatprice|{{inflation|US|474000000|1993|r=3}}}} in {{Inflation-year|USD}} syntax that generates the weird output "$1000 million" upon the rendered page? It needs to say "$1 billion", lol.

Should I, at least temporarily, manually use expr and the word "billion" without violating WP:OR? Is it not OR if the numerical lead is calculated? approximately {{US$|474 million|long=no}} (equivalent to ${{formatnum:{{#expr:{{inflation|US|474000000|1993|r=3}}/1000000000 round 0}}}} billion in {{Inflation-year|USD}})

The examples above are for Crystal Pepsi where it doesn't work, and I don't know why Great Flood of 1951 does seem to work. And I wish both could be one template! ;)

Long ago, I scoured for a fix and posted an unanswered comment on the template's Talk page here. @Jonesey95: I was hoping you'd know. Thanks! — Smuckola(talk) 07:58, 17 February 2025 (UTC)[reply]

You're getting "$1000 million" because the value of {{inflation|US|474000000|1993|r=3}} is currently 999756738.079. So first {{format price}} decides that's best expressed "999.756738079 million" and then it rounds that up to "1000 million". A workaround might be to do |r=-6 to round the inflation value to millions before it's passed to {{format price}}, like {{formatprice|{{inflation|US|474000000|1993|r=-6}}}} → 1 billion. Anomie 12:25, 17 February 2025 (UTC)[reply]
@Anomie: Ok thanks a lot. Should I use -6 for all millions of dollars? Or just for output above $1 billion? And is the syntax otherwise optimal? It can't be combined into fewer templates? — Smuckola(talk) 23:15, 17 February 2025 (UTC)[reply]
To quote {{inflation}}'s docpage: It is advisable to avoid false precision; even if the start value is known to be exact, the template's result will not be because the inflation index tables are rarely accurate to more than about 1%, and a granularity of whole years is used.
In short, giving more than 2 or 3 significant digits in the output is rarely desirable. Because of how the template's written you have to change the value of the r= part based on how many decimal places are in the output value (unlike {{convert}} which has a sigfig= option). Presumably it'd be possible to add one of those to inflation as well...
It's certainly possible to write a wrapper template that just passes the arguments through to {{format price|{{inflation|...}}}}. I take it no one has done it because they didn't feel like bothering. --Slowking Man (talk) 03:11, 18 February 2025 (UTC)[reply]
What's wrong with "$1000 million"? One billion is 1000 millions (short scale, anyway). In some situations it might make more sense to talk about "1000 million", just as we sometimes say "12 hundred" instead of "one thousand two hundred". --User:Khajidha (talk) (contributions) 14:26, 18 February 2025 (UTC)[reply]
I mean there's nothing "wrong" with it in the most fundamental sense of "conveying false information". But it's not idiomatic English, and has a likelihood of confusing readers. This deviates a bit from MOS:NUMBERS. (Personally, I hate the "12 hundred" stuff as it can trip me up when reading. Just gimme the numbers, keep it simple! Eyy, I'm readin' heah!) --Slowking Man (talk) 21:39, 18 February 2025 (UTC)[reply]
Not idiomatic for who? I would tend to use "thousand million" in any situation where only a few values ranged into the billions to make the comparison to many values in the millions clearer.--User:Khajidha (talk) (contributions) 17:02, 19 February 2025 (UTC)[reply]

Problem with warning on the Jimbo Wales user page

[edit]

in the User:Jimbo_Wales page there is a warning box that doesn't show up properly if the user is in dark mode, on account of some of the text being the same color as the background. since I wasn't Sure how to fix the problem and the talk page was semi protected, I came here. is this a matter of just shifting the text or background color or is this a more complex problem with dark mode itself? (this is the warning I was referring to:)

67.20.1.4 (talk) 19:23, 17 February 2025 (UTC)[reply]

 Fixed. Someone added a custom background color without specifying the text color. – Jonesey95 (talk) 19:34, 17 February 2025 (UTC)[reply]
It was done by AnomieBOT as a result of this Tfd. Here, here and here are the ~560 pages that were affected like this. Nobody (talk) 06:44, 18 February 2025 (UTC)[reply]

Tech News: 2025-08

[edit]

MediaWiki message delivery 21:18, 17 February 2025 (UTC)[reply]

Some scripts that seem to be affected by the last item:
Extended content
--Ahecht (TALK
PAGE
)
21:52, 18 February 2025 (UTC)[reply]
More:
--Ahecht (TALK
PAGE
)
21:52, 18 February 2025 (UTC)[reply]
More:
--Ahecht (TALK
PAGE
)
21:53, 18 February 2025 (UTC)[reply]
So how do we fix it? Mine was just copied from another script, but I don't know the scripting well enough to fix the issue. Please ping me in any replies to me. ···日本穣 · 投稿 · Talk to Nihonjoe · Join WP Japan! 23:20, 18 February 2025 (UTC)[reply]
Nihonjoe,
1. remove 'mediawiki.Uri', from your mw.loader.using line
2. replace the line var uri = new mw.Uri(url); with var uri = new URL(url);
3. replace !$.isEmptyObject(uri.query) with uri.searchParams.size == 0
4. replace uri.path.slice with uri.pathname.slice
To play with this yourself, open the browser console and compare the objects that new mw.Uri('https://developer.mozilla.org/en-US/docs/Web/API/URL/URL?var=test') and new URL('https://developer.mozilla.org/en-US/docs/Web/API/URL/URL?var=test') produce.Alexis Jazz (talk or ping me) 23:54, 18 February 2025 (UTC)[reply]
@Alexis Jazz: Thanks! How does it look now? ···日本穣 · 投稿 · Talk to Nihonjoe · Join WP Japan! 00:54, 19 February 2025 (UTC)[reply]
Nihonjoe, looks like you implemented the changes as I suggested. Note that I seem to have made a mistake, it should say uri.searchParams.size > 0 instead of equals zero.
I didn't test any of it, so you should verify that the script still works as intended.Alexis Jazz (talk or ping me) 05:26, 19 February 2025 (UTC)[reply]
Okay, updated. It still seems to be highlighting as intended. ···日本穣 · 投稿 · Talk to Nihonjoe · Join WP Japan! 17:54, 19 February 2025 (UTC)[reply]
@Alexis Jazz, Nihonjoe, Pythoncoder, The Wordsmith, and TheSandDoctor: I believe #2 should be var uri = new URL(linkraw.href);, since $(linkraw).attr('href') will return the relative URL but linkraw.href will return the fully-resolved URL that URL() is expecting. --Ahecht (TALK
PAGE
)
21:05, 20 February 2025 (UTC)[reply]
Thank you very much for the instructions. As it happens, they applied perfectly to my script, which was another user highlighter fork, which was also largely a copy-paste job. It's also the motivation I need to make a more meaningful update to the script, because I've noticed some parts of it starting to break. pythoncoder (talk | contribs) 05:50, 20 February 2025 (UTC)[reply]
Thanks for the notice, Ahecht! I've fixed up my script. :) Chlod (say hi!) 03:47, 19 February 2025 (UTC)[reply]
Likewise. Saw it yesterday, just in time for the kids' vacation! ~ Amory (utc) 04:28, 19 February 2025 (UTC)[reply]
Thanks for the note. Have fixed the two of those, as well as MediaWiki:Gadget-dark-mode-toggle.js. – SD0001 (talk) 15:31, 19 February 2025 (UTC)[reply]
Thanks for the ping. I made the change here, does that look like it is now compliant? The WordsmithTalk to me 17:34, 19 February 2025 (UTC)[reply]
Thank you for the ping, Ahecht, and the notes above, Alexis Jazz. I've now updated mine for the first time since...2018! Been a while haha. --TheSandDoctor Talk 21:54, 19 February 2025 (UTC)[reply]
I haven't touched that user script in awhile. Ended up writing a bunch of unit tests before I did my refactor. Fun nerd snipe :) –Novem Linguae (talk) 22:44, 19 February 2025 (UTC)[reply]
I just fixed all three of mine. — Mr. Stradivarius ♪ talk ♪ 15:21, 20 February 2025 (UTC)[reply]

Huggle not working

[edit]
Resolved

Hello! Recently, when I log into Huggle, it appears to not be functional—that is, no pages are loading up on the queue, so I'm just stuck with the "It's empty" message. I've tried restarting my computer and deleting and re-downloading the app, but nothing seems to work. Has anyone had this problem before, and how can I fix it? Thank you! Relativity ⚡️ 00:26, 18 February 2025 (UTC)[reply]

In settings, in the system tab, try changing your provider from XML RCS to wiki. More info: Wikipedia talk:Huggle/Feedback#Nothing in queueNovem Linguae (talk) 01:09, 19 February 2025 (UTC)[reply]
@Novem Linguae: Works perfectly now. Thank you! Relativity ⚡️ 01:46, 19 February 2025 (UTC)[reply]

 You are invited to join the discussion at Wikipedia talk:Mobile communication bugs § Maintenance banner links on mobile. Sdkbtalk 05:27, 18 February 2025 (UTC)[reply]

Machine-learning based UAA reporting bot

[edit]

Hi everyone,

I’m seeking consensus to file a BRFA for testing a new ML tool that detects usernames likely to violate WP:USERNAME. Over the past week, I’ve developed a DeBERTa‑based model that assigns a risk score (0–100) to each new username detecting everything from blatant vandalism to subtle promotional names based on how likely it is to violate our policies. On the validation set, its false positive rate is under 1% (though real-world performance might be slightly different). The way the model works is very similar to how the model of an existing ML-based bot, ClueBot, functions.

You can review a demo on a sample (not every single one) from last week’s new usernames at User:MolecularBot/UsernameRisk. I’m happy to test any usernames through the model on request and answer any questions about the model or its training data.

The demo shows that while the model is multilingual (it detected German death threats and Chinese promotional names, and flagged fine usernames in another langur as low-risk), its primary strength is English. Most usernames scoring 95%+ genuinely violate our policies and should be reported to UAA. We already have a UAA reporting bot, DeltaQuadBot, which is very useful but due to its nature (regular expression) has a significantly lower accuracy (I would say the majority of usernames it reports aren't violations), so I don't see why a new bot that could pick up some additional violations that DQB misses (and is much more accurate) would be objected to adding some usernames to UAA in addition to the ones the other bot picks up, but am of course open and ready to address any concerns. A concerning amount of usernames the model would have reported are still unblocked and weren't picked up by humans or DQB, highlighting the need for this. Also I think the model is probably more accurate than the average user reporting to UAA, not just the DQB.

I propose two options:

Option 1: Use the DeBERTa model alone. Usernames with a risk ≥95% would be reported to UAA (in a new "ML bot reported" section), unless already flagged by DeltaQuadBot or a human. See the demo link above to see which usernames would have been reported to UAA in the past week.

Option 2: Implement a dual-model setup. Since my DeBERTa is a binary classifier, it doesn't tell us how "bad" a username is in terms of how severely it violates the policies, but rather just how likely it is to violate. Silly but harmless usernames like "Poop pee butt", death threats and blatantly promotional usernames are all rated the same likelihood because they are all blatantly obvious, even thought the violations are different seventies.

This is why, I developed a second model—a fine-tuned version of Gemma (Google’s open-source Gemini)—to recommend specific actions based on context. I want to be clear this isn't just giving the usernames to a generalist LLM that can make mistakes or hallucinations, the last few "layers" have been replaced and retrained to keep the contextual understanding in the upper layers of the model - important for understanding the username policies and all the context of the username but make it highly accurate and specific to username analysis (it will not work with any other LLM tasks anymore). Only usernames scoring above 90 by DeBERTa would be passed to Gemma, which can suggest one of the following:

  • File a UAA report (this is what the bot would do 100% of the time without Gemma)
  • Leave a TP warning and report to UAA if there are mainspace edits afterwards (this is mainly for promotional usernames, as this is basically what most admins do when a UAA is filed for these (warn and wait for mainspace edits), so there's no need to file a UAA right away).
  • Just leave a TP warning (used for "silly" names that are picked up by DeBERTa like "Poopoopolice" or "TurtleButt420" that aren't UAA-worthy but the user should still know)
  • Take no action (Gemma basically catches every single false positive from the other model, both models working together means that together there are incredibility low rate of false positives, almost less than 0.1% on the validation set, because both of them need to make a mistake in order for there to be one)

This dual approach would tailor our response and reduce unnecessary reports. Examples of Gemma’s recommendations based on usernames flagged by DeBERTa can be seen at User:MolecularBot/UsernameRiskCombined.

I welcome your feedback and am ready to address any questions or concerns. MolecularPilot 🧪️✈️ 01:52, 19 February 2025 (UTC)[reply]

Support option 2, as proposer. I believe option 2 is much more accurate at determining what should actually be reported to UAA. MolecularPilot 🧪️✈️ 01:54, 19 February 2025 (UTC)[reply]
Option 2 sounds good to me. The descriptions from Gemma look a bit verbose and UAA admins are likely capable of figuring out why a bad username is bad, so might want to think about making them shorter, removing them altogether, or including them as small text. – SD0001 (talk) 11:27, 19 February 2025 (UTC)[reply]
Also, I wonder if "no action" should be really be an option available to Gemma. Usernames like Zane eats toes, BOBTHEEDITORCANHEEDITITBOBTHEEDITORYESHECAN sound disruptive and are probably worthy of some action like a {{uw-username}} template, but folks more familiar with UAA can comment on this. – SD0001 (talk) 11:33, 19 February 2025 (UTC)[reply]
I've been experimenting with making them shorter for the past few days, you can see my progress at User:MolecularBot/UsernameRiskCombinedConsice (probably still a bit long imo), but thanks for the suggestion, it's definitely something I'm trying to get right! :) MolecularPilot 🧪️✈️ 21:05, 19 February 2025 (UTC)[reply]
I'm a bit concerned at the number of names. Your sample has approx 700 hundred names between scores 99-90. So maybe 100 usernames reported to UAA a day? A quick count for yesterday shows 42 names reported by humans, and 17 bot reported names. My concern is there is already a high number of names reported to UAA, that don't warrant administrator intervention, and I think this will just add to the problem. A quick scan through the names on your list shows a large number of names that purely on the name alone, do not warrant a block. --Chris 12:42, 19 February 2025 (UTC)[reply]
Hi Chris G! I'm not sure what you mean that names that would be reported to UAA from the list wouldn't warrant a block, in the model version that I'm proposing here (see User:MolecularBot/UsernameRiskCombined) I'd say almost every name in the "UAA report" section would warrant a hard indef, are there any you disagree with? MolecularPilot 🧪️✈️ 21:33, 19 February 2025 (UTC)[reply]
And there's certainly not 700, unless you are referring to the option 1 model (User:MolecularBot/UsernameRisk), where the proposal was only for 95%+ not 90% and I would say the majority of usernames in that section violate in some way (but are not all bad enough for UAA). Option 1 was only provided in case people were against the idea of a fine-tuned LLM sorting usernames, the option 2 model combination (linked above) performs much better and only reports very few, severe violations (some of which were actually missed by humans and the existing regex bot. MolecularPilot 🧪️✈️ 21:47, 19 February 2025 (UTC)[reply]
As a general note, WP:VPT is a good place for sorting out technical questions. This sounds more like a question for specifically WT:UAA and/or WP:VPPRO. Izno (talk) 20:11, 19 February 2025 (UTC)[reply]
Noted, I'll use VPPro or a more specific talk page next time, I assumed a bot was "technical"! :) MolecularPilot 🧪️✈️ 22:56, 19 February 2025 (UTC)[reply]
@MolecularPilot In general, leaving a TP note AND reporting to UAA is considered bad form. Either it's blatant, in which case the documentation of {{uw-username}} says the template shouldn't be used and it and should be reported directly to UAA, or it's not blatant and you should leave a note and only report to UAA if they edit again without addressing the username issue. --Ahecht (TALK
PAGE
)
22:35, 19 February 2025 (UTC)[reply]
Hi Ahecht! What you said last is exactly what it does ("you should leave a note and only report to UAA if they edit again without addressing the username issue"), it never leaves a note than then immediately reports to UAA it will only:
  • immediate UAA, no note, or
  • leave a note, and if the user edits mainspace after the note report to UAA (this is what you said, and it's an option it has)
  • just a note
depending on the severity. MolecularPilot 🧪️✈️ 22:47, 19 February 2025 (UTC)[reply]

Discover which anchor is being used.

[edit]

Is there a way to discover if a visible anchor e.g {{va|Commodity – Part 1|Commodity}} is actually being used in any other article to link to the article with the anchor? The reason for asking is that List of Silent Witness episodes has a visible anchor for almost every episode title (there's 258 of them) and I don't think any of the anchors are actually being used. I've checked 12 random articles that link to it and all of them use the episode number anchor that is a function of the Episode table template e.g List of Silent Witness episodes#ep67. Or is it going to be a case of checking each article that links to it? - X201 (talk) 08:55, 19 February 2025 (UTC)[reply]

X201, it's also possible that external sites link to the anchor. — Qwerfjkltalk 09:33, 19 February 2025 (UTC)[reply]
@X201Manually checking all the source links (see user gadget User:PrimeHunter/Source links.js
) will omit transclusions via a template and is a practical way to check each wiki-coded instance.
Here is an absolute url example where you can replace Tesla and unions § United States with whatever sectioned example you want.
As others said, it could be externally linked (but that's not going to be reliable anyways. It will also match anchor templates like {{Section link}}, {{See also}}, {{Main}} which can all link to a section. ~ 🦝 Shushugah (he/him • talk) 20:08, 19 February 2025 (UTC)[reply]
@Shushugah: Thanks for that. Both options give me the answers I was looking for. - X201 (talk) 08:31, 20 February 2025 (UTC)[reply]

Wrong info in infobox, no way to override it

[edit]

See Template talk:Infobox Belgium municipality#Local parameter doesn't work, template gives incorrect province. Basically, Zwijndrecht, Belgium recently switched from one province to another, but the infobox "province" info is based on an official number ("niscode") which didn't change (the "subdivision_name3" in the template code), and the manual overrides suggested at the infobox doc don't work. Only solutions I can think of is to remove the infobox completely, which seems like overkill, or to add a fake niscode, which replaces one bit of wrong info with another. Completely removing the niscode from the infobox makes it even worse. It would be appreciated if someone could make the manual override value actually work. Fram (talk) 15:47, 19 February 2025 (UTC)[reply]

 Done, let me know if you see any issues with the change, Fram. Writ Keeper  16:36, 19 February 2025 (UTC)[reply]
Thanks, looks good! Fram (talk) 16:43, 19 February 2025 (UTC)[reply]
Fwiw, I updated the template documentation to reflect the actual operation of those parameters. region and community both also work like province used to; that is, only used if the NIS was absent. Manual overrides could be implemented for those in the same way as with province, but I decided not to do that unless there's a need, to avoid possible disruption elsewhere. But at least now the template docs aren't misleading. Writ Keeper  16:54, 19 February 2025 (UTC)[reply]

Hiding HTML element inside a specific page

[edit]

Is there a way to hide an HTML element appearing on Event:Sandbox, using inline css/js or another way? I do not want users with the eventcoordinator permission to accidentally register the event, simply because the page is prefixed with Event:

The html div that should be hidden contains css class .ext-campaignevents-eventpage-enableheader ~ 🦝 Shushugah (he/him • talk) 19:13, 19 February 2025 (UTC)[reply]

I looked at the code and it turns out only the author sees that so there's no need to do anything. * Pppery * it has begun... 20:27, 19 February 2025 (UTC)[reply]
@Pppery that makes this request moot (though I am still curious how it could be achieved). This would also make collaboration with different parties more challenging, e.g someone preparing a page creation, another person registering it. I am curious about page-swapping etc... now but these are edge-cases... ~ 🦝 Shushugah (he/him • talk) 21:01, 19 February 2025 (UTC)[reply]
Probably the least unreasonable way to achieve this would be a CSS-only hidden template gadget. By design nobody other than interface admins can add custom styling for things outside .mw-parser-output, which this isn't. Or (in an alternate universe where that check didn't exist), someone could file a request on Phabricator asking for a __NOEVENT__ magic word to solve the problem at the root. * Pppery * it has begun... 21:03, 19 February 2025 (UTC)[reply]
CSS provides two properties which may be used to hide content. They are the display property and the visibility: property. They accept different values, and have different effects. For example, if an element is subject to the declaration display:none, it is physically removed from the rendered page - preceding and succeeding elements are presented adjacent to one another. But when an element is subject to the declaration visibility:hidden, it is replaced with blank space. Examples: The text following this has display:none. →This text has display:none.← The text preceding this has display:none. The text following this has visibility:hidden. →This text has visibility:hidden.← The text preceding this has visibility:hidden. --Redrose64 🌹 (talk) 22:08, 19 February 2025 (UTC)[reply]
@Redrose64 this is a good solution when the html wikitext is directly inline and I can create inline styling, but in this case the HTML is injected elsehow. ~ 🦝 Shushugah (he/him • talk) 22:23, 20 February 2025 (UTC)[reply]

Updating SVG art for dark theme support?

[edit]

Is there a style guide for images and artwork, particularly how we're handling the transition to supporting both dark and light themes? A lot of articles have SVG artwork that's black-on-transparent and thus invisible on the dark theme. And I was going to ask how to fix this, perhaps there's a way to make SVGs the same color as the text, or maybe resort to giving these SVGs a white canvas. idk.

And are there any automated tools for this job, or is this something that we'd have to pick through manually? It sounds tricky, because obviously not all SVGs need fixed. Some SVGs do adapt to dark/light themes, matching the text color. Some don't. How could you automatically detect this?

Examples: Elder Futhark#Rune names, Runes#Younger Futhark (9th to 11th centuries) NomadicVoxel (talk) 19:02, 20 February 2025 (UTC)[reply]

@NomadicVoxel See Help:Pictures#Dark mode. --Ahecht (TALK
PAGE
)
19:57, 20 February 2025 (UTC)[reply]

Add my user name to a previous edit

[edit]

I made some edits today to the "Ultraconservatism" page. I did not have a user name, but after I published the edit I registered. Can my user name be added to the edits I made? Don Friedmann (talk) 19:15, 20 February 2025 (UTC)[reply]

No, this can't be done. Sjoerd de Bruin (talk) 19:19, 20 February 2025 (UTC)[reply]

How many stubs are there?

[edit]

Wikipedia:Content_assessment#Statistics has a handy list of articles by assessment, but the total number of articles differs from the official count at Special:Statistics. Folks on Discord suggested this is because the "???" column includes redirects. A couple questions, then: (1) How can we exclude redirects from that sort of calculation? (2) are there really that few redirects? — Rhododendrites talk \\ 20:06, 20 February 2025 (UTC)[reply]

@Rhododendrites articles without a corresponding talk page wouldn't appear in Wikipedia:Content_assessment ~ 🦝 Shushugah (he/him • talk) 22:25, 20 February 2025 (UTC)[reply]
Right, and neither would talk pages without a WikiProject banner. But the total at Wikipedia:Content assessment#Statistics is around 1.2 million larger than "Content pages" (mainspace pages excluding redirects) at Special:Statistics. There are far more redirects than that but many of them have no talk page or it has no WikiProject banner. Maybe talk pages of redirects are included in Wikipedia:Content assessment#Statistics if they have a WikiProject banner. It depends how the bot is coded. PrimeHunter (talk) 22:49, 20 February 2025 (UTC)[reply]