Jump to content

Commons:Village pump/Technical

From Wikimedia Commons, the free media repository

Shortcuts: COM:VP/T • COM:VPT

Welcome to the Village pump technical section
Technical discussion
Village pump/Technical
 Bug reports
 Code review
Tools
 Tools/Directory
 Idea Lab



This page is used for technical questions relating to the tools, gadgets, or other technical issues about Commons; it is distinguished from the main Village pump, which handles community-wide discussion of all kinds. The page may also be used to advertise significant discussions taking place elsewhere, such as on the talk page of a Commons policy. Recent sections with no replies for 30 days and sections tagged with {{Section resolved|1=--~~~~}} may be archived; for old discussions, see the archives; recent archives: /Archive/2025/03 /Archive/2025/04.

Please note
 
SpBot archives all sections tagged with {{Section resolved|1=~~~~}} after 1 day and sections whose most recent comment is older than 30 days.

Mutinous robots mark images for deletion, even when properly licensed

[edit]

When uploading images with flickr2commons, somewhere along the process, a robot tags images that had a license of public domain mark for deletion EVEN WHEN THE IMAGE DESCRIPTION HAS HAD A VALID LICENSE ADDED TO IT!!!! Today's examples: a b c d e f g h i j k l m n o

I told flickr2commons to add the {{PD-USGov-State}} template to each of these images. It did add that perfectly valid and appropriate tag. Nevertheless these images were tagged for deletion by an out of control robot.

Yes, I could go to each of those images, and remove the improperly placed deletion tags.

But robots are supposed to be our slaves. They are supposed to serve us, not vice versa. I shouldn't be cleaning up after mutinous robots.

  1. It should be trivial to make the robot check the information template for a valid license, before it calls for deletion under a claim the image is unlicensed.
  2. But, really, it is long past the time we maintained a whitelist, of flickr contributors known to mistakenly tag images with a public domain mark.
    1. That whitelist should include all flickr IDs that are maintained by employees of the US Federal government. When they are uploading images taken by US Federal employees we KNOW those images are unambiguously in the public domain.
    2. There are many flickr contributors who are excellent prolific photographers, who generously want to put their fine photos in the public domain, who routinely mark their photos with the public domain mark.

We maintain a blacklist, a list of flickr contributors known to have unreliably tried to license images with free licenses, when they didn't own the IP rights to those images. If we can maintain that blacklist we can maintain a whitelist of flickr contributors whose public domain Marks should be recognized as stating the image is in the public domain. Cheers! Geo Swan (talk) 06:33, 17 February 2025 (UTC)[reply]

Your license template looks to be in the wrong parameter, it should probably be inside Permission instead of Description for the bot to recognize it. Sjoerd de Bruin (talk) 08:31, 17 February 2025 (UTC)[reply]
  • Nice guess @Sjoerddebruin. That's not it. I don't know how often I have encountered these mutinous robots. At least thousands of times. Trust me, the location of the valid permission is irrelevant. It is always ignored.
    IMO, a well-behaved robot would recognize file description that contain a valid license, no matter where the license was placed.
    I am going to repeat... WHITELIST... We need a whitelist, of flickr-ids, known to routinely use the public domain mark for images where there is no doubt the image is in public domain.
  1. Lots of smart flickr photographers always use public domain mark for images they took themselves.
  2. Hundreds, maybe thousands, or flickr-ids are managed by some junior GI, or other government employee, who only upload images that are taken by other Federal government employee, who, nevertheless, use the public domain mark, even though there is zero doubt that the images taken by their colleagues are in the public domain. Geo Swan (talk) 15:06, 12 March 2025 (UTC)[reply]
  • @AntiCompositeNumber -- Magnus? That name rings a bell. Congratutions on knowing who you think is responsible for this bug. Commons has [[User:Magnus sine Cognomen]], [[User:Magnus 0038]], [[User:Magnus242]], [[User:MagnusA]] and [[User:Magnus Manske]]. Is one of these the Magnus you think is responsible? Geo Swan (talk) 01:10, 15 March 2025 (UTC)[reply]
Update

The administrator who deleted the properly licensed images in my example did restore them. They also left a broad hint that I should then clean up after the mutinous robot. Cleaning up after it erodes their utility as examples. But I started this section three weeks ago, so I guess it has probably received most of the attention it is going to receive. So, for the record, those examples look okay, now. But, if you look at their revision history, that is because I cleaned up after the mutinous robot, myself.

For the record, I continue to think robots should serve us, and not vice versa. Geo Swan (talk) 01:19, 15 March 2025 (UTC)[reply]

@Magnus Manske is the one listed at Commons:Flickr2Commons. Commander Keane (talk) 03:15, 15 March 2025 (UTC)[reply]

Blocking error in VisualFileChange

[edit]

Hello,

I just wanted to use the VisualFileChange to open a mass DR. The gadget got stuck, see the screenshot. That's due to a protected talkpage (of the deceased VSchagow) and that the gadget's programming is not able to carry on beyond notifying the uploaders to the task of adding the nomination subpage to the daily list. As a solution, I'd suggest (if possible) to put the DR listing above the uploader information task. In my case, I added the DR manually, but that's not a satisfying workaround. Was this place here suitable for the bug report or should it get transferred somewhere else? Regards, Grand-Duc (talk) 20:24, 8 March 2025 (UTC)[reply]

+1 support for good idea about better job order. should also time out and skip automatically. RoyZuo (talk) 23:26, 20 March 2025 (UTC)[reply]
MediaWiki:Gadget-VisualFileChange.js/core.js is a lot of code so you might need to either find someone to maintain it or diy. RoyZuo (talk) 23:27, 20 March 2025 (UTC)[reply]

Tool to calculate total file sizes

[edit]

Hi!

Is there a tool that calculates the cumulative amount of file sizes within a category?

Thanks :) --PantheraLeo1359531 😺 (talk) 16:56, 13 March 2025 (UTC)[reply]

Would be best if it also allowed seeing the largest files in the category. Maybe one could use a query with deepcategory (relevant question here). Prototyperspective (talk) 00:30, 14 March 2025 (UTC)[reply]
What would be the goal that had to be achieved with that information ? —TheDJ (talkcontribs) 11:16, 15 March 2025 (UTC)[reply]
For the file sizes:
– It allows to analyse cats if they have files that may be too large to use and can get a smaller file version. It can be analyzed, how the values have changed and, for example, if datasets by (e.g.) US governments have been copied (sometimes, the number of files isn't a good indicator). --PantheraLeo1359531 😺 (talk) 10:33, 17 March 2025 (UTC)[reply]
@PantheraLeo1359531 try User:RoyZuo/FilesizeSum.js? :) RoyZuo (talk) 12:33, 4 April 2025 (UTC)[reply]
Thank you a lot :D --PantheraLeo1359531 😺 (talk) 12:41, 4 April 2025 (UTC)[reply]
@RoyZuo How do I execute this script on a category? I am a noob at coding :D --PantheraLeo1359531 😺 (talk) 12:47, 4 April 2025 (UTC)[reply]
mw.loader.load('/w/index.php?title=User:RoyZuo/FilesizeSum.js&action=raw&ctype=text/javascript');
add to line 2 of User:PantheraLeo1359531/common.js. RoyZuo (talk) 12:49, 4 April 2025 (UTC)[reply]
Thanks, I figured it out. Splended thing! --PantheraLeo1359531 😺 (talk) 13:08, 4 April 2025 (UTC)[reply]
@RoyZuo It seems some calculation errors appear, like here: Category:Black caps in Japan. It claims to contain 98 MB, but it has approx. 16 MB, or am I doing something wrong? --PantheraLeo1359531 😺 (talk) 13:19, 4 April 2025 (UTC)[reply]
"On this page: 15.34 MB (4 files)" for me. RoyZuo (talk) 14:10, 4 April 2025 (UTC)[reply]
Oh okay, I will look into it :) --PantheraLeo1359531 😺 (talk) 16:36, 4 April 2025 (UTC)[reply]

Tables instead of templates for motd

[edit]

An idea just came to my mind. instead of creating lots of templates for com:motd, it could use 2 monthly Tabular Data instead. 1 for filenames (and thumbtime, etc.), 1 for captions.

also probably easier for users since instead of manually making sure all the template parameters are right, you just need to fill in filenames in the table. RoyZuo (talk) 11:23, 16 March 2025 (UTC)[reply]

Actually a Data page is not even needed. we can create a 62-parameter template (31 for filenames and 31 for thumbtime (optional)). RoyZuo (talk) 11:30, 16 March 2025 (UTC)[reply]

Quick way to search for potentially existing category or wikidata item

[edit]

Anyone has to do the same thing like me? Took a photo of something probably not yet documented on commons, so before creating a new cat, wanna search for existing cat or wikidata item first? How do you go about doing that?

I have to do a classic search on commons, and a classic search on wikidata. I find this rather tedious when i have to repeat this double search hundreds of times. Any better solution? RoyZuo (talk) 08:43, 17 March 2025 (UTC)[reply]

Would only search on Commons and if the category doesn't yet exist, create it. If and once I created it I would also search on Wikidata if it has an item to then link the category there but usually it doesn't have it. Prototyperspective (talk) 17:18, 17 March 2025 (UTC)[reply]

access to tabular data

[edit]

At en.wiki, Module:Citation/CS1/Configuration uses the lua function mw.ext.data.get() to fetch data from Data:CS1/Identifier limits.tab. This is functioning correctly as can be seen from any module debug console. To prove that to yourself, try this:

=mw.dumpObject (mw.ext.data.get ('CS1/Identifier limits.tab').data)

Those data are in need of an update. But, the link to Data:CS1/Identifier limits.tab does not work. When that link is clicked, eventually I get the "Service Temporarily Unavailable Our servers are currently under maintenance or experiencing a technical problem. Please try again in a few minutes." I first got that message c. midnight 17 March 2025 (UTC).

Is this a known issue? If so, when can we expect to regain edit-access to tabular data files? — Trappist the monk (talk) 14:00, 17 March 2025 (UTC)[reply]

Most likely it is not known issue and i made an phab ticket phab: T389105 for it. Good thing is that it seems that data-namespace files are generally working and it is more likely that just this is broken. (i tested some map and graph, and data files and they worked). --Zache (talk) 17:34, 17 March 2025 (UTC)[reply]
Thank you; subscribed there.
Trappist the monk (talk) 17:47, 17 March 2025 (UTC)[reply]

Tech News: 2025-12

[edit]

MediaWiki message delivery 23:44, 17 March 2025 (UTC)[reply]

Trying to create a template for categories to show a map with the images within that cat

[edit]

Hi all,

I'm trying to create a sort of embedded version of "Map of all coordinates" for geotagged categories, which would be particularly useful for COM:WikiProject GeoSets. I'm failing miserably so far. Would anyone familiarized with Lua care to take a look, or maybe suggest a different approach?

Module:GeoSetsNav

Template:GeoSetsNav

Testing (and failing) at Category:WPGS - Basílica de Nossa Senhora de Lourdes in Belo Horizonte, Brazil, September 2024

Thanks,

Rkieferbaum (talk) 00:11, 20 March 2025 (UTC)[reply]

Ok, not looking good but at least it's working now. Any input still greatly appreciated. Rkieferbaum (talk) 19:04, 20 March 2025 (UTC)[reply]

Broken SVGs

[edit]

I've been seeing a lot of SVGs from long ago that are not rendering properly. As an example:

On its file page, and when I pick any other size, it displays two rows of "CH –COOH", with a large white gap between each "CH" and "–COOH". Likewise when I click the image to see the original SVG using Firefox 115.21.0 or Chrome 16.0.5845.187. So both the MW thumbnailer and my local browser are mis-rendering it. However, if I download the SVG and open it in an old version of Inkscape or in emacs with x11 graphics enabled, there are "(OH)" in those gaps. I don't know much about SVG technical details...has some standard rendering library become more strict or changed how it handles imperfect files? DMacks (talk) 00:49, 20 March 2025 (UTC)[reply]

Any way to view these files?

[edit]

Yesterday I uploaded File:Emma Müller Edle von Seehof Bub mit Federhut.jpg and File:Falstaff-Szene A1885.jpg but somehow neither the images nor thumbnails show up. If I try to upload the file again as a new version, it doesn't work either and I get the error he file "mwstore://local-multiwrite/local-public/e/eb/Emma_Müller_Edle_von_Seehof_Bub_mit_Federhut.jpg" is in an inconsistent state within the internal storage backends Purging doesn't help either. --Anvilaquarius (talk) 12:21, 20 March 2025 (UTC).[reply]

Had the same error and could upload a new version after trying again a few hours later. Prototyperspective (talk) 15:48, 20 March 2025 (UTC)[reply]
They both display fine to me now (on Firefox) so I suspect it was just a temporary server issue. Pi.1415926535 (talk) 17:54, 20 March 2025 (UTC)[reply]

Thanks for checking. Still nothing here, must have to do something with cache (on my side or the servers). I'll just wait. --Anvilaquarius (talk) 18:09, 20 March 2025 (UTC)[reply]

@Anvilaquarius: The uploads are permanently broken and the file names themselves can't be reused (not your fault; known issue). I re-uploaded them as File:Emma Müller Edle von Seehof Bub mit Federhut (reupload).jpg and File:Falstaff-Szene A1885 (reupload).jpg and redirected the original files to the new ones. The Squirrel Conspiracy (talk) 07:35, 21 March 2025 (UTC)[reply]
Thanks! --Anvilaquarius (talk) 17:46, 21 March 2025 (UTC)[reply]

Install Wikimedia Commons popup

[edit]

Just a moment ago I got a little "Install Wikimedia Commons" popup when visiting a regular discussion page.

It has happened a couple of times, every few months. It has the Commons logo, a wikimedia url and install button. I tried to grab a screenshot but it disappeared before I could act. I was using Chrome/Android in Mobile mode.

It has happened on meta too (with meta logo), so it probably not connected to the Commons app. I thought it might be a w:progressive web app or just Google being strange. Any ideas? Commander Keane (talk) 00:32, 22 March 2025 (UTC)[reply]

Never had that and never heard of it. Could you click it? If it disappears so quickly that sounds strange. Maybe you could check which types of extensions you have installed. In any case, I recommend a mobile version of Firefox. I think such a popup would be a good thing once the Commons app has a few key functionalities like playing audio&video. Prototyperspective (talk) 01:51, 22 March 2025 (UTC)[reply]

Empty Wikidata Infobox

[edit]

Hi everybody. I have a question about this {{Wikidata Infobox}}. I makes sense to create a category including this code <!-- {{Wikidata Infobox}} -->. or, after, comment this code {{Wikidata Infobox}} when the wikidata is not existing yet or is not yet connect? An example here Category:Companies_based_in_Heemstede,_North_Holland. I don't want to start an editwar, but this kind of edit seem to not very wise, because when the wikidata element will be created it will be more difficult to connect it or, when already present, is not easy to find it, for example Category:Klouwer (surname), it was better to look for it instead of comment it <!-- {{Wikidata Infobox}} -->. Thank you in advance for your answers. P.S. If not necessary, I would not insert at all {{Wikidata Infobox}} MrKeefeJohn (talk) 18:40, 22 March 2025 (UTC)[reply]

Create your category with {{Wikidata Infobox}} but without the HTML comment markup. The infobox is designed for such use. I have just done this on your example category. Note that the infobox there includes a "Create new Wikidata item" link, Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 19:01, 22 March 2025 (UTC)[reply]
@Pigsonthewing: thank you for your answer. I understand what is designed for <!-- {{Wikidata Infobox}} --> and always add it creating new categories. The question was more about if wise to remove it when the wikidata element is not created yet. MrKeefeJohn (talk) 06:58, 3 April 2025 (UTC)[reply]
Usually a Wikidata infobox is not added when there is no Wikidata item to connect it to / that it's connected to. Adding an infobox nevertheless is I think an implicit suggestion/request for others to create a Wikidata item for the subject of the category. For these, I usually just create the Wikidata item but there are exceptions when it's not clear how the item would look like. In regards to your case (example?) I don't think there are Wikidata items for 'Companies based in {region}' but maybe I'm wrong or these could be created – however usually items are created for companies with some location information so there's no Wikidata item for that. They could maybe be created as dynamic list pages somehow though. Prototyperspective (talk) 09:51, 3 April 2025 (UTC)[reply]
That is the context in which I gave my answer. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 11:29, 3 April 2025 (UTC)[reply]
@Prototyperspective: I do understand your opinion, but in my experience quite often it's just a problem of missing connection. Just todady a couple of example Category:Companies based in Udine wikidata and Category:Companies based in Udine wikidata MrKeefeJohn (talk) 19:30, 11 April 2025 (UTC)[reply]
Don't know what you mean. This isn't what you wrote about earlier. Yes, there are categories that are not connected to their Wikidata items. You could for example always add the infobox and then check if the Wikidata item exists via search and if not create it or if not just leave the empty infobox as is. Prototyperspective (talk) 21:35, 11 April 2025 (UTC)[reply]
I mean that if you don't add a {{Wikidata Infobox}}, or remove it or comment like this <!-- {{Wikidata Infobox}} -->, it will be more difficult to connect with wikidata elements and/or with already existing articles or categories in some wiki. And it seems to me that it makes more difficult the bots' operation. MrKeefeJohn (talk) 06:56, 12 April 2025 (UTC)[reply]
Why would that be the case, I don't think so. That infobox template is added by a bot. Prototyperspective (talk) 10:16, 12 April 2025 (UTC)[reply]

Irritating observation about file moving

[edit]

Hello, I just observed something that's puzzling me. I thought about moving File:Claire Leger speaks to media about the Tarnak Farms incident.jpg on the rationale COM:FR#FR2, as the name "Léger" contains a spelling mistake (it's currently lacking the acute). I'm using a Chrome browser on my Android tablet to write this. If I switch to the Commons desktop mode to use "move and replace", the checkbox "leave a redirect behind" is active and greyed out, which is the usual behaviour on files in use that I'm accustomed to. But if I'm switching to the mobile view and access https://commons.m.wikimedia.org/wiki/Special:MovePage/File:Claire_Leger_speaks_to_media_about_the_Tarnak_Farms_incident.jpg through a 3-dot-menu on the file page, then I would be able to suppress the redirect anyway. Why is there such a difference between the desktop gadget and the special page function in the mobile view? Regards, Grand-Duc (talk) 02:55, 24 March 2025 (UTC)[reply]

Probably because no one ever looked at making the Commons-specific utility that is used in the desktop mode work for mobile as well. —TheDJ (talkcontribs) 16:45, 25 March 2025 (UTC)[reply]
if you start the move and replace gadget in the file history tab of the file on pc, you will also have the option of suppressing redirects. :)
i guess the gadget's logic is checking the "global usage" section on a file page. so when it cannot see that section, it assumes there's no global usage = suppress is possible. RoyZuo (talk) 08:54, 3 April 2025 (UTC)[reply]

Can the Listeriabot be fixed?

[edit]

Probably ever since about 11 August 2020 the Listeriabot does not work well anymore, see for example Plazas de toros en España and about 145 more (see Search). See Talk:Edificios en Cuenca for the discussion about that gallery page (which I fixed manually by reverting to the version of 11 Aug 2020 + adjust it). Magnus Manske did not react to the discussion. Because there are so many gallery pages to be fixed, I think it is no option to revert + adjust them all. It would be better to fix the bot. Is it possible that someone looks into this problem and fixes it? JopkeB (talk) 06:27, 24 March 2025 (UTC)[reply]

  1. Could you please describe what the problem is and if possible create a code issue in the software repo or link the issue(s) if they are/it's already there? It may not be an issue with the tool though but due to some Wikimedia change (and this seems to be the case for your example, see #3)
  2. This is exactly what this proposal is about: m:Community Wishlist/Wishes/Continue development of the Listeria bot that creates dynamic tables using Wikidata.
  3. In that gallery you linked, the sparql query doesn't work anymor as it gets "Unknown error: java.lang.NullPointerException". One could ask how to fix this at d:Wikidata:SPARQL query service/Wikidata Query Help.
Prototyperspective (talk) 11:49, 24 March 2025 (UTC)[reply]
Thanks Prototyperspective, for diving into this problem.
  1. The problem is that in for example the gallery page Plazas de toros en España there are no images, but squares with codes class='wd_p18' and class='wd_label. I am not able to create code at all, I am not a programmer, I have no idea what the problem in the program Listeriabot is. I can describe on a functional level what the problem is, but not in a technical way.
  2. -
  3. So a good idea would be that I move this question to d:Wikidata:SPARQL query service/Wikidata Query Help?
JopkeB (talk) 15:26, 24 March 2025 (UTC)[reply]
  1. Click on WQS to run the query. The error is shown there. The things it shows on that page are because of issues with the template. If you edit it to change | p18 = class='wd_p18'| [[File:... to | p18 = [[File:... it shows the image just fine. This may be because the template it uses was changed after the bot was changed. It's likely fixed once the bot updates the page again and the error shown when running the query (WQS) is what prevents that from happening.
3. Yes there (alternatively at d:Wikidata:Request a query) somebody probably knows what the issue with that query is.
Prototyperspective (talk) 16:20, 24 March 2025 (UTC)[reply]
#1 is basically https://github.com/magnusmanske/listeria_rs/issues/82 which I reported in 2021. ListeriaBot does not produce correct wikitext when row_template is used. --Matěj Suchánek (talk) 12:46, 26 March 2025 (UTC)[reply]
This is the diff and point in time that the gallery was broken: Special:Diff/512644818. There class='wd_p18'| is added, breaking the gallery in 2020. Prototyperspective (talk) 15:14, 26 March 2025 (UTC)[reply]
Yep. Notice the "V2" present in the edit summary, but missing from the parent revision's summary... --Matěj Suchánek (talk) 16:48, 26 March 2025 (UTC)[reply]

Toolforge tools down

[edit]

Hi, For the last three hours, all tools I tried on Toolforge are down (CropTool, etc.). Any idea? Yann (talk) 20:08, 24 March 2025 (UTC)[reply]

CropTool and GLAMorous are working fine for me. I just did a crop with CropTool  REAL 💬   20:18, 24 March 2025 (UTC)[reply]

Tech News: 2025-13

[edit]

MediaWiki message delivery 22:38, 24 March 2025 (UTC)[reply]

SVG rendering issue

[edit]
Does not display

File:Portuguese colonial war blank map.svg and File:Portuguese colonial war blank map.svg are currently not rendering correctly on their File pages, but do render correctly if you click on them (e.g. go to https://upload.wikimedia.org/wikipedia/commons/d/d6/Portuguese_colonial_war_blank_map.svg). The Squirrel Conspiracy (talk) 03:52, 25 March 2025 (UTC)[reply]

Validation shows spurious text. Supurious text removed.
viewBox="false" not identified as an error, but incorrect.
changed version to 1.1
added XML PI with encoding
Glrx (talk) 16:50, 25 March 2025 (UTC)[reply]


Central place for dark mode night mode transtion debug

[edit]

Wondering if anyone is specialising in transitioning templates modules etc. to be compatible with dark / night mode? I'd put everything together at one place so specialist users can have a receiving desk of these tasks. sorry my css / html skills are not good enough to debug myself. RoyZuo (talk) 19:28, 25 March 2025 (UTC)[reply]

I a not sure if there are enough cases to create a new board. If would create a style guide page or similar we could use the talk page of such a page. For now I would suggest to just use this beard with one main thread for all cases. GPSLeo (talk) 19:40, 25 March 2025 (UTC)[reply]

Dark mode tasks

[edit]

Not readable

[edit]
It seems the blue text in dark mode is lighter than the blue in light mode. or is it just an optical illusion? e.g. For Help:Image-Annotator at File:" 12 - ITALY - Gun Collection FLOS 3.JPG.--RoyZuo (talk) 06:06, 26 March 2025 (UTC)[reply]
No, you are right. All text colors by default will (obviously) be lighter in dark mode, so if someone specified their own background and did not account for setting a specific text color for links, then you will get this result. —TheDJ (talkcontribs) 11:06, 26 March 2025 (UTC)[reply]

No dark mode design, but readable

[edit]
good enough now? ✓ Done.--RoyZuo (talk) 09:54, 30 March 2025 (UTC)[reply]

Fixed

[edit]


Contributions by:

Several of these have the 'pink/lilac' background. This doesn't work in dark mode design, as links don't stand out against it. Has anyone picked a dark mode variant color for this yet that is used on OTHER templates that use 'pink/lilac' background ? —TheDJ (talkcontribs) 09:25, 26 March 2025 (UTC)[reply]
It seems the dark mode version of the file info header is: #2a2a5c. —TheDJ (talkcontribs) 09:55, 26 March 2025 (UTC)[reply]

On Mobile with a phone the content in Commons:First steps/Contributing is cut-off and horizontal scroll is not available. It may have something to do with the div style 420px float. Commander Keane (talk) 09:56, 26 March 2025 (UTC)[reply]

i dont understand the float left float right styles, what they were meant to convey.
i removed all the width and float settings. RoyZuo (talk) 10:15, 26 March 2025 (UTC)[reply]
This requires a complete conversion to TemplateStyles. —TheDJ (talkcontribs) 10:16, 26 March 2025 (UTC)[reply]
@RoyZuo: thanks for the fix, it is fine on my phone now. As to "what they were meant to convey", I think it is part of some sort of minimalist visual style that draws your eye down the page. It looked really good compared to the "ugly" regular step that follows. I took an annoted screenshot to show what I mean.
Actually, visiting Commons:First steps/Uploading files, I see the "Need help with uploading files?" box sticky-floats and gets in the way. You can still read the contents, so not a big deal. Commander Keane (talk) 12:04, 26 March 2025 (UTC)[reply]
That's a problem with these subtle hints. See, the way I read it, was that it was structured as if it were a Q&A style, left being questions and right being answers. But the last box (#4) having the same kind of content as #2 #3 but floating left just makes no sense.
it might have been "more interesting" if the boxes floated left right left right, as an alternate pattern.
anyway, i made some more textual changes.
everything should be ✓ Done, but feel free to improve. RoyZuo (talk) 17:34, 26 March 2025 (UTC)[reply]

Three ways to improve the way we maintain cagetories

[edit]

I have three things I want to do. Maybe they are already possible. If not then this would be my request for someone to make it possible. I think it can be very useful.

  1. When in a category, have a way to see all the files of the subcategories. For example there are about 20 categories and subcategories for Björk. Instead of me looking through each and every category for a good photo, why not have the ability to view all the files.
  2. I've also run into the problem of people putting files into both the cagetory and subcategory. This file for example is both in the category Reykjavík and 2017 in Reykjavík when it should only be in the latter. It would be nice to visually let the reader know when a file is in to many categories (highlighting the parent category). Similar to how you can see on Wikipedia when a link goes to a disambiguation site (at least I have it set to see it).
  3. And lastly, it would be nice to be able to subscribe to a category. Meaning that when a file gets added or removed that I get a notification. This way I can monitor categories that are of high interest to me.

Any feedback would be greatly appreciated. Steinninn ♨ 13:15, 27 March 2025 (UTC)[reply]

@Steinninn: good ideas for sure.
  1. was the second most popular feature request at last year's Technical needs survey.
  2. Needs investigating.
  3. You can add a category to your Watchlist and see additions/removals. Filter by the Category namespace to just see those.
Commander Keane (talk) 15:06, 27 March 2025 (UTC)[reply]
  1. Good that I'm not the only one thinking about this
  2. ...
  3. I was not able to replicate what you described. I added a category to my watchlist that I know has a recent image. But when I go to my watchlist it's not listed.
Steinninn ♨ 16:40, 27 March 2025 (UTC)[reply]
@Steinninn: regarding #3 make sure "Hide categorization of pages" is unticked in Special:Preferences#mw-prefsection-watchlist. Commander Keane (talk) 14:30, 28 March 2025 (UTC)[reply]
Completely agree and good to see other people noticing this issue too and coming to the same conclusion.
  1. This is exactly what this proposal is about: Wall of images view for category pages including images in subcats
    • There are currently two barely known barely used ways to get this functionality already but it only works in categories that don't have deep subcategories and it has several issues as described mostly at phab:T376440#10354943: using the deepcategory search parameter (btw you can also combine multiple categories this way) – example for Category:Milky Way Galaxy and a place on Earth.
    • There also is a nice gadget that seems to use the same, FastCCI: in the category (example) click on the arrow button in the top right that says "Good pictures" to see the dropdown and then select "All images". This gadget used to usually not load but now it seems to work often(?). I don't think many users know if it either, especially not people new to the site who certainly would click some barely visible barely explained button to select a specific dropdown option. I just tried it and it did not load many of the images so I think that also needs to be fixed.
    • Maybe either of these two approaches could be used for the proposal or improved accordingly. A challenge is very large categories, for these deepcategory either only shows some but not all files or shows many files that aren't really about the subject of the initial category. A further issue is improving the sorting of those files. I think the former issue can be addressed by showing the subcategories the files are from sorted by number of files in that category – then one could click an x button to remove files in these such as files in the 'xyz in art' subcategory if one would like to only see photos. Premade 'filters' for this and other common things one can simply select would also help a lot with that.
  2. I think the bigger issue is when people remove items from the parent category because it's in one subcategory and/or only move it to one of its subcategory – this results in files being in only one of its branches but not in all subcategories that it belongs into. Imagine a category having three subcategories: one by time, one by location, and one by subject shown – the file should be in all three of those subcategories, not just in the one by time. In the example category, there are subcategories for which country the photo of the Milky Way and a place on Earth was taken but also about the content such as Category:Milky Way Galaxy and a body of water. Nevertheless what you said could be helpful to reduce overcategorization, yet I think the bigger issue is that files are missing in some subcategory which isn't noticed because it's in one of its other subcategories. I think those two problems need to be considered together.
  3. For many categories, lots of files get added so that may not be usable. I don't think many would use this. I think there is a wishlist proposal about enabling watching files being added to categories on Wikipedia and maybe that even got implemented and could be used here. Maybe you or somebody else finds it. Maybe it's possible using feeds but I checked and that doesn't seem to be the case. I think this is something a Wikimedian new to Commons may find likely useful but in practice isn't actually useful or needed. Certainly not in the form of notifications because it would break these but probably also not for the Watchlist. In the Watchlist you can check "Category changes" but I haven't tried it since it may break my watchlist and certainly make it unusable. One could still just bookmark the category and revisit it every now and then. You can sort by file uploaded in the MediaSearch.
Prototyperspective (talk) 18:15, 27 March 2025 (UTC)[reply]

Maps without data source

[edit]

It would be nice if maps were put into a subcategory of Category:Information graphics without data source – could somebody implement this at Template:Datasource missing? Either via a new template like it or via some parameter which would need to be added to all the map files in the cat This would allow excluding these in the GLamorous & Glamorgan scans for file uses (linked at the bottom of the See alsos of the template doc). (See Help:Misinformation. Prototyperspective (talk) 14:48, 27 March 2025 (UTC)[reply]

[edit]

the problem is rejected on Phabricator saying that it must be solved at the level of Commons admin. Can someone have a look please  ? please check the topic in -> Commons:Bistro#lien_de_categorie_en_rouge_? or follow task discussion. Thanks Christian 🇫🇷 FR (talk) 16:43, 27 March 2025 (UTC)[reply]

I’m not familiar with the translation categories and its structure but for some of the simpler ones, I went ahead and manually created them. Anyone that is more familiar with this, feel free to adjust them if needed. Tvpuppy (talk) 19:31, 27 March 2025 (UTC)[reply]
thanks ... people should check at least what they modify. Christian 🇫🇷 FR (talk) 23:21, 27 March 2025 (UTC)[reply]

Automatically adding the language category and other version when translating a file with SVG Translate tool

[edit]

Could the SVG Translate tool please be changed so that it also automatically adds the language's respective category to the file? It would check the categories and get the subcats of Category:SVG by language (like Category:Chinese-language SVG diagrams) and then add the respective subcat of the cat above (here Category:SVG diagrams by language) for the added language. I think it should also add the new translated SVG image to the "Other versions" field of the file.

Because users only sometimes add the language category for the translated graphic, those language categories are very unreliable and incomplete. When searching for graphics in a specific language, for example using deepcategory or by browsing that category, it would not show many files in that language. Moreover, users may not know the graphic is also available in another language if the translated file is not linked in the Other versions.

Further details here.
Prototyperspective (talk) 17:23, 27 March 2025 (UTC)[reply]

Fix Template:Collapse top (broken CSS, and accessibility problem)

[edit]

The specification of the background color (for the top uncollapsed header) does not work correctly, and generates invalid CSS. In fact the test of existence of the bg= parameter has been unintendly reversed:

  • It unconditionally generates the background: {{{bg}}}; CSS style even if the parameter is missing (and in that case the CSS is just spurious with incorrect syntax containing the unexpanded braces).
  • And if there's a specified value, the default color:#202122; should be omitted completely (it may not match correctly with the specified background color, that forced dark gray color may not fit well with that color, notably with medium blue or gray like bg=#88F or darker; producing insufficient or absent contrast, with a rendering which is not accessible to readers), using either the inherited foreground color, or another foreground color specified at the same time in bg=, for example bg=black;color:white.

The "bg" parameter (specific for the top permanent header showing the title bar and the clickable link on the right to collapse/uncollapse the box) is different from the other optional "b-color" parameter used for the collapsible content of the box.

The bug (visible in ALL examples shown in the template's doc subpage, as well as on the base template page, showing the preview by default with no parameters at all) originates from the last broken edit made by Matrix (diff) on 5 September 2024, still keeping the template editprotected.

In the template code, please just replace

{{#if: {{{bg|}}} | color:#202122;}} background: {{{bg}}};

by

{{#if: {{{bg|}}} | background:{{{bg|}}}; | color:#202122; }}

And may be we can drop color:#202122;", if it is already the default in a ".cot-header-other" class defined in the default site CSS stylesheet. And we could be smarter by placing {{#if: {{{fg|}}} | color:{{{fg|}}}; }}" after the test of the background color (if we need to override the default foreground from the default stylesheet) after dropping it from inside the background color test.

Thanks. verdy_p (talk) 18:47, 27 March 2025 (UTC)[reply]

I think the color:#202122; can be dropped, because the proposed change means that it will become the default text colour when bg is unspecified, which will not work in dark mode. Tvpuppy (talk) 20:07, 27 March 2025 (UTC)[reply]
Note that this question was initially posted on the Commons:Administrators' noticeboard/Blocks and protections (because the protection banner still drives there for instructions). It was moved here in the Technical Village pump by you. Still what happens when a bug is detect in protect templates is still misguided, the protection banners should be fixed. Note that this does not affect the "dark mode", due to the existing presence of the light green background (by default) which also applies to the dark mode (there's no test for that, no CSS class designed in any stylesheet to specify the default background/foreground colors of titlebars of these collapsible boxes to differentiate for such light/dark modes. So in either modes, by default it was still a dark grey text on a light green title bar (and these chosen colors should remain accessible as well in presence of blue/red links; this prohibits some foreground/background color combinations for the title bar, and of course for the collapsible content of the box, like the rest of pages outside such box; the default dark gray on light green works quite wells, much better than dark gray on light blue, and definitely better than any fixed dark background especially if it's blue or red; the only working background colors are green or gray, even if we could tune their lightness depending on light/dark mode, and then adjust the contrasting default foreground accordingly between dark gray or black for light mode and light grey/beige/yellow for dark mode, avoiding plain white for text in that dark mode case). verdy_p (talk) 20:13, 27 March 2025 (UTC)[reply]
Apologies for the move. I only realised the post is related to the template being protected after I moved it. I agree with you about your point at the end about the colors. I think since the template has an option to specify the background color, it will make sense to also have an option to specify the text color, as you mentioned above. Tvpuppy (talk) 22:31, 27 March 2025 (UTC)[reply]
So as I said in the initial message you can safely place {{#if: {{{bg|}}} | background:{{{bg|}}}; }} immediately to solve the bug (we can think about default titlebar colors later in a specific stylesheet). verdy_p (talk) 20:32, 27 March 2025 (UTC)[reply]

Category search not working in 'Pages with maps'?

[edit]

I think a search box is especially useful for categories with lots of files. And combining a category that specifies whether the file has coordinates may be useful in terms of a filter / criteria when searching which would be done in the same way.

So I intended to add {{Search in category}} to the category Category:Pages with maps (and Category:Pages with coordinates) and tried some searches but it doesn't seem to show results properly. Either the deepcategory has the issue despite of phab:T376440: "A warning has occurred while searching: Deep category search timed out. Most likely the category has too many subcategories" (example) or it doesn't show results that it should show (let's focus on this problem for now): example search does not show this result which is the second file when you visit Category:Pages with maps. Does somebody know why this is? Prototyperspective (talk) 11:23, 28 March 2025 (UTC)[reply]

File:04.02.2015. -Srbobran - Szentamás , Serbien - panoramio (1).jpg
is not in
Category:Pages with maps RoyZuo (talk) 09:38, 30 March 2025 (UTC)[reply]
Well, I'm absolutely certain that image was shown as the second result in Category:Pages with maps as the second result (I even copied the filetitle from that page). Seems like some display / cache issue then. In regards to the problem of "A warning has occurred while searching:", incategory is better to use there since that category is about pages so I'd add that variant of the search box to it ({{Search box inside category}}. The problem with it is that it searches the file namespace with no working way to make it use other namespaces like category pages etc – see Commons:Village pump#Is there a page to request changes to templates?.
So I tried to search for the file that is now the second file in the category: File:04212jfSaint Alphonsus Mary Liguori Parish Church Magallanes Village Makati Cityfvf 05.jpg and it also doesn't find it. I checked the file and it's also not in that category despite being shown in the category. It has not coordinates-/map-related category except for Category:Files with coordinates missing SDC location of creation and was last edited at 27 February 2023.
So the question remains: could somebody clarify all this? Prototyperspective (talk) 13:36, 30 March 2025 (UTC)[reply]
i guess it's after effect of Commons:Categories_for_discussion/2019/06/Category:Pages_with_maps#c-Enhancing999-20240619111900-June_2024. will take a long time for the servers to update all the files. RoyZuo (talk) 13:59, 30 March 2025 (UTC)[reply]

Tech News: 2025-14

[edit]

MediaWiki message delivery 00:01, 1 April 2025 (UTC)[reply]

HotCat and Cat-a-lot are adding categories inside template brackets

[edit]

I added a category with HotCat here and one with Cat-a-lot here and for some reason the categories were added inside the brackets of the crop-template that was already there as if the categories were part of the template syntax. As a result, when another user cropped the image with CropTool the categories were (automatically) removed together with the crop-template, see here. That looks like a chain of things going wrong. Nakonana (talk) 18:20, 1 April 2025 (UTC)[reply]

Several images are affected: see File talk:Bundesarchiv Bild 101I-133-0703-38, Polen, Ghetto Litzmannstadt, Kinder.jpg#Categories (and that list might not be comprehensive). Nakonana (talk) 18:27, 1 April 2025 (UTC)[reply]
I suppose the tools' logic is to find the last [[Category:...]] and then open a new line after it and add the new cats.
The logic makes sense, since it seeks to put categories together.
I could imagine a little more could be added to the logic. It can try to find the last \n\s*\[\[Category\:.+\]\]\s* instead. RoyZuo (talk) 18:43, 1 April 2025 (UTC)[reply]
I think that it would work that function find_insertionpoint() in Gadget-Cat-a-lot.js line 916 would contain also following replace when it is cleaning the wikicode:
.replace( /\{\{Crop\|category=(\s|\S)*?\}\}/g, replaceByBlanks );
I think that HotCat is using similar cleanup.
-- Zache (talk) 18:58, 1 April 2025 (UTC)[reply]
Thanks for your ideas. I have one suggestion: there could be one or more blanks between | and category= that needs to be considered. Kind regards, --Sebastian Wallroth (talk) Sebastian Wallroth (talk) 06:32, 2 April 2025 (UTC)[reply]
The much simpler solution would be to move the category link inside the template and only write the category name when using the template. GPSLeo (talk) 08:41, 2 April 2025 (UTC)[reply]
Whom/Where to ask to make that happen? Nakonana (talk) 08:38, 6 April 2025 (UTC)[reply]
I changed the template[8]. GPSLeo (talk) 09:05, 6 April 2025 (UTC)[reply]
Thank you! Nakonana (talk) 09:06, 6 April 2025 (UTC)[reply]
Is this solved then? Prototyperspective (talk) 11:35, 6 April 2025 (UTC)[reply]
I think? I haven't tested how CropTool is handling the change, though. Nakonana (talk) 18:00, 7 April 2025 (UTC)[reply]

Error opening any pages

[edit]

Hello, maybe it is just me but I keep getting an error every time I tried to open any page.

  • “MediaWiki internal error”…”Fatal exception of type "Wikimedia\Rdbms\DBUnexpectedError"

The error will go away if I refresh couple times, but it keeps happening when I tried to click on another page. It has been going on for a while now. Anyone know what this error is about? Tvpuppy (talk) 05:08, 2 April 2025 (UTC)[reply]

i'm getting the same for 2-3 days now. bugs have been filed https://phabricator.wikimedia.org/T389734 https://phabricator.wikimedia.org/T390811 . RoyZuo (talk) 05:43, 2 April 2025 (UTC)[reply]
Ah so it wasn’t just me. Thanks for letting me know. Tvpuppy (talk) 05:55, 2 April 2025 (UTC)[reply]

Vorlage für Output of the number of files within a category and its subcategories

[edit]

Hi!

I would like to create a table where numbers are displayed in the second row. These numbers should represent the number of files in a category including their subcats. Which template can I use to do this?

Thank you --PantheraLeo1359531 😺 (talk) 14:09, 3 April 2025 (UTC)[reply]

Making maps

[edit]

Is there a tutorial on how to create GeoJSON maps like this. I was able to download QGIS and add the QuickOSM plugin. I ran a query for all roads in Reykjavík and filtered the layer to only show the name of the street. Then I selected 'make permanent'. But the file I got was not usable for making GeoJSON map on Commons. Steinninn ♨ 11:52, 4 April 2025 (UTC)[reply]

If there is, please add it to (somewhat-new) Category:Wikimedia projects and maps. Prototyperspective (talk) 13:16, 4 April 2025 (UTC)[reply]

Multiple files uploaded under one name

[edit]

When I use the mobile uploader, usually it succeeds in picking names for my files that don't overwrite each other (for example Category:Views from the Internationale chairlift). With File:Blewett Pass - Tronsen Ridge ski tour.jpg, they were just uploaded on top of each other. Weirdly I had just done a previous multi-upload for the name File:Alpental.jpg that worked perfectly. What's the easiest way to fix this? Buidhe (talk) 03:37, 5 April 2025 (UTC)[reply]

@Buidhe I think this is a serious bug that you should write to https://github.com/commons-app/apps-android-commons , or follow Commons:Mobile app#Issues. RoyZuo (talk) 09:40, 6 April 2025 (UTC)[reply]

Image Rotation

[edit]

Hello! I have submitted a request to rotate File:ATTRITOR GRINDING MACHINE - NARA - 17496809.jpg by 180° via @SteinsplitterBot. Now the thumbnail has the desired orientation, but the actual image still remains upside down. What is the correct procedure to handle such cases? --Aciarium (talk) 10:49, 7 April 2025 (UTC)[reply]

@Aciarium: it looks ok for me. See COM:PURGE. Commander Keane (talk) 12:07, 7 April 2025 (UTC)[reply]
@Commander Keane: My bad, I wasn't aware that I had to purge the site after this action. Now it looks ok also on my side. Thanks for clarifying!! --Aciarium (talk) 13:49, 7 April 2025 (UTC)[reply]

Does someone have the means to extract the image from the British Museum's website? My usual methods are failing. JayCubby (talk) 14:49, 7 April 2025 (UTC)[reply]

@JayCubby https://www.britishmuseum.org/collection/image/1613085647 maybe? RoyZuo (talk) 08:36, 12 April 2025 (UTC)[reply]

Tech News: 2025-15

[edit]

MediaWiki message delivery 18:48, 7 April 2025 (UTC)[reply]

PDF upload broken

[edit]

When I use the upload tool, PDF is not one of the options, and it does not recognize a PDF as a file type when I try to upload. When I fill in the information, the tool fails with nonsensical errors. This is especially problematic as Foundation policy directs that PDFs (which are heavily used on English Wikisource and other language Wikisource projects) which are free by Commons rules should be uploaded here and not locally. TE(æ)A,ea. (talk) 01:30, 9 April 2025 (UTC)[reply]

@TE(æ)A,ea. which tool do you mean? can you plz write down the link? RoyZuo (talk) 02:37, 9 April 2025 (UTC)[reply]
Hello @TE(æ)A,ea., I assumed you have found a solution to your problem since you uploaded File:Japanese.pdf after you posted here. Tvpuppy (talk) 02:47, 9 April 2025 (UTC)[reply]

Mysterious editing of page

[edit]

on Special:Upload, there's a line "Permitted file types: tiff, tif, png, gif..."

after or around the page finishes loading, something deletes ", pdf" from the list of extensions. sorry my skill is too low to find out what does that. RoyZuo (talk) 08:16, 9 April 2025 (UTC)[reply]

The relevant code, and an explanation, is at MediaWiki:Upload.js#L-141--L-148. Omphalographer (talk) 00:14, 10 April 2025 (UTC)[reply]

Overwrite a video file

[edit]

I uploaded a video a while ago File:TTC Line 2 T-1 Subway arrives at Pape station (2023-08-08) 001.webm, it had some frame rate issues and never got around to fixing it, until now. However I am unable to re-upload it as the file exceeds 100MB. How can I overwrite the video file with the new one? PascalHD (talk) 02:02, 10 April 2025 (UTC)[reply]

@PascalHD User talk:Rillke/bigChunkedUpload.js. RoyZuo (talk) 06:36, 10 April 2025 (UTC)[reply]
@RoyZuo Thanks! It worked perfectly! PascalHD (talk) 21:38, 10 April 2025 (UTC)[reply]
This is the reason why this issue exists: phab:T382814 Missing info on how to upload a file larger than 100 MB in the 'Upload a new version of this file' page – You're not the only one who doesn't know that. Prototyperspective (talk) 21:52, 10 April 2025 (UTC)[reply]

Batch uploading of file

[edit]

I have here files I ripped from the SLSA's website (Category:Files_from_the_State_Library_of_South_Australia), which are higher-resolution than the existing files.

The files are named as follows: stitched_John_L_Bonython_12yrs_1887-B7723_43.jpg.jpg corresponds to file:John_L_Bonython_12yrs_1887-B7723_43.jpg

The files are here: https://files.catbox.moe/nmqlbs.zip

Thanks a bunch JayCubby (talk) 18:39, 12 April 2025 (UTC)[reply]

I have uploaded them  REAL 💬   19:31, 12 April 2025 (UTC)[reply]
Thank you very much, 999real! JayCubby (talk) 21:26, 12 April 2025 (UTC)[reply]

Edit protected template

[edit]

Can somebody please take a look at my edit request for {{Created with}}? — Mikhail Ryazanov (talk) 21:09, 13 April 2025 (UTC)[reply]