Commons:Village pump/Technical

Shortcuts: COM:VP/T • COM:VPT

Welcome to the Village pump technical section

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; the latest archive is Commons:Village pump/Technical/Archive/2023/02.

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.

Hidden chars in titleEdit

https://commons.wikimedia.org/w/index.php?title=Category:Gulfstream_aircraft_by_orientation&action=history

there're some hidden chars in the original title. i thought they were all located before the G, but there were more in the middle. (because i tried to move it to a new name, which i copied from the 2nd char to the 2nd last char, and added G and n myself, but system still warned me new title had hidden chars.)

something should be in place to warn sysops not to create such things. (they can overwrite rules so this was created by User:Minorax.)

i found this as i was looking at https://commons.wikimedia.org/w/index.php?title=Special:AllPages&from=%E2%80%98tit+R%C9%99x&namespace=14 . it appeared between Category:⁋ and Category:€. RZuo (talk) 10:34, 29 January 2023 (UTC)Reply[reply]

and the original cat is added by {{Aircraft by facing}} as found in https://commons.wikimedia.org/w/index.php?curid=64140905 . i cant trace the root cause. RZuo (talk) 10:38, 29 January 2023 (UTC)Reply[reply]
I think the root cause is something in the Wikidata for d:Q1554299. There are lots of screwiness which is why the parent at Category:General Dynamics aircraft facing left breaks to Category:⁨󠀁󠁥󠁮GD󠁿⁩ aircraft by orientation (which I think had hidden characters) instead of going up into Category:General Dynamics aircraft. Ricky81682 (talk) 22:19, 4 February 2023 (UTC)Reply[reply]
This problem needs to be fixed by someone who knows how to fix it. I have encountered the same difficulty with Category:Fairchild aircraft facing right. Bahnfrend (talk) 12:34, 2 March 2023 (UTC)Reply[reply]

File uploads not workingEdit

When trying to upload a WEBM file, I am getting the repeated error: "An unknown error occurred in storage backend "local-swift-codfw"." Does anyone know what might be going on? PseudoSkull (talk) 16:21, 2 February 2023 (UTC)Reply[reply]

The error is specifically occurring during the "queued" moment which is after the file is uploaded to the servers. The video I was trying to upload originally came from this link: https://www.youtube.com/watch?v=1FYa0DMTTg4 PseudoSkull (talk) 18:01, 2 February 2023 (UTC)Reply[reply]
I tried changing the local file name of what I was trying to upload, so it wasn't a blacklisted title issue. @Racconish: or someone else, can a second person try uploading a webm file to Commons and see if they're encountering the same issue? PseudoSkull (talk) 20:43, 2 February 2023 (UTC)Reply[reply]
This might help. — Racconish💬 22:37, 2 February 2023 (UTC)Reply[reply]
@Racconish: I did have a lot of stashed files from the previous upload attempts, tried clearing them all and uploading again, but the same error happened. PseudoSkull (talk) 22:49, 2 February 2023 (UTC)Reply[reply]
I will give it a try to see what happens. — Racconish💬 09:55, 3 February 2023 (UTC)Reply[reply]
@Racconish: I tried it just now, 24 hours later, and the same error occurred yet again. Please let me know what happens when you try to upload a WEBM file. Thanks. PseudoSkull (talk) 12:18, 3 February 2023 (UTC)Reply[reply]
  Done, see File:Wild Horse Mesa (1925).webm. — Racconish💬 17:52, 3 February 2023 (UTC)Reply[reply]
Hello. This seems to be a more general error that has popped up in the last few days. You can experience it with png and jpg files too. In the cases where I have seen it, the upload has been completed but the error message will prompt you to try again - which does not go well, as the file is already uploaded. You can check your uploads in another window to see that it has been completed and then just abandon the page with the error message, but it is still a nuisance that should be resolved. Cheers Rsteen (talk) 04:01, 4 February 2023 (UTC)Reply[reply]
It's not just a nuisance, it's frustrating as well. First I get an upload failure (UploadStashFileException, no idea what that means), then I redo the upload, and then I get Sleutel "19tyfmmuaxgo.c0gjrd.2161193.jpg" niet gevonden in de opslag. i.e. Key <whatever> not found in storage. I don't know what it means, click hither and yon to try and fix that, and I started worrying that all the time I spent getting names, descriptions, categories etc. right is lost. Fortunately the uploads were OK after all, despite those strange messages, so I spent time trying to fix a problem that was not even there. I've seen more upload failures and stash file exceptions recently. The message "all uploads failed" when, in fact, all uploads are OK is especially misleading. Rant ends, I'm probably spoilt due to things working perfectly lately. Alex P. Kok (talk) 15:31, 6 February 2023 (UTC)Reply[reply]
  • I don't know if it is related, but I get a lot of errors today: phab:T328914, phab:T328905, phab:T328872. Yann (talk) 15:47, 6 February 2023 (UTC)Reply[reply]
  • I too have just experienced this error trying to revert my reupload here, I kept clicking upload (or whatever the blue box says) but it's as if the button wouldn't do anything so I went back to the image to see it had in fact uploaded/reverted but it never told me - it just had the error message and blue box there the whole time. Thanks, –Davey2010Talk 15:57, 6 February 2023 (UTC)Reply[reply]
Just an update: The Special:UploadWizard seems to work now. Uploading File:When a Man Loves (1927).webm worked for me today. PseudoSkull (talk) 15:17, 8 February 2023 (UTC)Reply[reply]

Issues with coordinates in Structured dataEdit

I would like to remove false coordinates of this image in "Structured data," however, I can not. Botton stays grey, not blue. This issue exists for many months, sometimes it takes seconds that botton becomes blue, sometime minutes, sometime even hours. Why??? --Orijentolog (talk) 17:35, 5 February 2023 (UTC)Reply[reply]

@Orijentolog: try my suggestion in Commons:Village_pump/Archive/2023/01#Removal of POV structured data. It is just a bandaid solution and will not fix the root cause, but it works. --HyperGaruda (talk) 20:59, 8 February 2023 (UTC)Reply[reply]
@HyperGaruda: thanks for the tip. :) Null edits don't help, neither does clock purge. But there's another solution which I found: simply revert bot which added structured data, and bot will restore them, but without wrong coords. --Orijentolog (talk) 21:10, 8 February 2023 (UTC)Reply[reply]

Tech News: 2023-06Edit

MediaWiki message delivery 10:18, 6 February 2023 (UTC)Reply[reply]

Possibility of disabling crosswiki uploads from a wikiEdit

Has any wiki disabled crosswiki uploads, so that it's not possible to upload an image to Commons while editing an article? I'm wondering if it's technically possile and if it has been done. kyykaarme (talk) 20:14, 8 February 2023 (UTC)Reply[reply]

@Kyykaarme: According to mw:Upload dialog, cross-wiki uploads can be disabled by setting $wgForeignUploadTarget to []. Looking at InitialiseSettings.php it seems that Chinese Wikipedia has done this. This was requested in phab:T208397. --bjh21 (talk) 14:38, 9 February 2023 (UTC)Reply[reply]
@Bjh21 That's very helpful, thank you! kyykaarme (talk) 17:27, 9 February 2023 (UTC)Reply[reply]

Tech News: 2023-07Edit

MediaWiki message delivery 01:46, 14 February 2023 (UTC)Reply[reply]

Find all my bad SDC filesEdit

How can I get a list of the files that I uploaded that are in Category:Pages with local camera coordinates and mismatching SDC coordinates? Or what API call would find them? Thanks.Jidanni (talk) 05:01, 15 February 2023 (UTC)Reply[reply]

you can search this: ( incategory:"Pages with local camera coordinates and mismatching SDC coordinates" insource:Jidanni ). RZuo (talk) 08:52, 15 February 2023 (UTC)Reply[reply]
Wow cool! Thanks! Jidanni (talk) 09:44, 15 February 2023 (UTC)Reply[reply]
Any way to do it via an API, to get JSON etc. instead of javascript? Thanks! Jidanni (talk) 09:44, 15 February 2023 (UTC)Reply[reply]
@Jidanni: Here's the same request in the API Sandbox and as a direct link to the JSON API. --bjh21 (talk) 11:37, 15 February 2023 (UTC)Reply[reply]

I'd appreciate some help with this template Template:Transportyear-Guatemala, which I copied straight across from Template:Transportyear-Austria in the first instance, and modified, nothing major, changing a navbox reference and replacing all instances of Austria with Guatemala. Didn't work. So went back to scratch and tried the same, copying from Template:Transportyear-Mexico, a little different in the navboxes it refers to, but same result, still not working - any help would be appreciated. Thanks, Simon Burchell (talk) 09:50, 16 February 2023 (UTC) Simon Burchell (talk) 09:27, 17 February 2023 (UTC)Reply[reply]

Ignore me, I'm being dense. Simon Burchell (talk) 09:27, 17 February 2023 (UTC)Reply[reply]

BaGLAMa 2 broken?Edit

BaGLAMa 2 doesn't currently seem to show any page view statistics, for example https://glamtools.toolforge.org/baglama2/index.html#gid=73 should show the Zentralbibliothek Solothurn statistics, but nothing is displayed? Is the tool broken? Where to report? There's no contact information on the BaGLAMa page... Zentralbibliothek Solothurn (talk) 15:35, 16 February 2023 (UTC)Reply[reply]

Seems to work again, so it probably was a temporary glitch... Zentralbibliothek Solothurn (talk) 16:50, 17 February 2023 (UTC)Reply[reply]

I didn't find which way that (not existing) cat is populated, nor what kind of maintenance it is made for. --Achim55 (talk) 17:20, 16 February 2023 (UTC)Reply[reply]

See phab:T329432, it’s currently broken but should be fixed on Wednesday. —Tacsipacsi (talk) 17:53, 19 February 2023 (UTC)Reply[reply]

regexEdit

I'm looking for a way to remove issue number from what I recently uploaded, using VisualFileChange. Tried some regex for the first time and it didn't work. Hanooz 17:26, 16 February 2023 (UTC)Reply[reply]

@Hanooz: do you mean reducing
| Date = Dawlat-e ʿAlliya-ye Iran - 1278-01-11 AH - Issue 495.pdf
for example to
| Date = {{complex date|date1=1278-01-11|era1=AH}}?
I can help you with that, if you can confirm this is the type of change you intended. --HyperGaruda (talk) 06:26, 18 February 2023 (UTC)Reply[reply]
@HyperGaruda Yes. Thank you. For all the 65 files in the subcategories of the Category:Dawlat-e ʿAlliya-ye Iran (newspaper) by year. Hanooz 06:34, 18 February 2023 (UTC)Reply[reply]
  Done, sort of. It seems like our Wikimedia software automatically "translates" 1278-01-11 AH to 11 January 1278 AH (instead of, I assume, 11 Muharram 1278 AH), at least in my display settings. That is a problem which requires fixing the template/module, but your files are otherwise good to go. --HyperGaruda (talk) 06:58, 18 February 2023 (UTC)Reply[reply]
Great. Could you please tell what was the expression that you used? Hanooz 08:14, 18 February 2023 (UTC)Reply[reply]
I used custom replace in two steps:
  1. | Date = Dawlat-e ʿAlliya-ye Iran -| Date = {{complex date|date1=
  2. /( AH.*pdf)/|era1=AH}}
Hope this helps. --HyperGaruda (talk) 10:10, 18 February 2023 (UTC)Reply[reply]
Thanks. Hanooz 11:16, 18 February 2023 (UTC)Reply[reply]

ZoomviewerEdit

Please see MediaWiki_talk:Gadget-ZoomViewer.js#add_TIFF,_also_".tif"_(2023) Enhancing999 (talk) 17:51, 16 February 2023 (UTC)Reply[reply]

Crop toolEdit

Please see Commons_talk:CropTool#White_or_transparent_instead_of_black_(added_space_in_borders) Enhancing999 (talk) 17:54, 16 February 2023 (UTC)Reply[reply]

Flickrreview bot, and its buddies, need an updateEdit

Images with flickr's public domain mark are automatically tagged with {{Remove this line and insert a public domain copyright tag instead}} and {{No license since}} tags, when uploaded.

Note: this happens even when the image in question ALREADY bears a valid {{PD-USGov}} license, as in this instance, here.

Ted Nelson said the purpose of computers is human freedom. Surely the bot can recognize when an image already has an unquestionably valid {{PD-USGov}} license?

Why can't the flickrreview bot, and all related bots, recognize when images marked with flickr's public domain mark is also licensed under an unquestionably free license?

  1. If the flickrreview bot, or any related bots, reviews an image, and the image description page contains an unquestionably free license, like {{PD-USGov-State}}, can't it avoid it skip applying {{Remove this line and insert a public domain copyright tag instead}} {{No license since}} tags?
  2. There are dozens, perhaps hundreds of very prolific, very reliable flickr uploaders, who use the public domain mark, when we think they meant {{Cc0}}. Can't the flickrreview bot, and all related bots, check a whitelist of reliable flickr uploaders, known to use the public domain mark, when we think they meant {{Cc0}}, skip applying {{Remove this line and insert a public domain copyright tag instead}} {{No license since}} tags?

Yes, this would require a fora for nominating trusted flickr uploaders to that list of Category:Trusted flickr uploaders who use public domain mark when they mean CC0, and for maintaining that list. Geo Swan (talk) 17:54, 16 February 2023 (UTC)Reply[reply]

Background:

For well over a decade, while flickr allowed its uploaders to choose a free license, they did not allow ordinary uploaders to mark an image in the public domain.

When they did allow ordinary users to mark image in the public domain, they did so in a way that confused people, including many of its long-time experienced uploaders. Their public domain mark is supposed to be used when a flickr uploader wants to upload an image taken by someone else, possibly an employee of a US Federal agency, or a photographer working so long ago the image is public domain due to age.

They provided another license, {{Cc0}}, for uploaders to place their own images in the public domain.

Unsurprisingly many people use the license option that explicitly says public domain. But the WMF got legal advice that we should consider those images marked with a public domain mark as questionable, because it relies on the human judgement of someone from outside the WMF community.

We do see flickr uploaders who knowingly apply the mark to proprietary images. But, in my experience, and I believe this is the general experience, that kind of flickrwashing is quite rare, and almost all of these images bear a public domain mark when a good faith flickr uploader was confused when uploading their own image that they had every right to license under {{Cc0}}.

The Gambia photographs taken onEdit

Each of the individual Category:Gambia photographs taken on 1992-10-31 are done by Template:Country photographs taken on template and made a redirect to the Category:The Gambia photographs taken on 1992-10-31. However, if the page is moved there or whatever, it stays as the redirect. What is the way to actually create the correct category here? This was much easier before forcing everything into Template:Country photographs taken on because I can't figure out where it is pulling things from. Ricky81682 (talk) 21:50, 17 February 2023 (UTC)Reply[reply]

Okay I think I will have to create or move the Gambia template so it gets "the Gambia" but also manually sorts in the photographs taken on by Gambia and not the Gambia. Does this seem correct? Ricky81682 (talk) 22:02, 17 February 2023 (UTC)Reply[reply]

Tech News: 2023-08Edit

MediaWiki message delivery 01:55, 21 February 2023 (UTC)Reply[reply]

What's the component behind "This page is not a content page, but a list of topics with similar names"?Edit

if you type for example [[cat:AB]] and it matches a dab page, there's this popup on top right telling users to "review link". what enables this popup? a gadget or something?

i was thinking, whether this can be adapted to notify users of cat redirects as well. RZuo (talk) 04:32, 22 February 2023 (UTC)Reply[reply]

@RZuo: It's the Disambiguator extension that does that. For category redirects, isn't there already something that fixes them when saving? Although I agree, it'd be nice if the warning happened during editing. — Sam Wilson ( TalkContribs ) … 04:40, 22 February 2023 (UTC)Reply[reply]
thx! hotcat can auto fix that. a bot is also tasked with moving file from cat redirect to the real target. but here i'm typing the cat in the source editor. RZuo (talk) 04:45, 22 February 2023 (UTC)Reply[reply]
@RZuo: Although the functionality is similar to the disambig warning, I'm not sure it should be built into that extension. Categories and redirects are both core MediaWiki features, so maybe core should handle this warning too. I can't find a relevant Phabricator ticket, should we make one? — Sam Wilson ( TalkContribs ) … 05:20, 22 February 2023 (UTC)Reply[reply]
@Samwilson i think i'll only write this idea down at com:Idea Lab instead of writing a phab task, coz Extension:Disambiguator is written by a user. i dont expect wmf to spend any resource developing a new extension for cat redirects. RZuo (talk) 10:33, 22 February 2023 (UTC)Reply[reply]

API call to find existent Talk: pages of my uploadsEdit

Let's say I have uploaded 355 files, and on five of them users have left discussions. What's the API call that will find just those five Talk pages? Sure, I know the API call to find the 355 file names, and then all I need to do is s/File/File_talk/, but that would also get the 350 non-existent talk pages. Thanks. Jidanni (talk) 07:23, 22 February 2023 (UTC)Reply[reply]

You need to find the pages and then iterate on them to check existence. Cannot be done in a single API call. – Ammarpad (talk) 10:31, 3 March 2023 (UTC)Reply[reply]

Space inserted in page titleEdit

Any ideas?--151.67.215.168 10:54, 22 February 2023 (UTC)Reply[reply]

The space is added by DiscussionTools extension as part of Talk pages projectAmmarpad (talk) 21:24, 24 February 2023 (UTC)Reply[reply]

Something is slowing down FlickreviewR 2Edit

FlickreviewR 2 (talk · contribs) is only reviewing a handful of files every few minutes or so, thus creating a huge backlog in Category:Flickr review needed. I've left a message to Zhuyifei1999 as well, but maybe someone is quicker and can fix it right away. Many thanks! Edelseider (talk) 11:28, 22 February 2023 (UTC)Reply[reply]

Pattern for naming drawingsEdit

Hi,
More drawings for the old marine engines are ready for upload. Refer to Category:Easthope_Engines.

Before uploading, a question about file names.

The existing pattern is
"Easthope" digit "HP" name drawingNumber "." extension.
For example, Easthope4HPGearCaseCover4023.jpg.

An alternative naming pattern is
"Easthope" digit "HP" drawingNumber name "." extension.
The example becomes
                     Easthope4HP4023GearCaseCover.jpg.

Question
Does anyone recognize an advantage of one naming pattern over the other? The obvious practical effect is on sort order.

Thanks, ... PeterEasthope (talk) 18:23, 24 February 2023 (UTC)Reply[reply]

Sorting could be done with sortkeys in categories if there is a need.
Following the general idea of descriptive filenames, personally, I'd have chosen:
File:Easthope 2 H.P. Engines - Gear Case Cover Plate, drawing number 4023, 1939.jpg (assuming the model is "2 H.P. Engines" and what is shown is "Gear Case Cover Plate". Year is 1939, drawing number is 4023. If had a better idea of the drawing, maybe I'd add that too.
This instead of File:Easthope4HPGearCaseCover4023.jpg. Obviously, there are many files that following schemes like the ones you plan. Enhancing999 (talk) 20:44, 24 February 2023 (UTC)Reply[reply]
Thanks for noting sortkeys. Yes the model referred to is "2 H.P. Engine".
The name you suggest has the information content of the proposal with addition of drawing number and year. Conventional abbreviations for drawing number are "Dwg", "Dwg No", "Dwg. No.", "Dwg #", and etc.
File names in MacOS and MS Windows commonly contain spaces. Nevertheless spaces can introduce difficulties for automated processing and security vulnerabilities.
https://tldp.org/HOWTO/Secure-Programs-HOWTO/file-names.html
Third bullet point, "Filenames with spaces".
camelCase is a less familiar but functional alternative.
https://en.wikipedia.org/wiki/Camel_case
Dates appear in the title block of the drawing. The year is listed with other information in Commons. How necessary is the year in the file name?
Is a compromise acceptable?
File:Easthope4HP.GearCaseCoverPlateDwg4023.jpg
or
File:Easthope4HP.GearCaseCoverPlateDwg4023.1939.jpg
PeterEasthope (talk) 19:16, 25 February 2023 (UTC)Reply[reply]
Like spaces, periods in filenames (except to indicate the file extension) can also lead to problems. In any case, so long as the file is sufficiently captioned/described, the file name pattern is not too important from a searchability point of view. --HyperGaruda (talk) 07:12, 26 February 2023 (UTC)Reply[reply]
Please give an example or cite an explanation about a period in a file name causing a problem. Thx, ... PeterEasthope (talk) 14:07, 1 March 2023 (UTC)Reply[reply]

File pages without filesEdit

Doing some cleanup I stumbled in the past several times upon file pages without files that in some cases have been caused by some unknown technical error during upload (example1, example2). If one tries to fix that by adding the missing file the given link leads to the standard upload procedure. That's bad, as one has to fill the forms again and gets the note that there is already such a file (-page). Two possible solutions:

  • During upload the file page is stored only if there is an accompanying file (filesize > 0)
  • The given upload link on a file page having (filesize = 0) is extended by adding the parameter &wpForReUpload=1 which is used for overwriting existing files (that works, I checked it adding it by hand) so that one can conveniently add the missing file.

--Achim55 (talk) 17:49, 26 February 2023 (UTC)Reply[reply]

Issue 1 is intentional. Without the current behavior, redirects like File:Untitled.gif cannot be created.
Issue 2. There were no uploads in your examples in the first (hence no reupload link). See issue 1, for why there were no uploads. These 'File' description pages were directly created, not through upload process. – Ammarpad (talk) 18:52, 26 February 2023 (UTC)Reply[reply]
They were created during upload tries by (probably misconfigured) bots. Anyway, the reupload variant of the link would be helpful. --Achim55 (talk) 18:58, 26 February 2023 (UTC)Reply[reply]
I believe the problem is there's no way to reliably differentiate fileless description pages created intentionally and ones created through botched upload. You can request to change the reupload link at phabricator. – Ammarpad (talk) 15:19, 1 March 2023 (UTC)Reply[reply]

Tech News: 2023-09Edit

MediaWiki message delivery 23:45, 27 February 2023 (UTC)Reply[reply]

Bot?Edit

Is there no bot that tags files in Category:Media uploaded without a license with {{No license since}}? If not, why isn't there? Jonteemil (talk) 22:18, 2 March 2023 (UTC)Reply[reply]

Unwanted email notificationsEdit

For example, I receive emails from SchlurcherBot even though I have turned it off in my "Global preferences > User profile > Prohibit these users from emailing me:". How can I prevent this flood of emails? F. Riedelio • 💬 07:33, 4 March 2023 (UTC)Reply[reply]

"Collapse captions" not working properlyEdit

For me, the effect of "Collapse captions" is indistinguishable from "Hide captions". Unless, of course, a means to uncollapse on a given page is hiding somewhere I don't know to look: nothing here shows what it should look like if it is working correctly. FWIW, using Monobook skin on Firefox. (Please ping me if responding, I don't watch this page.) - Jmabel ! talk 16:15, 6 March 2023 (UTC)Reply[reply]

@ 2A02:3035:C1F:5FBB:1:0:F99A:E778 18:41, 6 March 2023 (UTC)Reply[reply]

Numerals in text relating to references appear on phone but not on laptop.Edit

Dear Jmabel,

Numerals which appear in users text to drect readers to references appear in my phone but not my laptop.

Last revisions to my sandbox were made today the 6th of March and are current.

Please could you help me with this problem.

Thank you,

Flavia Epicurus65 (talk) 19:17, 6 March 2023 (UTC)Reply[reply]

Tech News: 2023-10Edit

MediaWiki message delivery 23:47, 6 March 2023 (UTC)Reply[reply]