Commons:Village pump/Technical/Archive/2023/04

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

Tech News: 2023-14

MediaWiki message delivery 23:37, 3 April 2023 (UTC)

Cannot upload file

I have just intended to upload bunch of files with VicunaUploader, but unfortunatelly the last one had some error. You can see, by clicking on it preview. So I try to reupload from within the Commons website, but it didnt work either, I can even not see in the file history. Juandev (talk) 15:59, 4 April 2023 (UTC)

So I can see, the problem might be with generating thumbnail, but why VU gets the information, it was not uploaded than? Juandev (talk) 05:33, 5 April 2023 (UTC)

Upload bug

I've wanted to upload a vintage file via Flickr but only file page (without file) has been created. It is surprise for me as FlickreviewR 2 still see this file. Юрий Д.К 19:14, 4 April 2023 (UTC)

I think, that something similar happened also here: File:Magyarbóly 2. vágányról.jpg -- ato (talk) 20:10, 4 April 2023 (UTC)
That looks simmillar to my post above (Cannot upload file). But if there are different links to resolutions, I wonder the file was uploaded (as the file I have reported yeasterday not to be uploaded have allready thumbnail). So that might be kind of database error or something than. Juandev (talk) 05:36, 5 April 2023 (UTC)
Same problem here (error happens not only to F2C, but also with UW). @Zde: — Draceane talkcontrib. 13:10, 5 April 2023 (UTC)
At least 3 my uploads has been fixed (as File:DAQC folder slides - 082 (52561066022).jpg - see page history), so don't nominate for deletion bad uploads. Юрий Д.К 14:07, 5 April 2023 (UTC)

Bunch deletion proposal tool

I would like a tool to propose for deletion a bunch of files collected on pages like user contributions or other queries without uploading lots of pictures (I'm in mobile internet and want to save traffic, and filling in the same line for dozens of pages is just tedious). Is there a gadget to propose something like Special:Contributions/Molost in few clicks? Ignatus (talk) 13:22, 8 April 2023 (UTC)

We already have such a tool, see Help:VisualFileChange.js. Yann (talk) 13:47, 8 April 2023 (UTC)
Thanks for the information! But for some reason I have not found the gadget in my prefs, neither a link "Perform batch task" on any page after I follow automatic installation link and reset commons browser cache. Ignatus (talk) 15:14, 8 April 2023 (UTC)
@Ignatus: Ah, yes, it looks like VFC is only available to users with the autopatrol right. You can apply for autopatrol at Commons:Requests for rights. --bjh21 (talk) 15:24, 8 April 2023 (UTC)
Thanks! I'll do. Ignatus (talk) 15:39, 8 April 2023 (UTC)

Tech News: 2023-15

MediaWiki message delivery 20:03, 10 April 2023 (UTC)

Could we have a new version of the report? --Geohakkeri (talk) 13:22, 4 April 2023 (UTC)

@Steinsplitter?Tacsipacsi (talk) 21:57, 11 April 2023 (UTC)

Strange prompt by mediasearch

Special:MediaSearch, try typing "walrus beach". it suggests "walrus Beach1". i cant find out where that comes from. afaict, it doesnt match any wikidata item or filename. :/ RZuo (talk) 18:43, 13 April 2023 (UTC)

Template:Districts of Ankara

Hi everyone. I recently created the template Districts of Ankara. This template is expected to make easier the navigating between similar categories. For example both Çankaya and Altındağ are the districts of Ankara. So, when we add this template into this category, we should see other related categories on top of the page. However, template does not run properly. I've created this template by copying the structure from Template:Cities of Turkey. Is there anyone to help me in determining the problem and then fix it? --Gargarapalvin (talk) 15:55, 14 April 2023 (UTC)

@Gargarapalvin This is where using the "all=1" parameter helps to see what it is looking for. It shows the red links. The problem is you hard-coded ":Category:Altındağ", etc. so it is looking for Category:Sculptures in :Category:Ayaş rather than Category:Sculptures in Ayaş for example. Let me try to fix it. Ricky81682 (talk) 19:50, 14 April 2023 (UTC)
Hi @Ricky81682. I had tried all possible combinations while adjusting the parameters but could not succeed.. Now, it seems that the problem has been removed. I will examine the changes you've done. I hope I will be able to code more carefully nex time. :) Thank you so much. --Gargarapalvin (talk) 22:21, 14 April 2023 (UTC)
No worries. I'm an attorney not a programmer by training but as I said, the best use is seeing what the red links are and then working backwards on the markup. At least it's all working now. Ricky81682 (talk) 02:11, 15 April 2023 (UTC)

Is there a way to see the template nesting count? We currently have Template:I18n/topic which nests into Template:I18n/place by x by y which nests into Template:Country by year by topic which is used by every country category (see Template:Lithuania by year by topic for example). It is a lot of nesting and breaks unless it works completely perfects. Ignoring the complexity of learning these silly template names and subnames, I don't understand the purpose of internationalizing every separate word as you will end up with a barrage of errors if you change the language to one that is missing a part of this for static categories but that's another issue. I suggest we move Template:topic to Template:topics and use Topic for the Topic internationalization but I figure I'd ask. Ricky81682 (talk) 20:18, 14 April 2023 (UTC)

Polona Digital Library

The Polona digital library https://polona.pl/ (by the Polish National Library) has a new version, but the old site is still available at https://polona2.pl/. Unfortunately, the bot cannot upload files directly from this domain ("copyuploadbaddomain: Uploads by URL are not allowed from this domain"). Is it possible to grant the right to upload files from the polona2.pl domain? Polona Upload (talk) 18:25, 17 April 2023 (UTC)

Tech News: 2023-16

MediaWiki message delivery 01:52, 18 April 2023 (UTC)

Lua error in Module:DateI18n

Hello. I have noticed that after adding/updating categories on some files this morning (e.g. File:Canton, Cardiff (31063416125).jpg), the summary section is being replaced by the following message: "Lua error in Module:DateI18n at line 113: attempt to index field 'data' (a nil value)."

If I attempt to edit the Summary section the wiki code looks fine but the template just doesn't display. Looking at the diffs, it doesn't seem like I have broken anything so just wondered what was going on? Thanks, BigDom (talk) 07:42, 18 April 2023 (UTC)

It happened to me last time, as every module is technically screwing up everywhere. - The Harvett Vault | he/him | user | talk - 08:03, 18 April 2023 (UTC); edited: 08:14, 18 April 2023 (UTC)
Ah OK, good to know it wasn't just me. BigDom (talk) 08:17, 18 April 2023 (UTC)
Same here. The fault was introduced around UTC 7:25. Before that, everything worked fine. Cheers --Rsteen (talk) 08:19, 18 April 2023 (UTC)
There is also a Help desk item for this error, at LUA error in all Files. Hope a fix is on the way. Cheers --Rsteen (talk) 09:16, 18 April 2023 (UTC)
Problem has been solved now. When you edit the uploads with error warnings, you get the normal template back - without doing any actual editing - you just have to save the file again. Nobody has offered any explanation of what happened, which seems a bit odd. Cheers --Rsteen (talk) 12:09, 18 April 2023 (UTC)

images api - include attribution data

wiki media pages have attribution info (author, etc.), e.g.

https://commons.wikimedia.org/wiki/File:Bracklesham_Bay_and_Selsey_-_geograph.org.uk_-_3423683.jpg

is "Bracklesham Bay and Selsey by M J Richardson"

but the image api page doesn't have it:

https://en.wikipedia.org/w/api.php?action=query&prop=pageimages&pithumbsize=500&piprop=thumbnail%7Coriginal%7Cname&format=json&titles=File:Bracklesham_Bay_and_Selsey_-_geograph.org.uk_-_3423683.jpg

Thinking about it, its inconsistent that wiki text doesn't need attribution, but wiki photos do?

Besides attribution info, a bit more doco on thumbnail sizes would be nice 89.243.99.55 10:29, 18 April 2023 (UTC)

Infobox Lua Error

The infobox of this image shows an error after I removed a question mark "Lua error in Module:DateI18n at line 113: attempt to index field 'data' (a nil value).". If I check revert it still shows the error. Can someone please fix it? -Artanisen (talk) 03:10, 19 April 2023 (UTC)

It seems to be fixed now. -Artanisen (talk) 10:22, 19 April 2023 (UTC)

Graph extension disabled

Yesterday the Wikimedia Foundation noted that in the interests of the security of our users, the Graph extension was disabled. This means that pages that were formerly displaying graphs will now display a small blank area. To help readers understand this situation, communities can now define a brief message that can be displayed to readers in place of each graph until this is resolved. That message can be defined on each wiki at MediaWiki:Graph-disabled. Wikimedia Foundation staff are looking at options available and expected timelines. For updates, follow the public Phabricator task for this issue: T334940

--MediaWiki message delivery (talk) 17:36, 19 April 2023 (UTC)

What is SDC and why does it think I'm on the other side of the world?

On File:Osprey on post, Bronx, NY.jpg, I have a message saying, "There is a discrepancy of 10358218 meters between the above coordinates and the ones stored at SDC (40°51′15″N 73°47′14″E, precision: 5 m). Please reconcile them.". What is SDC and why does it think my longitude should be E? RoySmith (talk) 19:24, 20 April 2023 (UTC)

@RoySmith SDC is Structured Data on Commons. It thought your location should be E because in the initial revision ([23]), 73.787143 was not negative. Tdorante10 fixed it in wikitext (thanks!), and I just fixed it in the structured data for you. —‍Mdaniels5757 (talk • contribs) 00:03, 21 April 2023 (UTC)
Thanks! RoySmith (talk) 01:41, 21 April 2023 (UTC)
I think STC is intended to do something good, some day. Currently what I see it doing is, it stores the first coordinates that the bot sees for the picture. When the coords are corrected in the picture page, it puts out a message saying it's different, rather than simply correct STC itself. Perhaps some day someone will make a better system for handling geocoordinates. Jim.henderson (talk) 12:38, 22 April 2023 (UTC)
I've recently started using iNaturalist. They have a great system. It puts up a little map, you zoom/pan around until you find the right location, and click. Easy peasy. Unclear why commons doesn't have something like that.
Of course, even easier would be if my fancy-schmancy camera could just include a $5 GPS chip and geotag all the images automatically. But I digress. RoySmith (talk) 13:51, 23 April 2023 (UTC)
@RoySmith: I was snapping pix yesterday in Bushwick with my old Nikon Coolpix P190 that has GPS built in. Unlike my camera phone it's only real GPS, so it isn't as quick or accurate as my camera phone, so I do a lot of pix with both. I do small adjustments mostly by transcribing the correct lat-lon from Google Earth. A few cameras are still made with this feature. Hardly any; it's regarded as a toy for casual tourists. Drat. Some cameras provide a Wi-Fi connection to your phone and use that to geotag the pictures. My experience is, it doesn't work as reliably as when the GPS is in the camera. Drat; it's part of the general idea that the camera isn't supposed to be a computer, so it only has a poor customized computer in it instead of one in which you can mix and match software.
When Wikimania was in Montreal, I sat down for lunch and started complaining, same as you did, that Commons has no easy locating tool that clicks on a map. The fellow next to me said to look at the side menu of any picture and click "Locate-tool". He talked me through the process, which was indeed easy. This is how I generally do it when the P-190 didn't get a fix. Wikidata also has a little map-picker but not as nice as the Commons Locate-tool. Maybe we need a session of the quarterly Commons Photographers Group zoomcalls, to study such matters. And of course I'll be delighted to meet you in The Bronx or elsewhere for discussion and demo. Especially if we can persuade two or three others to join us. — Preceding unsigned comment added by Jim.henderson (talk • contribs) 15:16, 23 April 2023‎ (UTC)

When rendering SVG images containing Chinese characters as PNG thumbnails, there may be garbled code issues

File:Min Kingdom, 945 v2 (zh-hans).svg is an example. When you open the origin SVG photo in the browser, the Chinese characters display normally. But in some PNG previews, the characters display abnormally. They are displayed as blocks. The other PNG previews are normal. So I think there must be some bugs in Wikimedia Commons. Shenzhiming88 (talk) 15:01, 22 April 2023 (UTC)

This is not an isolated case, my hand-written SVG image with Japanese text also suffers the similar issue, but it happens to PNG renders of certain dimension such 1624px. In both cases, purging the image description page or the glitchy PNG render does not fix it. -- Sameboat - 同舟 (talk · contri.) 09:40, 23 April 2023 (UTC)

First, purge the image page, it will tell the thumbnailer to re-do the png thumbnails. Wait several minutes, it is not going to appear right away. If that does not work, then take a look at meta:SVG_fonts#Chinese_fonts_comparison, and the chapter above that for Japaneese, it lists the fonts that the server has installed. The font specified in the Chinese file is not installed and the Japaneese one is using generic fonts - more specific font may be better. Specifying one from the "SVG fonts" page, especially for the Chineese one, will cause the thumnailer not to figure out on its own what font to use.--Snævar (talk) 12:32, 23 April 2023 (UTC)
I don't think it works in my case. I specified "VL Gothic,WenQuanYi Zen Hei" for the Japanese text and "Arimo,Liberation Sans,Helvetica,Arial,sans-serif" for the rest of Latin characters. The glitch just happens so randomly, when I made minor changes to the SVG, the Wikimedia PNG looks okay, but the next time it is completely tofu glyph. We really need the programmers to look into this in order to convince other SVG contributors to not convert text into vector path. Sameboat - 同舟 (talk · contri.) 00:50, 24 April 2023 (UTC)
OK, the programmers are at phabricator. File a bug with the tags "thumbor" and "SRE-swift-storage", your wikimedia commons account will work there. Snævar (talk) 09:47, 24 April 2023 (UTC)
Submitted Phabricator:T335271. Sameboat - 同舟 (talk · contri.) 10:30, 24 April 2023 (UTC)

Does anyone know why Template:Place by century stops at 48th century BC? Category:Africa in the 52nd century BC and Category:Africa in the 60th century BC do not show up. Ricky81682 (talk) 02:02, 24 April 2023 (UTC)

I don't know, but now that I've seen that code I feel like I should at least attempt to implement {{Place by century}} and {{Subject by century}} in Lua, and I may discover an answer to your question in the process. —CalendulaAsteraceae (talkcontribs) 02:21, 24 April 2023 (UTC)
@Ricky81682: It's because {{Subject by century}} only checks back to the 50th century BC. I'm working on fixing this. —CalendulaAsteraceae (talkcontribs) 04:23, 24 April 2023 (UTC)

Tech News: 2023-17

MediaWiki message delivery 22:01, 24 April 2023 (UTC)

Need for an additional PD-UK template

As you can see, As you can see, this copy of an engraving does have an author. The template {{PD-UK}} is no longer valid. The licensing information linked to via {{PD-UK-unknown}} indicates that this non-photo (published prior to 1 August 1989, and where the publication was not 20 years after the author's death has a copyright expiring 70 years after the author's death) is in the public domain, but there is no appropriate PD UK template available for use. I was hoping someone might make such a template. MargaretRDonald (talk) 04:21, 25 April 2023 (UTC) @MichaelMaggs:

@MargaretRDonald: I'm not clear on whether you want {{PD-old-100-expired}} ({{PD-old-auto-expired}} if you have a death year for S. Stoutshanks) or {{PD-UK-posthumous-non-photo-1996}}, but given the publication c. 1829 one of those should be appropriate. —CalendulaAsteraceae (talkcontribs) 03:46, 26 April 2023 (UTC)
@CalendulaAsteraceae: Note that publicstion is not postumous. Therefore {{PD-UK-posthumous-non-photo-1996}} is no good. Nor is {{PD-old-expired}} works but is not ideal. I would like to refer to UK copyright law and not all cases will have such clear-cut death dates. Ideally, I would like {{PD-UK-non-photo-1996}} MargaretRDonald (talk) 04:01, 26 April 2023 (UTC)

Eseentially for the many cases I expect to encounter, I do need what I asked for rather than these very general PD templates. MargaretRDonald (talk) 04:12, 26 April 2023 (UTC)

Call to discuss key workflows as part of WMF annual planning

Hello,

As you may know, the various teams at the WMF are currently in the midst of annual planning. Within the Product and Technology department specifically, there are a series of proposed Objectives and Key Results, one of which specifically talks about “moderator workflows” [WE1.3]. Representatives of teams who are working on that topic would like to hear directly from people who take responsibility for certain workflows on Commons which could be classified as “moderation”: including but not limited to processing deletions, mass categorisation, bot approvals… This is to understand better your perspectives on necessary improvements for those kinds of moderation workflow.

This call will take place on: 3rd May @15:30 UTC. For more information and to confirm participation, please visit the sign-up page

Your input during the call would be highly appreciated. But this is not the only way you can provide feedback. There are other ways to discuss and comment upon the WMF annual plan, described here, as well as on the relevant section of the OKRs document talkpage linked above.

Best regards, Udehb-WMF (talk) 09:10, 26 April 2023 (UTC)

HotCat

Hello, I wrote at HotCat's talk page last month, and it's still been a huge irritant: why does HotCat always edit conflict? Every time after I manually edit a page and then want to categorize via HotCat, an edit conflict incorrectly pops up and I have to re-do the categorization. How can it be fixed, can anyone look into it? Thank you, ɱ (talk) 01:51, 27 April 2023 (UTC)

Image Annotator

Interesting discovery at Help_talk:Image-Annotator#Out_of_service_(image_annotator). Enhancing999 (talk) 11:26, 27 April 2023 (UTC)

Test whether some strings are identical

i've been trying to add a maintenance cat to Template:Media of the day/layout to detect cases whereby pages transcluding Template:Media of the day do not match the actual file used by that motd. on a file page, the template is always used as {{Media of the day|yyyy|m|d}} . my design logic is as such:

if pagename = filename used in motd/yyyy-mm-dd then nothing

else if pagename = target of filename used in motd/yyyy-mm-dd then nothing

else insert cat.

i've run into a few problems:

  1. our module:redirect doesnt work like enwp original. it doesnt return pagename properly in some cases.
  2. problem with underscores. sometimes the filename used in motd/yyyy-mm-dd uses underscores instead of whitespaces. i dont have time to check how to solve this for now.

i'm giving up this for now because of real life urgencies. maybe someone could take it over from me. RZuo (talk) 10:07, 28 April 2023 (UTC)

SVG rendering varies based on resolution

It's solved for the discussed images (thanks to User:Glrx), but a bug mentioned at Commons:Graphic_Lab/Illustration_workshop#SVG_mystery_-_element_missing_in_some_PNG_versions (Phab:T276684, if it's the one) seems to lead png versions of SVG to vary depending on the chosen image size.

Even if the bug mentioned there isn't fixed, it would be preferable if it was made to fail consistently. Enhancing999 (talk) 11:01, 29 April 2023 (UTC)

Help with Module:Century?

I'm trying to implement {{Century}} as a Lua module, but {{Century/sandbox}} makes it clear that something's not working. Help? —CalendulaAsteraceae (talkcontribs) 03:10, 26 April 2023 (UTC)

Ah. New question, does anyone have advice on how to make my code more efficient? —CalendulaAsteraceae (talkcontribs) 05:39, 26 April 2023 (UTC)
Actually, never mind that; using Module:Formatnum directly instead of going through the template worked wonders. I would still appreciate a code review if anyone's interested. —CalendulaAsteraceae (talkcontribs) 05:46, 26 April 2023 (UTC)
Is there a better way to get a user's language than mw.getCurrentFrame():preprocess("{{Int:Lang}}")? —CalendulaAsteraceae (talkcontribs) 06:52, 26 April 2023 (UTC)
No, there is not an pure-lua way of doing int:lang. See the first comments in phab:T68051 for why, those are from developers, the rest of the bug are comments from users.--Snævar (talk) 11:31, 26 April 2023 (UTC)
@Snævar: Thank you! —CalendulaAsteraceae (talkcontribs) 23:08, 30 April 2023 (UTC)

File:Chicago-chinatown2 new.jpg

I tried to upload an improved version of File:Chicago-chinatown2 new.jpg but it errors when I do that, says the file is a png, but is listed a jpg so it refuses to let a new version be uploaded. I thought I could fix that error by having the file renamed to a png, but that was denied. What's going on with this file? Is this a bug? I'm just confused. Thanks! Nesnad (talk) 14:38, 27 April 2023 (UTC)

Files with .jpg extension should be JPEG files, and files with .png extension should be PNG files. If you have a PNG file, you can’t overwrite a JPEG file with it, because that would mean either that the old JPEG file had a .png extension (which is impossible) or that the new PNG file had a .jpg extension (which is also impossible). You can either save the improved version in JPEG and overwrite the existing image with that, or upload the PNG with a new name. —Tacsipacsi (talk) 00:54, 2 May 2023 (UTC)