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/02 /Archive/2025/03.

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.

Category for City by year

[edit]

How do I go about creating or editing a new category for a city/town by year? For example, when viewing Category:Oshawa by year, select 2024 for example and hit 'Edit' all you can see is "CanadaYear|Oshawa|202|4" which automatically adds the bar at the top to filter by year and categories. Is there a template somewhere? PascalHD (talk) 20:46, 1 February 2025 (UTC)[reply]

@PascalHD https://commons.wikimedia.org/w/index.php?diff=992358870 . RoyZuo (talk) 20:07, 27 February 2025 (UTC)[reply]

Creator Possible error

[edit]

Unless I'm missing something, it seems that Template:Creator possible isn't properly putting things in Category:Creator templates to be created by a bot when it should be. ToxicPea (talk) 04:42, 2 February 2025 (UTC)[reply]

"Defective" files

[edit]

There's an issue with a lot of video files on Commons where, if a video file does not have metadata associated with it, it shows as "0.0s" in length. This issue's intensity can vary from the video file being watchable but not entirely technologically readable across WMF projects, to a video file not even being able to skip forward, but only play in one go.

I think this is probably some kind of bug in the Wikimedia video software. If a file was not given metadata, you can fix this by using the following FFMPEG command in your terminal. For example:

ffmpeg -i The_Crisis_\(1916\).webm -metadata title="The Crisis" -metadata year="1916" -metadata artist="Colin Campbell" -metadata genre="Drama, Historical" -metadata description="A silent historical drama film directed by Colin Campbell, based on the novel by Winston Churchill." -metadata comment="Silent film classic from 1916." -c copy The_Crisis_\(1916\)_metadata.webm

I feel like any bogus data being thrown in there should be fine. I did this for File:The Crisis (1916).webm and the issue was fixed immediately.

This issue, with "defective" files (that are in my opinion not fully defective but the software treats them as if defective) can lead to video files being dangerously deleted, such as File:Old Ironsides (1926).webm once was, before I saved it with a higher quality version. This sets a precedent for these "0.0s defective files"—of films that are often quite rare finds and may no longer exist anywhere but Commons!—to be simply speedied without notice.

I think the solution to this problem is to add to the list of Commons bots a "fix defective file bot", that simply adds some metadata to the video file (possibly based on what's in the Commons description or just random data), so that the number of files with this problem doesn't keep building up. Or, we could fix the WMF video technology, to where the backend automatically populates the metadata of a metadata-less file.

At the very least, is there a category that keeps up with files listed as "0.0s"?

Nevertheless, this is a recurring issue, and I want to see if there's some way to fix this problem quickly using a systemic method (bots, site code, etc.)? Pinging @Racconish and Yann: who have noticed video files with this kind of defectiveness before as well. SnowyCinema (talk) 16:28, 2 February 2025 (UTC)[reply]

The solution is either a solid investment of hardware, software and staff in being able to handle video decoding in a more efficient way or stop uploading video all together. This is such a recurring topic and we're just wasting resources at the moment. Sjoerd de Bruin (talk) 17:51, 2 February 2025 (UTC)[reply]

‘-i---i-’ prefix in filenames

[edit]

I happened to see the ‘-i---i-’ prefix in filenames in different contexts, so I had a look. There seem to be a lot of files where their names all start with ‘-i---i-’ and they were all uploaded using Flickr2Commons, but they are otherwise unrelated. What’s going on? Brianjd (talk) 07:11, 3 February 2025 (UTC)[reply]

Probably some bad import from the Flickr. I ocasionally rename some of these files, but it's a Sisyphean work. Some bot action would be really appreciated, e.g. renaming the files with the Description field as a filename. — Draceane talkcontrib. 09:07, 3 February 2025 (UTC)[reply]
Hello @Brianjd
If you come across such files and have a better description of what the image represents, please suggest a rename. Greetings זיו「Ziv」For love letters and other notes 04:06, 4 February 2025 (UTC)[reply]
@Ziv: I will (for files I care about enough), but that’s sort of missing the point. The question is not what to do with these filenames (we all agree they should be changed), but where they come from in the first place. Brianjd (talk) 06:39, 4 February 2025 (UTC)[reply]
I'm not sure where the precise string "-i---i-" comes from, but it usually seems to show up on untitled Flickr images, e.g. File:-i---i- (50282028261).jpg was imported from this untitled photo. It'd be nice if Flickr2Commons could be a little pushier about requiring users to enter titles for these imports. Omphalographer (talk) 00:08, 7 February 2025 (UTC)[reply]
@Omphalographer: Yes, that does seem to be it. Sometimes it is even worse: -i---i- (32552103431).jpg has no title and also has no description. Brianjd (talk) 07:44, 7 February 2025 (UTC)[reply]

Tech News: 2025-06

[edit]

MediaWiki message delivery 00:05, 4 February 2025 (UTC)[reply]

Unrealistic minimal length requirement (minimal number of characters) for file captions in East Asian languages

[edit]

if you know the cjk script, you will know that many words are just 2 characters long. spider = 蜘蛛, North America = 北米... many are even only 1 char. oranges = 橙, mountain = 山...

for all these examples, the english words can become files' english captions (string length > 5), but the kanjis cant be accepted because length < 5.

it's been many years since i filed this bug and it's still bugging me even though i rarely write cjk captions. cant imagine how annoying this is for users who write in those languages. when will this alphabet-centric problem be solved? RoyZuo (talk) 20:22, 4 February 2025 (UTC)[reply]

disappearing thumbnails for pdf/djvu files

[edit]

from all my 17 pdf uploads there are only 4 left with thumbnails at the moment. some of thumbnails disappeared in minutes after uploading, some in weeks. i had vague hopes it will be fixed by itself in time, but this magic works one-way only so far.

the issue seems to be seriously impacting the general search in "other media" tab. for example: "koltsov" or "Кольцов" search leads to "Invalid search Could not normalize image parameters for Aleksey_Vasilyevich_Koltsov_Yego_zhizn_i_sochineniya_1914.pdf" message.

attempts to search for "moskovskij zhurnal", "Московский журнал", "teleskop", "телескоп" lead to the same 'invalid search' result

while trying to search for "брюсов" i found another user affected by the same issue. the search led to "Invalid search Could not normalize image parameters for Первобытный_Брюсов_календарь_(1875).pdf" message.

some of the flies uploaded by HareGovorittKrishna with disappeared thumbnails arent ruining the search - theyre just staying invisible for it:

but some are: check lomonosov/ломоносов search.

none of the old HareGovorittKrishna's uploads are affected - so the issue mightve been started since at least november 2024.

so now my only way to upload while not ruining anything is uploading files with nonsense names, but i have a real distaste for the idea. TheyStoleMyNick (talk) 17:03, 8 February 2025 (UTC)[reply]

like a (partial) charm. thank you. theyre still invisible for the direct search though, but at least "other media" search is not ruined anymore TheyStoleMyNick (talk) 20:59, 28 February 2025 (UTC)[reply]

Fix needed for template:Extracted from

[edit]

The {{Extracted from}} template currently has a switch so that if the source file does not exist, it displays {{Extracted from deleted}} - "The source image was deleted for reasons that do not affect this image, like a derivative work which is not a part of this cropped image."

Unfortunately, this is a bit misleading - the original image might well have been deleted for a reason that also applies to the crop, eg an unlicensed image. We've discussed this on the talkpage and would like to switch this back so it just includes Category:Extracted images with broken file links rather than the template, but the template is quite complex and used 750,000 times - I don't want to break it, so would someone more confident than me be able to have a look at it? Thanks! Andrew Gray (talk) 22:31, 10 February 2025 (UTC)[reply]

Tech News: 2025-07

[edit]

MediaWiki message delivery 00:08, 11 February 2025 (UTC)[reply]

Publishing errors for days

[edit]
Seems to be a severe problem

Hi!

I recently experience several errors when publishing or uploading via Chunked Uploads (file could not be locked etc.) and sometimes, the publishing process takes a lot of time. Longer than usual. An issue that happens over years --PantheraLeo1359531 😺 (talk) 11:24, 13 February 2025 (UTC)[reply]

@PantheraLeo1359531 try checking your upload list in a new tab. my experience is that sometimes when this error "local-swift-xxxxx" shows up, the file was apparently already successfully uploaded and it seems the error could be ignored. RoyZuo (talk) 20:14, 27 February 2025 (UTC)[reply]
Ok thanks for the hint :) --PantheraLeo1359531 😺 (talk) 08:20, 28 February 2025 (UTC)[reply]

Upload not working?

[edit]

I first tried the Wikisource upload tool (upload failed) and then gave up and went to Special:Upload. I figured I'd note here that Our servers are currently under maintenance or experiencing a technical issue

Request served via cp1102 cp1102, Varnish XID 582907980 Error: 503, Backend fetch failed at Fri, 14 Feb 2025 15:51:39 GMT

Cremastra (talk) 15:55, 14 February 2025 (UTC)[reply]

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]

Template RCIN not working

[edit]

Template:RCIN is not working. I don't actually know what's wrong so unsurprisingly I could not fix it. Thanks. — Diannaa 🍁 (talk) 13:12, 17 February 2025 (UTC)[reply]

Tech News: 2025-08

[edit]

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

Language-independent anchors on file pages?

[edit]

Now, if i copy the anchor to file page, e.g. File:Test.wav#Summary, the link will fail if the person clicking it is not using english ui.

i think we should make the anchors language independent somehow, so that we can create links that jump to specific sections on file pages that work for all users.

another idea is, we keep the current anchors but add language independent ones somewhere next to them, if the current anchors based on i18n headers cannot be changed.

why such links are needed? coz sometimes file pages are long, and it is beneficial to jump to for example "summary" for all the file descriptions when i am referring specifically to them. RoyZuo (talk) 20:28, 19 February 2025 (UTC)[reply]

Don't know how this {{int:filedesc}} works but that is supposed to be at the top of the content and the anchors work for the other sections across languages... e.g. File:Test.wav?uselang=de#filehistory which is a section I find sometimes useful to link to. Prototyperspective (talk) 22:53, 19 February 2025 (UTC)[reply]
hmm, i looked at view-source:https://commons.wikimedia.org/wiki/File:Test.wav?uselang=de#filehistory . if i understand correctly, the file history html tag id remains "filehistory", but the "Summary" tag id also changes to "Beschreibung" as it is translated. RoyZuo (talk) 10:55, 21 February 2025 (UTC)[reply]
Yes, that's what I've been saying. Again, I don't know how this {{int:filedesc}} works – that's where this would be changed if doing so is needed or good. I guess HTML id tags should stay the same regardless of language so as long as nobody has a good argument against it, I'd support a request to change it albeit I currently see no need for it. These id tags can however be very useful, e.g. to screenreaders and for ways to convert pages into other formats like audio etc. Prototyperspective (talk) 13:15, 21 February 2025 (UTC)[reply]

Viewing PDFs

[edit]

I recently uploaded two PDF files. Unlike in the past, the pages are not visible via the file page, nor can they be shown within other Wikimedia projects. See my two latest uploads, as opposed to previous ones.

The issue doesn't seem to have anything to do with the size of the PDF file or the number of its pages, because this file is fairly small. Did I perhaps do something incorrect upon uploading? Dovi (talk) 12:07, 24 February 2025 (UTC)[reply]

Typically this means that mediawiki could not figure out the file's dimensions or other metadata. Sometimes this is because the file is too complicated and it takes too much time to figure out (This is correlated but not exactly equal to size of file). Other times this might mean something is wrong with the file or the metadata extraction program is broken. Sometimes errors are transient and can be fixed by doing a purge of the file page.
Looking specificly at the file file:Second Rabbinic Bible Venice 1525 Color Full.pdf, the internal wikimedia error logs have an error scripts/retrieveMetaData.sh: line 35: 86660 Killed "$PDFHANDLER_TOTEXT" file.pdf - > text, which probably indicates that extracting the text layer was taking too long. A version of the file with OCR data deleted might work (It is a bad solution though as it makes the file less useful). Bawolff (talk) 01:10, 25 February 2025 (UTC)[reply]
see comments at Commons:Help_desk#Problems_uploading - try purging the cache. -- Beardo (talk) 04:40, 25 February 2025 (UTC)[reply]

Gadget-Restore-a-lot broken

[edit]

Hi, Any why Help:Gadget-Restore-a-lot is broken? I can select files, but they are not undeleted. Yann (talk) 18:39, 24 February 2025 (UTC)[reply]

On Chrome Development Tool, I got:

"error": {
        "code": "pagecannotexist",
        "info": "Namespace doesn't allow actual pages.",
        "*": "See https://commons.wikimedia.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/> for notice of API deprecations and breaking changes."
    },
    "servedby": "mw-api-ext.codfw.main-679c98c89f-6xbcs"
}

Tech News: 2025-09

[edit]

MediaWiki message delivery 00:37, 25 February 2025 (UTC)[reply]

An unknown error occurred in storage backend "local-swift-eqiad"

[edit]

Hi, I got this error while trying to upload a big PNG file using https://commons.wikimedia.org/wiki/User:Rillke/bigChunkedUpload.js. Please see phab:T341007#10578627 for details. This occurs time to time. What's weird here is that Chrome console says something about User:The_Photographer/QICvote.js, which has nothing to do with what I am trying to do. Any idea? Yann (talk) 12:14, 25 February 2025 (UTC)[reply]

The error with QICvote is almost certainly unrelated to the upload error Bawolff (talk) 20:07, 28 February 2025 (UTC)[reply]
The error for QICvote is because User:The Photographer was renamed to User:Wilfredor. We had an issue previously where people would register the old names of renamed users, edit their js subpages to hack accounts that included those javascript files. To prevent that importing js from unregistered users no longer works. You are probably getting this error on all pages not just when you are uploading things. Bawolff (talk) 20:12, 28 February 2025 (UTC)[reply]
The error should be fixed just changing The_Photographer to Wilfredor in your user script in your Common.js Wilfredor (talk) 20:16, 28 February 2025 (UTC)[reply]

Bug: Unicode handling when undoing edits

[edit]

Special:Diff/1002157742 was an attempt to undo a previous edit. It mangled some Unicode characters that weren’t touched in the previous edit. My quick search on Phabricator didn’t find anything. Brianjd (talk) 02:18, 26 February 2025 (UTC)[reply]

I’m still not sure what is going on, but according to User talk:Lx 121#Breaking votes on Commons talk:Sexual content, the EoMagicalConversion gadget can do weird things. I can’t even figure out what that gadget is meant to do, so I’m disabling it on my account. Brianjd (talk) 05:55, 27 February 2025 (UTC)[reply]

Faulty SVG File: File:Pool in Congo.svg

[edit]

I recently come over with this faulty SVG file, which has the following error messages:

This page contains the following errors:
error on line 23 at column 71: xmlns:ns: '&#38;#38;#38;#38;#38;#38;#38;#38;#38;#38;#38;ns_sfw;' is not a valid URI
error on line 24 at column 69: xmlns:i: '&#38;#38;#38;#38;#38;#38;#38;#38;#38;#38;#38;ns_ai;' is not a valid URI
Below is a rendering of the page up to the first error.

As a result of the error, the thumbnail fails to load, and PNG previews returns "Error: Too Many Requests". However, it appears that the original file in general does show up (i.e., the coloured portion within the Congo-Brazzaville map was coloured).

Is it something similar to Commons:Village pump/Technical/Archive/2024/10#Faulty SVG File: File:Ilbe logo.svg?廣九直通車 (talk) 07:04, 27 February 2025 (UTC)[reply]

Fixed.
No, it is slightly different. The Congo SVG defined the namespaces but a subsequent tool failed to expand some XML entity definitions. Glrx (talk) 22:56, 27 February 2025 (UTC)[reply]
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. --廣九直通車 (talk) 13:02, 2 March 2025 (UTC)

Inscription template in artwork templates. Unwanted blank line.

[edit]

This question is coming as a a result of this discussion: [27] Blank lines at the wrong positions. It is suggested there that the MediaWiki Software puts in an extra blank line after the inscription type - whether you want it or not. It seems that this can only be avoided by some kind of workaround in your settings, but that is not how things should be done here. Does anybody know why the extra line is put in, and how to get rid of it? Cheers Rsteen (talk) 17:12, 27 February 2025 (UTC)[reply]

Horizontal Flip request / Mirror image request

[edit]

Need to perform Horizontal flip or Mirror image for file File:Hoysaleswara Temple (25823085874).jpg. Mirror of current image would be the correct view. Please note this is Salabhanjika 25 of 38 on the outer walls of Chennakesava temple, Belur (see the 2 and 5 barely visible at base of pedestal). Also see image File:BelurCTM 25 Bhasma Mohini Dance.jpg. VasuVR (talk, contribs) 14:21, 28 February 2025 (UTC)[reply]

Change of color in the jpg preview of a pdf

[edit]

I uploaded File:JUNO Detector with labels.pdf. The labels cannot be read because the light grey in the boxes from the pdf is a dark grey in the jpg previews. What am I supposed to do here: export the pdf to jpg on my computer and upload the jpg? Kallichore (talk) 23:55, 28 February 2025 (UTC)[reply]

Automated upload of videos to Commons

[edit]

Hi!

The Bavarian public television will provide a bunch of videos this year that is compatible with Commons. When talking together, the question was raised if there is a way of an automated upload of videos. What would be appropiate tools? Thanks :) --PantheraLeo1359531 😺 (talk) 18:53, 1 March 2025 (UTC)[reply]

Is the format uploadable? if yes, Commons:Guide to batch uploading#Tools; if not, v2c. v2c seems to have an api. dig in the talk page for other users' previous comments about v2c api. RoyZuo (talk) 20:03, 1 March 2025 (UTC)[reply]
Thanks, yes! It would be a WebM file, then :) --PantheraLeo1359531 😺 (talk) 15:30, 2 March 2025 (UTC)[reply]
@PantheraLeo1359531 btw, ZDF Terra X Redaktion their team also uploads videos. dont know if the bayern tv might have contact with them. maybe try asking how they do it? RoyZuo (talk) 16:49, 2 March 2025 (UTC)[reply]
Thank you, this is a good idea ;) --PantheraLeo1359531 😺 (talk) 17:03, 2 March 2025 (UTC)[reply]

Image Upload Error: DivisionByZeroError

[edit]

Hi, while trying to upload an image, I received the message [ea0e6881-972b-418f-9478-bc9ab3542ac2] Caught exception of type DivisionByZeroError, and the photo is not uploading. How can I fix this issue? Pragdon (talk) 13:02, 2 March 2025 (UTC)[reply]