Commons:Village pump/Technical

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

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

I'm trying to add formatting parameters to Template:Userpage (e.g. for changing the background color), but having some issues. I introduced them to Template:Userpage/layout, but I gather that I need to pass them through language variants like Template:Userpage/en to get them to be usable. But when I try to add something like

|border={{{border|}}}
|background={{{background|}}}
|extra-style={{{extra-style|}}}
|file={{{file|}}}

to the English translation, it shows in previews that undefined values are interpreted as blanks rather than just ignored. How do I get around this? Best, {{u|Sdkb}}talk 19:48, 5 December 2023 (UTC)[reply]

{{subst:bump}} {{u|Sdkb}}talk 07:27, 3 February 2024 (UTC)[reply]
{{subst:bump}} Sdkbtalk 16:39, 6 March 2024 (UTC)[reply]
it looks similar to a problem i had before. i think i was trying to call another template in a template, but the parameters somehow couldnt be properly passed. i just gave up at the end. i cant remember the details.
when a discussion has no reply for this long, chances are no one knows or is interested.
i used to go directly to en:wp:vpt even for tech problems on commons, if i feel that chances of getting a good answer is higher there. obviously i cant do that anymore due to bullshit, though. RZuo (talk) 19:28, 6 March 2024 (UTC)[reply]
take a look at https://commons.wikimedia.org/w/index.php?title=Commons:Sandbox&diff=prev&oldid=858887180 .
basically when Template:Userpage/en calls Template:Userpage/layout, if you include those new parameters, this whole thing "{{{file|}}}" is passed to Template:Userpage/layout.
i guess the answer is, you cant pass a parameter from page A to template:B and ask template:B to pass it again to template:C. i'm not sure if my analysis is correct. RZuo (talk) 11:21, 8 March 2024 (UTC)[reply]

UploadStash documentation[edit]

it'd be great if someone can write something at Commons:UploadStash about Special:UploadStash, like how long the temporary files are stored in the stash.

or maybe you can point to where the actual documentation about this is. i made it a soft redirect to where the doc is supposed to be but the target page is certainly abandoned and outdated. RZuo (talk) 10:49, 29 January 2024 (UTC)[reply]

I made a start. Is there anything in particular you think should be included? Bawolff (talk) 09:16, 22 February 2024 (UTC)[reply]
thx a lot. i was just looking for how long (48 hours). RZuo (talk) 11:16, 22 February 2024 (UTC)[reply]
Ah yes, its 48 hours, controlled by $wmgUploadStashMaxAge in InitialiseSettings.php [1]. It should be noted there is currently a bug where sometimes stash files get reported as being deleted way before it should. We think it happens when multiple mediawiki jobs try to assemble the file at the same time, and one deletes the file out from under the other one and we are working to try and fix it. Bawolff (talk) 19:42, 22 February 2024 (UTC)[reply]

Cat-a-lot does not work for categories[edit]

There seems to be a technical problem with Help:Gadget-Cat-a-lot: when I click on Preferences, click on "Allow categorising pages (including categories) that are not files", then select one or more subcategories and try to move/copy/delete them to/from another category (like I always do), nothing happens but an endless "Editing page 1 of X". Moving files is no problem. Can this be fixed? JopkeB (talk) 11:05, 16 February 2024 (UTC)[reply]

I am not the only one having troubles, see Commons:Village_pump#Cat-a-lot as well. JopkeB (talk) 13:27, 16 February 2024 (UTC)[reply]
Same for me: moving categories does not work, moving files works. --Reinhard Müller (talk) 14:49, 16 February 2024 (UTC)[reply]
I confirm that it is not working. Theklan (talk) 09:36, 24 February 2024 (UTC)[reply]
I can also confirm that it's not working for categories, although it will sometimes say that the category was moved.Smasongarrison (talk) 00:28, 27 February 2024 (UTC)[reply]
Note: If there is specific categories where problem can be replicated then please list them. (ie. fixing requires example cases) --Zache (talk) 15:58, 16 February 2024 (UTC)[reply]
I would like to copy a lot of subcategories in Category:Energy by type of energy to Category:Energy by topic‎ (all except for the 'by' categories). JopkeB (talk) 16:20, 16 February 2024 (UTC)[reply]
It was broken by a change to the HTML structure of the category pages, see phab:T355636#9553616. I hope it will be fixed by another change to the HTML structure, but if not, an interface admin should update the method getMarkedLabels() to account for the change. —Tacsipacsi (talk) 14:02, 18 February 2024 (UTC)[reply]
Same problem for me. I have posted this on MediaWiki talk:Gadget-Cat-a-lot.js but the only replies are people saying "Same problem for me". So nobody is actually looking after this? Cnbrb (talk) 23:19, 27 February 2024 (UTC)[reply]

For me moving categories was never possible with cat a lot. Always moved one by one.Paradise Chronicle (talk) 05:24, 14 March 2024 (UTC)[reply]

Help:Gadget-Cat-a-lot#Preferences. RZuo (talk) 06:31, 14 March 2024 (UTC)[reply]

Using translate tags in Lua[edit]

{{POTY/header}} has a lot of complicated logic so I'm working on implementing it in Lua at Module:POTY/header, but judging from {{POTY/header/sandbox}}, it seems the <translate> tags are being stringified too early. How can I fix this? —CalendulaAsteraceae (talkcontribs) 22:43, 21 February 2024 (UTC)[reply]

@CalendulaAsteraceae: <translate> tags are for wikitext, they cannot be used in modules. (Under the hood, the Translate extension directly manipulates the page’s wikitext content, it’s not a real parser tag, and refuses to manipulate anything that’s not wikitext, to be on the safe side.) You have basically two options:
  • Keep {{POTY/header}} (which you’d probably do anyway) and pass the translatable strings as parameters to the module. This also has the advantage that existing translations can stay where they are, no need to copy translations over (and pay attention to the attribution required by the CC license).
  • Use message bundles. This is a JSON-based format, designed for use in modules, but it’s pretty new, I couldn’t even find any useful documentation on it. (It’s mentioned at mw:Translatable modules/Technical implementation#Proposed solution: Message bundles on module subpage(s), but that page hasn’t been touched in over three years.)
By the way, Module:POTY/header is currently almost twice as big (in terms of bytes) as Template:POTY/header. Does it really make sense to reimplement it in Lua? Much of the complexity comes from HTML and translation markup – HTML is even more complicated in Lua than in wikitext, translation is impossible. —Tacsipacsi (talk) 23:24, 25 February 2024 (UTC)[reply]
Thank you! I'll try passing the translatable strings to the module and see if that's notably better than the current state of affairs. If so, great; if not, I'll either leave things as they are or investigate message bundles. —CalendulaAsteraceae (talkcontribs) 04:28, 29 February 2024 (UTC)[reply]

The current pipeline for uploading images through Flickr is completely broken.[edit]

At present, the pipeline for uploading pictures and videos through Flickr has been completely damaged. After uploading, it stays at "Submitting details…". Please repair it as soon as possible. Fumikas Sagisavas (talk) 23:27, 21 February 2024 (UTC)[reply]

The phab task https://phabricator.wikimedia.org/T358414 which seems to be the same issue was resolved yesterday. Can you if check this works for you now please? CParle (WMF) (talk) 15:02, 29 February 2024 (UTC)[reply]
@CParle (WMF): Seems to be working fine. Thanks for the fix. --Ser Amantio di Nicolao (talk) 17:57, 29 February 2024 (UTC)[reply]
Yay. -- Infrogmation of New Orleans (talk) 20:54, 29 February 2024 (UTC)[reply]

Image timeouts[edit]

Hi, during browsing I'm getting a lot of timeouts trying to load images from Wikimedia servers on en.Wikipedia and wikimedia.org. For the last few days. Any advice? It's intermittent, but when it's out it's out. Temerarius (talk) 23:08, 22 February 2024 (UTC)[reply]

All videos uploaded in the last week lack audio[edit]

Hello! All videos uploaded in the last week lack audio, despite the audio can be downloaded in the mp3 transcode. You can check this here. Theklan (talk) 14:41, 23 February 2024 (UTC)[reply]

Thank you for asking the question here, I need help too on this subject! My video , File:Wikimania - The Wikimentary - Edited.webm , does not display sound when viewing in a thumbnail; It does have the mp3 Transcode, though, and also, when I search for it in the search bar, the "preview" played does have audio with it!
Blocktomo (talk) 15:36, 24 February 2024 (UTC)[reply]

Commons mobile phone app – problems with setting author name[edit]

Hi there.

I have some problems with setting an author name to the files I upload from the Commons app I downloaded from F-Droid. I found the "Custom author name" setting, but no matter what value I try to set, I'll never get the result I want.

What I want to achieve: Link to my user page masked as my full name (like this: Jan Štěch, for example on File:Jasan u Milešic 01.jpg).

What I tried:

Any ideas what do I need to set in there?

Thanks in advance. ShadyMedic (talk) 17:21, 24 February 2024 (UTC)[reply]

@ShadyMedic: it appears that the app is automatically wrapping your entry in a user link. What happens if you submit ShadyMedic|Jan Štěch, without the brackets or User:?—Odysseus1479 (talk) 00:01, 25 February 2024 (UTC)[reply]
Hi Odysseus, thank you for your reply. I tried setting the Custom author name to ShadyMedic|Jan Štěch, result of which is another unwanted formatting, which you can see on File:Dálnice D3 – Konec u Českých Budějovic.jpg
.
Do you have any other ideas? ShadyMedic (talk) 16:47, 25 February 2024 (UTC)[reply]
Sorry, no—other than not using the setting, instead making follow-up edits to ‘pipe’ your name. Looking more carefully at the examples it seems to be just duplicating whatever you submit, which seems to me either a bug or a design flaw.—Odysseus1479 (talk) 03:27, 26 February 2024 (UTC)[reply]
Nevermind, still thanks. Just one more question: is there a tool on Commons or perhaps a bot of sorts where I can request to set the Author value of all my uploads to the desired value, so it's done automatically? ShadyMedic (talk) 08:23, 26 February 2024 (UTC)[reply]
i suggest you report this to https://github.com/commons-app/apps-android-commons/issues .
as for a manual patch after upload, you can DIY with com:vfc com:jwb etc. RZuo (talk) 08:43, 26 February 2024 (UTC)[reply]

Broken PNG[edit]

Is there any way to know what is broken about this file? It cannot display a thumb or at full or other resolution. But I cannot even download it to try to work on it locally. DMacks (talk) 22:47, 24 February 2024 (UTC)[reply]

The uploader uploaded File:Photo of a TLC plate Baclofen.tif minutes later, so my guess is that it's the same image. The Squirrel Conspiracy (talk) 23:27, 24 February 2024 (UTC)[reply]
Makes sense. DMacks (talk) 23:28, 24 February 2024 (UTC)[reply]
(Edit conflict) @DMacks: I believe that was a lossless JPEG, from a version of the standard that’s not widely supported outside of medical imaging. FWIW the original file displayed in my browser, and when downloaded could be opened in Apple Preview (but not in Adobe Photoshop).—Odysseus1479 (talk) 23:44, 24 February 2024 (UTC)[reply]
Crazy! I was also using Apple (Firefox), since I have better tools on my Mac for handling a range of situations like that, but couldn't even get as far as downloading it. Thanks for the info. DMacks (talk) 23:49, 24 February 2024 (UTC)[reply]
Safari here, fairly recent. I just tried it on a much older Mac, where it couldn’t be opened with any of Safari, Preview or GIMP. (Too late to check download-ability from there.)—Odysseus1479 (talk) 00:11, 25 February 2024 (UTC)[reply]
@Odysseus1479: I've undeleted it. Is it possible for you to download the file and save it as a different format of jpg? Alternatively, can you confirm that it's identical to File:Photo of a TLC plate Baclofen.tif? Thanks! The Squirrel Conspiracy (talk) 02:29, 25 February 2024 (UTC)[reply]
@The Squirrel Conspiracy: ✓ Done and linked to the (presumably) losslessly compressed TIFF, for anyone who cares, not that there’s any appreciable difference in quality for such a ‘fuzzy’ original. While I was at it I cropped off the white border.—Odysseus1479 (talk) 03:30, 25 February 2024 (UTC)[reply]
Awesome, thanks! The Squirrel Conspiracy (talk) 04:49, 25 February 2024 (UTC)[reply]

CommonsDelinker[edit]

Hi, CommonsDelinker is stuck since 09:06, 23 February 2024. Could someone restart it? Thanks, Yann (talk) 11:40, 26 February 2024 (UTC)[reply]

Tech News: 2024-09[edit]

MediaWiki message delivery 19:20, 26 February 2024 (UTC)[reply]

Old map does not open[edit]

While categorizing the files in Kolkata, I found that the image City of Calcutta (10403000).jpg doesn't open. I have a good internet connection and other files load properly, but this one doesn't. I suspect that it is an old map of Kolkata since it is categorized under Old maps by the Survey of India and David Rumsey Historical Map Collection. Sbb1413 (he) (talkcontribs) 11:13, 27 February 2024 (UTC)[reply]

@Sbb1413: it seems fine to me, just extremely large. It expands to well over 2 GB, and it took my browser quite a long time to display, even after having loaded it, so it’s probably overwhelming the renderer, perhaps timing out. The description & categorization seem quite apt already, but if you have specific questions about what it shows I can try and answer them based on the copy I downloaded. I could also try downsampling to a more manageable format for reference (to be uploaded separately, of course, and linked).—Odysseus1479 (talk) 20:53, 27 February 2024 (UTC)[reply]
I uploaded a version with reduced resolution and colour depth (down to 150 Mpx, losslessly compressed to 67 MB), but still a decent representation (if I say so myself). @Sbb1413: I put a link on the original page so there’s a mini-thumbnail at least.—Odysseus1479 (talk) 00:32, 5 March 2024 (UTC)[reply]
Thank you for this. I was wondering what the image was about, and I found that it is an old map of Kolkata. Sbb1413 (he) (talkcontribs) 02:44, 5 March 2024 (UTC)[reply]

Report request[edit]

Hello! Can someone please generate a list of files (ideally hyperlinked or in a gallery) that meet the following criteria:
1) The file page contains {{Remove border}}
2) The most recent upload contains the text "using CropTool"
This should allow me to quickly review requests for crop that have already been completed, as CropTool didn't remove that template during its early history. Thanks! The Squirrel Conspiracy (talk) 12:13, 1 March 2024 (UTC)[reply]

translation[edit]

hi, i want to translate the village pump and welcome in punjabi language (pa), that appears in the sidebar. Punjabi translations of these are

  1. Village Pump - ਸੱਥ
  2. Welcome - ਜੀ ਆਇਆਂ ਨੂੰ

KuldeepBurjBhalaike (Talk) 13:10, 2 March 2024 (UTC)[reply]

This relates to MediaWiki:Sidebar and its Punjabi language interface. Our Village Pump doesn't appear to have a Punjabi language variant, but COM:Welcome (See {{Lang-VP}}) has an attempted little translation at Commons:ਜੀ ਆਇਆਂ ਨੂੰ. You'd need to adopt the Village Pump at Commons:ਸੱਥ (by attempting Village Pump's Punjabi language translation), and for Welcome, I believe I have set-up the messages at MediaWiki:Welcome/pa and MediaWiki:Welcome-url/pa. It should appear on the interface. Please let me know if this helps. ─ Aafī (talk) 14:23, 2 March 2024 (UTC)[reply]
Thank you :) KuldeepBurjBhalaike (Talk) 11:39, 3 March 2024 (UTC)[reply]

Notification of discussion[edit]

Hello, Template talk:GPLv3 has had a merge discussion for a year and a bit now, and has seen little activity. Please help contribute to the discussion. Thank you, —Matrix(!) {user - talk? - contributions} 12:14, 3 March 2024 (UTC)[reply]

Tech News: 2024-10[edit]

MediaWiki message delivery 19:44, 4 March 2024 (UTC)[reply]

Automatically Counting Images in Section[edit]

Is there a way to automatically count the number of files in a page section and have it displayed somewhere on the page? I have a gallery section with a number of subsections on my userpage and for reference purposes it would be useful to have a way to know how many files are in each section without having to manually count them. –Noha307 (talk) 00:57, 5 March 2024 (UTC)[reply]

You seem to use {{Gallery}}. It’s technically possible to expand the template to support your use case, although I’m not sure if it’s worth making a template used on thousands of pages more complicated just because of one page. —Tacsipacsi (talk) 09:58, 5 March 2024 (UTC)[reply]
you could adapt w:Module:Table row counter for this. Enhancing999 (talk) 10:01, 5 March 2024 (UTC)[reply]

The 5MB bug[edit]

Last Wed I fixed a bug (phab:T350917) where files uploaded with chunked uploads would have their last chunk missing (Often called the 5MB bug because upload wizard uses 5MB chunks, so usually such files are a multiple of 5MB). This is not the first time this bug has been fixed, but I'm hopeful this fix is a bit more robust. So far no new files with this issue have been uploaded, where previously we were averaging about 2 a day. Anyhow, the reason I'm writing here is there are a bunch of files that are cut-off from before the fix went in. I'm not sure if someone wants to tell their authors, or delete them, or something. There is a list at https://quarry.wmcloud.org/query/80784# (Its possible there could be false positives on this list, but it seems like most are true positives). Bawolff (talk) 05:18, 5 March 2024 (UTC)[reply]

thx a lot for fixing it.
a few years ago such files have been added to Category:Incomplete JPG files (5 MB interruption). more recent buggy uploads over the last few years can be added to this too, ideally simultaneously with a reminder sent to their user talk pages.--RZuo (talk) 09:42, 5 March 2024 (UTC)[reply]

How to exclude redirects in search results?[edit]

https://commons.wikimedia.org/w/index.php?search=intitle:%22add+name+later%22 . i tried -insource, filesize, linksto, hastemplate. nothing works.--RZuo (talk) 09:42, 5 March 2024 (UTC)[reply]

This is a discussion on the topic that might be helpful. —CalendulaAsteraceae (talkcontribs) 21:33, 10 March 2024 (UTC)[reply]

SDC duplicator?[edit]

is there a tool to copy sdc from 1 file to another file? use is for croptool uploads like File:Meiji Chelsea Yogurt Scotch 2011.jpg. RZuo (talk) 09:47, 5 March 2024 (UTC)[reply]

Background not showing up in SVG previews[edit]

For some reason the background is not showing up correctly in SVG files I recently uploaded, e.g. File:Finnish dialect location map - southwestern dialects.svg (and 6 others). They're supposed to have the water (light blue) as the background, and it shows up correctly when I open the SVG file in my browser, but not in any of the generated previews, where it is either transparent or solid black. I think it is an issue in the SVG file, but I'm not sure what it is. — SURJECTION / T / C / L / 15:23, 10 March 2024 (UTC)[reply]

@Surjection:
The background is created with
<rect class="sea background" width="960" height="1558" rx="" ry=""/>
Which is not supplying a number for rx or ry. I removed the attributes and the sea appears.
The class information is also conflicting. The "sea" wants to be stroked, but the "background" does not.
Glrx (talk) 01:50, 11 March 2024 (UTC)[reply]

Tech News: 2024-11[edit]

MediaWiki message delivery 23:02, 11 March 2024 (UTC)[reply]

TimedText select list loss[edit]

There is no Montenegrin language (crnogorski cnr) in select language list of TimedText pages. how to fix this? ITZQing (talk) 11:02, 12 March 2024 (UTC)[reply]

you need to write on phab:. you can make one for your language like phab:T354201. RZuo (talk) 12:55, 12 March 2024 (UTC)[reply]

Lossless crop assistance[edit]

File:MartzAction41A-1-.PNG has specific cropping instructions that I have never seen before with suggestion for lossless tools. I would like assistance in cropping this into 4:3 (630px wide) and/or 3:2 (560px wide) proportions using such a tool.-TonyTheTiger (talk) 11:16, 14 March 2024 (UTC)[reply]

That file is a png, so cropping with pretty much any tool is going to be lossless. I assume that is why the template limits its recommendations for lossless tools with the note "if cropping a JPEG...". —RP88 (talk) 11:22, 14 March 2024 (UTC)[reply]
I have extracted with Photo. What do I need to do regarding the metadata to follow the instructions?-TonyTheTiger (talk) 13:13, 14 March 2024 (UTC)[reply]
I think you've already done it. Since the "copy this file metadata" link is just an edit link for the source file, I am pretty sure the template just wants to make sure you copy the contents of the {{Information}} from the source file to the new file. One quibble I would have is that the request was to "Crop to show the woman with the ball" but your cropped file shows both women. I think the goal of the requestor is to have a image of just Jennifer Martz that can be used at d:Q6178597 where it is not ambiguous as to which of the two women in the original image is Jennifer Martz. —RP88 (talk) 13:38, 14 March 2024 (UTC)[reply]
User:RP88, Notice that my crop removed a front facing teammate of Martz'. I think that would be the more important secondary subject to worry about. I think considerations of the backward facing person are less relevant.-TonyTheTiger (talk) 00:04, 15 March 2024 (UTC)[reply]

Images from Commons not being shown on Facebook[edit]

Hello. About two weeks ago Facebook seemed to stop showing images from links to Commons files. I do not know if that problem has been discussed here, but it still persists. For those of us who regularly post links in Facebook groups it is a great inconvenience, also given that all the existing links stopped showing images. Facebook obviously thinks that there is something wrong with the setup of Wikimedia Commons, but it is impossible for a common user as I to ask them what is wrong. Does anybody at Wikimedia Commons know what has changed? Cheers Rsteen (talk) 03:48, 16 March 2024 (UTC)[reply]

Tech News: 2024-12[edit]

MediaWiki message delivery 17:37, 18 March 2024 (UTC)[reply]

Logging usage of ajax quickdelete.[edit]

When using the speedy request in auditor, it generates a report in a log file, I was wondering how I could make a similar log for ajax quick delete CSD requests. Alachuckthebuck (talk) 20:15, 21 March 2024 (UTC)[reply]

"According to Exif data"[edit]

I have just discovered the According to Exif data and in the talk page, the user @Arnd had an interesting idea: to use a bot which will automatically add the EXIF data in the template. Would this be possible? Thanks, Erick Soares3 (talk) 20:12, 22 March 2024 (UTC)[reply]