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.

Extra letter "R" between C and D in category listing

[edit]

See Category:All portals. The list first shows portals starting with 0-9, then starting with A, B, C (including things not starting with C, but with a sortkey starting with a C), then continues through the alphabet with R, D, E, ..., P, Q, R, S, ... What is this extra letter "R" between C and D?

The issue was reported by User:JoeNMLC at Wikipedia_talk:WikiProject_Portals#Curious_about_"Portal_category_list" but this looks like it could use some wider attention. —Kusma (talk) 11:00, 26 November 2024 (UTC)[reply]

Fixed with forcing update of the category member by removing/readding to the category. — xaosflux Talk 11:33, 26 November 2024 (UTC)[reply]
Thanks! So it was some kind of database hiccup? —Kusma (talk) 11:58, 26 November 2024 (UTC)[reply]
It looks like a hiccup or MediaWiki bug I haven't seen before. The Internet Archive shows [1] the issue 19 September with an R heading between the C and D headings. Special:ExpandTemplates shows Portal:Reformed Christianity just adds a normal [[Category:All portals]] with no sortkey and no DEFAULTSORT. It's added by a template but even if the template had different code at the time, it should not be possible to create an R heading between C and D on a category page. The Internet Archive shows a normal Latin letter R and not some special Unicode character. PrimeHunter (talk) 12:11, 26 November 2024 (UTC)[reply]
Here is HTML source from the Internet Archive:
<li><a href="/web/20240919122212/https://en.wikipedia.org/wiki/Portal:Czech_Republic" title="Portal:Czech Republic">Portal:Czech Republic</a></li></ul></div><div class="mw-category-group"><h3>R</h3>
<ul><li><a href="/web/20240919122212/https://en.wikipedia.org/wiki/Portal:Reformed_Christianity" title="Portal:Reformed Christianity">Portal:Reformed Christianity</a></li></ul></div><div class="mw-category-group"><h3>D</h3>
<ul><li><a href="/web/20240919122212/https://en.wikipedia.org/wiki/Portal:Delaware" title="Portal:Delaware">Portal:Delaware</a></li>
It looks as you would expect if R was actually a letter betwen C and D and there was only one portal starting with R. The category collation system determining how to sort characters is sometimes changed and can be set differently for different wikis. Maybe this page was cached in the middle of a change or accidental setting. PrimeHunter (talk) 12:23, 26 November 2024 (UTC)[reply]
 Done - Thank you! JoeNMLC (talk) 17:01, 29 November 2024 (UTC)[reply]

Standard parameter name for Wikidata IDs

[edit]

Some time ago, we standardised large numbers of templates so that they all used the same parameter names for the same thing; for example |birth_date= instead of |birth-date=, |birthdate=, |birth=, |dob=, etc.

I now find that we have a number of parameter names for a Wikidata item about a subject, for example:

This causes confusion for editors who use more than one of these templates, on a regular or occasional basis.

I propose that we standardise these to |qid=, while keeping existing names as aliases for backwards compatibility. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 15:44, 26 November 2024 (UTC)[reply]

We also standardized on |coordinates= in infoboxes a few years ago, which was a nice improvement. |qid= makes the most sense to me for this purpose. I get 227 hits in template space for {qid|, only 10 hits for {WD|, and 66 hits for {from| (most of which are not Wikidata-related). – Jonesey95 (talk) 17:08, 26 November 2024 (UTC)[reply]

Why solidpixels.com is blocked?

[edit]

If adding references to websites, which were created by solidpixels.com, Citoid adds to the reference also solidpixels URL and ends up with the following message "This site is blocked". Why that website is blocked, and is it at Wikimedia blacklist or Zotero black list? The reference links to try are:

  • https://www.dox.cz/program/daniel-pesta-determination
  • https://www.resite.org/speakers/mirik-milan
  • https://www.visitbanat.com/srbsko

Note:

  • If I tried to add here an external url as an example, there was this error message: "People at this wiki decided to block links to this site. Please try another link"
  • If I add here the above links as plain links I got the following error: "Your edit was not saved because it contains a new external link to a site registered on Wikipedia's blacklist or Wikimedia's global blacklist." But nor dox.cz neither solidpixels.cz are listed on those black lists

Juandev (talk) 14:54, 27 November 2024 (UTC)[reply]

@Juandev: Links to dox.cz are blocked by \bdox\.\w{2,5}\ at meta:Spam blacklist. The other links are allowed. The HTML source of https://www.dox.cz/program/daniel-pesta-determination says <meta name="author" content="solidpixels., https://www.solidpixels.com" />. That's why Citoid places https://www.solidpixels.com in an author parameter. It's not the cause of the block. https://www.solidpixels.com is allowed. PrimeHunter (talk) 17:08, 27 November 2024 (UTC)[reply]
thx. Juandev (talk) 18:59, 27 November 2024 (UTC)[reply]

Questions about dark mode

[edit]

I have two questions about dark mode:

  • I seem to remember that when dark mode was initially made generally available to logged-in users, there was a link to give feedback and report problematic visuals. Is that link still alive somewhere?
  • Some pages have images that are inverted when using dark mode. For instance, the infobox image on Canadian Aboriginal syllabics is inverted. Other images on that page are not. What causes the infobox image to be inverted and not the others? I couldn’t find a tag in the template arguments or the Commons page.

Anselm Schüler (talk) 23:57, 27 November 2024 (UTC)[reply]

Anselm Schüler. I see one problem with the infobox on this version of Canadian Aboriginal syllabics. From Help:Table: Avoid using background: none or background: transparent. See:
mw:Recommendations for night mode compatibility on Wikimedia wikis#Avoid using background: none or background: transparent
There is more info at Help:Table#Colors in tables and the subsections that follow.
I only know a little about this stuff. I don't know what is going on with the PNG image in the infobox. Transparency?
I see background: transparent in several places in the infobox. --Timeshifter (talk) 07:12, 28 November 2024 (UTC)[reply]
Images that are inverted use the "skin-invert" class and that does apply to your example. They are typically only used if we know that the image will work inverted. Inverting all diagrams, for example, would be a bad idea. Most monochrome diagrams, like signatures, will work inverted. Snævar (talk) 10:28, 28 November 2024 (UTC)[reply]
Where is the skin-invert class applied? In the template invocation? The template definition? The image page? Anselm Schüler (talk) 10:49, 28 November 2024 (UTC)[reply]
Skin-invert is in the template Template:Infobox_writing_system, line 33. That also explains why the other images do not have one, since it is less work to addd it to a template than image syntax on one page. Snævar (talk) 13:42, 28 November 2024 (UTC)[reply]

Incorrect diff description when edits in between are suppressed or revision deleted

[edit]

I know I should just make an account to report stuff, but instead I just want to ask, is this bug something anyone would even care about fixing?:

  • On Special:Diff/1258722312/1258757481 it says the obviously wrong message One intermediate revision by 22 users not shown
  • If I don't include the one revision that is not suppressed in between, then it just says nothing, even though there are 37 (I think?) revisions in between.

I chose a suppressed one as the example, but it happens with revdels too, though maybe not if you are an admin. – 2804:F1...6D:D079 (::/32) (talk) 00:53, 29 November 2024 (UTC)[reply]

I doubt any devs are going to get to work on that one right away, but sure go file a WP:BUG if you'd like. Problem statement seems to be that when there are deleted versions, inaccurate counts are passed to diff-multi-otherusers. — xaosflux Talk 02:32, 29 November 2024 (UTC)[reply]
It's an interesting bug. If you look at this range of edits in the page history: [2] you can see more clearly that only the content of the revisions has been hidden, but not their authors. We might be querying the data for this message slightly incorrectly. As a dev, I'd be curious enough to look into why this happens, even if it turns out to be too complicated for a quick fix. Also, I found a Phabricator report that sounds quite similar to this problem: T277920. Matma Rex talk 08:09, 29 November 2024 (UTC)[reply]
I figured out why it happens: T277920#10368811 but it is indeed a bit tricky to fix, and it will probably stay unfixed for now, unless someone volunteers to implement it. Matma Rex talk 22:55, 29 November 2024 (UTC)[reply]

 You are invited to join the discussion at Wikipedia talk:Reliable sources/Perennial sources § Amendments needed to the transclusion splitting plan. Not sure who to notify, but I'm not confident in putting another merge banner onto the page, and this does involve technical. Aaron Liu (talk) 02:15, 29 November 2024 (UTC)[reply]

Max lag on Enwiki API requests

[edit]

This is happening again ("13926.578336 seconds lagged"). Previously reported Wikipedia:Village_pump_(technical)/Archive_216#Server_lag responded by User:Taavi. Same problem with a broken replica? -- GreenC 05:11, 29 November 2024 (UTC)[reply]

Works for me. * Pppery * it has begun... 05:34, 29 November 2024 (UTC)[reply]
Still an issue? Taavi (talk!) 06:27, 29 November 2024 (UTC)[reply]
It appears to happen intermittently almost every week nowadays. – SD0001 (talk) 13:43, 29 November 2024 (UTC)[reply]
[edit]

For me it's normally a + sign. Doug Weller talk 14:00, 29 November 2024 (UTC)[reply]

It is working fine for me atleast The AP (talk) 15:53, 29 November 2024 (UTC)[reply]

After Login, goes to WP home page

[edit]

Greetings, Recently I noticed that after 1. Log out; 2. Log In; 3. Browser now goes to Wikipedia home page instead of previously "remembered" page. Usually it was my Watchlist. Not a major concern, just curious of this change. Regards, JoeNMLC (talk) 17:06, 29 November 2024 (UTC)[reply]

This is likely unintentional change. Reported at phab:T381216. – Ammarpad (talk) 09:34, 1 December 2024 (UTC)[reply]

Wikipedia:Contents/Outlines

[edit]

Can anyone work out why Wikipedia:Contents/Outlines has so much white text on a light green background, to the extent that the text is virtually invisible. Nthep (talk) 15:05, 30 November 2024 (UTC)[reply]

Pinging @TheDJ:, is this in any way related to your changes to Wikipedia:Contents/styles.css and dark mode? Nthep (talk) 15:10, 30 November 2024 (UTC)[reply]
That change would have caused it, yes. Headers particularly have some opinionated CSS that you have to take some effort to override. It's not hard to fix, I will look at it in the morning in TheDJ doesn't beat me to it. Izno (talk) 06:40, 1 December 2024 (UTC)[reply]
This should be fixed ish now. Izno (talk) 19:11, 1 December 2024 (UTC)[reply]
Thanks. Nthep (talk) 19:24, 1 December 2024 (UTC)[reply]

Wikispecies Template/ Module assistance needed

[edit]

On Wikispecies, we are told (at species:Wikispecies:Village Pump#Switching to the Vector 2022 skin: the final date):

Module:Authority control uses the deprecated toccolours class. A navbox class with some styling should be used instead. This is how they did it on English Wikipedia. For more context: phab:T314254.

Wikispecies is a small project; can someone assist there, please? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 16:00, 30 November 2024 (UTC)[reply]

Wikipedia:Village pump (technical)/Archive 202#class="toccolours" does not render formatting in Vector 2022 suggests that the magic incantation is "Pinging @Izno and TheDJ". WhatamIdoing (talk) 23:32, 30 November 2024 (UTC)[reply]
I can look at it in the morning. The good news is that there aren't many uses if you exclude user and user talk pages. (And still not that many even including those.) In most cases the easiest solution is to swap to wikitable, but that may not be appropriate for all pages. Izno (talk) 06:45, 1 December 2024 (UTC)[reply]
I've cleaned out the remaining uses of necessary toccolours on Wikispecies. You may review my edits there at your leisure. Izno (talk) 05:26, 2 December 2024 (UTC)[reply]
Seems to be working well. Thank you. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 14:30, 2 December 2024 (UTC)[reply]
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 14:55, 2 December 2024 (UTC)[reply]

Faulty interwiki formula

[edit]

ProofWiki has altered its URL structure (dropping the 'www') without preserving a redirect such that the current interwiki format (e.g., proofwiki:Definition:Set) doesn't work. Can this be changed from Wikipedia, or should I go to phab:? Tule-hog (talk) 21:59, 30 November 2024 (UTC)[reply]

@Tule-hog These are defined at Meta:Interwiki map, updates can be requested on the talk page. 86.23.109.101 (talk) 22:40, 30 November 2024 (UTC)[reply]

Simple math in template

[edit]

This change throws an ugly red error message in the template's page, but it works when the template is actually used. I assume that there is something obvious and simple that I've missed, and I would appreciate diffs to the fixes or other advice.

Secondly, what I'd like to accomplish is a bit more ambitious. I'm open to being told to give it up. But where we have this now:

Village pump
Revenue (2023)
12345
Expenses (2023)13399 (108.5% of revenue in 2023)

I'd like it to be able to handle currency formatting ("$12,345"). This might require a bot/AWB run to convert all of the manually written |revenue $12.3 million to |revenue=12300000 |currency=$ |revenue-note=<ref>source goes here</ref>, which will then be displayed as $12.3 million[1] to the reader.

I want to highlight overspending in red ("108.5% of revenue" or "8.5% excess") and underspending in green. The usual rule of thumb in non-profit land is that spending 90% of revenue is ideal, and that both overspending and significant underspending are bad. So perhaps <80% is amber or (uncolored), 80–100% is green, and >101% is red.

I also want to introduce a third field, "Reserves" with an Operating reserve ratio calculated from the existing Expenses field. This would highlight <6 months in red, 6–12 months in amber, 12–24 months in green, and >24 in purple. (These are the generally recommended ranges for most non-profit organizations. To put this in context, private colleges with an operating reserve ratio of less than 12 months are at risk of joining the growing list in Category:Defunct universities and colleges in the United States, and if it's <6 months, that could happen soon and with no warning.)

What do you think? WhatamIdoing (talk) 23:21, 30 November 2024 (UTC)[reply]

I fixed the first issue (including issues you didn't know).[3] PrimeHunter (talk) 00:00, 1 December 2024 (UTC)[reply]
Thank you! WhatamIdoing (talk) 00:45, 1 December 2024 (UTC)[reply]
Either a module or an AWB run will be required for what you want, yes. The AWB run will be easier probably. I thought we had a template that handles currency already though? (Or perhaps we don't and that's what has caused so much grief with {{formatnum:}}). Izno (talk) 06:49, 1 December 2024 (UTC)[reply]
I don't know if we have something that already handles it. WhatamIdoing (talk) 06:38, 2 December 2024 (UTC)[reply]
@WhatamIdoing {{Currency}} or {{Format price}}? The currency template converts values written in words to comma or space separated numbers, format price converts numerical inputs to words. 86.23.109.101 (talk) 11:48, 2 December 2024 (UTC)[reply]

Rangeblock tool

[edit]

Hello. Following this Teahouse thread in which it was revealed Fastily's departure from the project also resulted in the shutdown of their Toolforge services (thus causing a bit of confusion), DreamRimmer has created this tool that supersedes Fastily's tool over (seems close enough). However, Mediawiki:Blocklogtext still has the link to Fastily's now-defunct tool instead, which could cause some aforementioned confusion when some people wish to calculate rangeblocks. Therefore, I recommend changing [[:toolforge:ip-range-calc]] to [[:toolforge:galaxybots/iprangecalculator]] on the aforementioned interface page. Thanks.3PPYB6 (T / C / L)06:26, 1 December 2024 (UTC)[reply]

You can use {{edit protected}} on the talk page in the future. Izno (talk) 06:30, 1 December 2024 (UTC)[reply]
@Izno – I do realize that, and I've done that before, but the Editnotice explicitly stated that requests could be brought here because the MediaWiki talk namespace is generally not monitored very actively. Thank you so much for answering this quickly though!3PPYB6 (T / C / L)06:33, 1 December 2024 (UTC)[reply]
Yeah, I think that edit notice is more about talk page posting in general rather than specific edit requests; simple/straightforward requests are taken care of pretty quickly from tracking on User:AnomieBOT/PERTable et al. Izno (talk) 06:35, 1 December 2024 (UTC)[reply]

I cannot work out what it is about this edit [4] that causes all references to display the error "Lua error in Module:Citation/CS1/Configuration at line 2083: attempt to index a boolean value.". Shhhnotsoloud (talk) 16:56, 1 December 2024 (UTC)[reply]

I can't reproduce the error now. It seems to be a known bug that occasionally something goes wrong in CS1 rendering and that happens. * Pppery * it has begun... 17:30, 1 December 2024 (UTC)[reply]
@Pppery There was a previous discussion about this here: [5]. As best I can tell the issue is that mw.ext.data.get() has an undocumented "feature" in that it can sometimes return false instead of returning the data table? 86.23.109.101 (talk) 18:22, 1 December 2024 (UTC)[reply]
This is in the process of being fixed, see Help talk:Citation Style 1#spurious errors when fetching identifier limit data from commons. -- LCU ActivelyDisinterested «@» °∆t° 20:01, 2 December 2024 (UTC)[reply]
[edit]

This is crazy one. The category tree for Category:Introductions by year causes a hatnote to appear on the category page with text along the lines of:

This category is for introductions in the year XXXX.

The problem is that introductions links to a disambiguation page. Through arduous layers of substitution, I have isolated the problematic string to:

This [[Help:Categories|category]] is for {{#invoke:ustring|gsub|\{{#if:1|'''[[{{#invoke:String|replace|{{PAGENAME}}|^%d%d%d%d (%a.-)$|%1|1|false}}]]''' in the '''year XXXX'''}}|%.$|}}.

Apparently, this causes the invoked string to link to the category name minus the year (so Category:1649 introductions gets reduced in the string to introductions). I have no idea how to solve this so that rather than linking to the disambiguation page, it links to a relevant meaning of "introduction". Which meaning that would be is a separate question; for now my concern is how does the linked term become editable at all. Cheers! BD2412 T 20:50, 1 December 2024 (UTC)[reply]

Which meaning that would be is a separate question probably the main question. If you know which link it should go to, Category:Introductions can be moved per WP:C2D as will its sub-categories, which will cause the template to work correctly. Gonnym (talk) 20:56, 1 December 2024 (UTC)[reply]
On further review, the category itself may indeed be somewhat problematic, as it appears to mix different kinds of introductions (of products, of ideas, of logos). Alternatively, perhaps it makes sense to create a WP:Broad concept article generally covering the concept of introduction itself. BD2412 T 21:31, 1 December 2024 (UTC)[reply]
Okay, forget the technical solution, I have started Draft:Introduction, and will work on that this week. BD2412 T 21:43, 1 December 2024 (UTC)[reply]
If it seems hard to adapt a template to give a wanted output in a special case then a possible but not ideal alternative is to just change the output at the call with {{replace}}. In this case, {{YYYY introductions category header}} could for example change {{YYYY foos category header|beginnings}} to {{replace|{{YYYY foos category header|beginnings}}|'''[[introductions]]'''|introductions}}, if there is no suitable link target and we don't want a link at all. The replacement may fail later if a change means that the exact output no longer says '''[[introductions]]'''. PrimeHunter (talk) 23:03, 1 December 2024 (UTC)[reply]

Some issues in dark 2022 theme

[edit]

Hi. I have been read this page Frank Grillo and see there yellow-white is including in template's background. Please fix it in dark theme. VollyM (talk) 23:00, 1 December 2024 (UTC)[reply]

Template:Pending is the culprit, it does not support dark theme. Also see Template:Partial/styles.css. Snævar (talk) 01:01, 2 December 2024 (UTC)[reply]
{{Pending}} is working fine for me in dark mode; I see black text on a yellow background in the cell containing "Hard Matter". Please be more specific about the problem description, and maybe post a screen shot. – Jonesey95 (talk) 01:46, 2 December 2024 (UTC)[reply]
I see blue text on a black background for "Hard Matter", in both Vector2010 and Vector2022. Odd. CMD (talk) 02:38, 2 December 2024 (UTC)[reply]
@Jonesey95 black text on yellow background in dark theme.
https://imgur.com/a/oVpwbmR VollyM (talk) 10:10, 2 December 2024 (UTC)[reply]
I see the same black on yellow that shows in VollyM's screen shot. It looks fine. As for Chipmunkdavis's blue on black, please make sure that you are logged out when you check on the colors. If you are still seeing blue on black, let us know what browser you are using. – Jonesey95 (talk) 13:53, 2 December 2024 (UTC)[reply]
How do I use dark theme when logged out? CMD (talk) 14:22, 2 December 2024 (UTC)[reply]
For me, there is a sidebar on the right side with radio buttons under the header "Color (beta)". If you don't see it, look under the confusing "glasses" icon at the upper right, next to the "Donate" link. For me, an easy way to check how things look when I am not logged in is to open a different web browser (Safari, Brave, Chrome, etc.) than I usually use for editing. – Jonesey95 (talk) 16:18, 2 December 2024 (UTC)[reply]
@Chipmunkdavis: Some browsers provide a "private browsing" feature, or similar. In Firefox, right-click a link and select "Open Link in New Private Window". It opens a new instance of the browser and loads the page reached through the right-clicked link, but does not send any cookies. The effect of this is that if the right-clicked link is a Wikimedia page, it's loaded exactly as for a logged-out user - Vector 2022 and all that bother. Important: if you intend to use the "Restore Previous Session" feature when opening Firefox at the start of the next day's netsurfing, make sure that you close the new private window before closing the main window, otherwise, the next time you open Firefox, and use the "Restore Previous Session" feature, it'll restore that private window and not the main one. --Redrose64 🌹 (talk) 20:53, 2 December 2024 (UTC)[reply]

This script I created seems to be drifting more and more and not working on newer formats of XfD pages, and I don't seem to be using it as much, so I want to know if someone might be up for forking the (six) scripts and making it better. It might need a complete rewrite. Thanks. Awesome Aasim 19:05, 2 December 2024 (UTC)[reply]