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

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/2021/11.

COMMONS DISCUSSION PAGES (index)
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.

photos of Emmanuel Macron and Jesse Jackson[edit]

I searched for "Emmanuel Macron in Africa" expecting to see photos of the French president in Africa. Instead I see photos of Jesse Jackson. Can this be fixed? — Preceding unsigned comment added by Megaugust (talk • contribs) 15:42, 26 October 2021 (UTC)[reply]

MassRename files under Category:Saint Michael wooden church in Hincăuți, Edineț[edit]

Please someone with mass rename capability, replace Hiliuți with Hincăuți in all the filenames. And let me know what's a better place to ask for MassRename. Gikü (talk) 20:27, 2 November 2021 (UTC)[reply]

✓ Done Strainu (talk) 01:13, 20 November 2021 (UTC)[reply]

Link blocked by spam filter, but why?[edit]

This link:

  • http://web.archive.org/web/20211106133750/https://educatie-en-school.infonu.nl/taal/108413-groningse-taal-woorden-en-zinnen-in-de-taal-uit-het-noorden.html

was blocked by the spamfilter, which is odd as it's an educational website. So my question is, where and how can I find out why a website was blocked. As what websites are and aren't blocked usually seems completely arbitrary and no reason is ever given by the filter, perhaps it would be wise if the filter would also inform users why a website was added to the blacklist in the first place, for example is this website unreliable? Did they pay someone to put their links on Wikimedia websites? Was it added for any other reason? It just says "link blocked" and nothing more. --Donald Trung 『徵國單』 (No Fake News 💬) (WikiProject Numismatics 💴) (Articles 📚) 13:48, 6 November 2021 (UTC)[reply]

@Donald Trung It was blocked globally on Meta; see m:Spam blacklist. For their reasoning, see [1], [2], and [3]. —‍Mdaniels5757 (talk • contribs) 16:08, 6 November 2021 (UTC)[reply]

Photo display and print problem. File:180115 아육대 출근길 드림캐쳐 지유 1.jpg[edit]

Categories are well displayed and printed, but there is a problem that they are not printed in the file document and cannot be displayed.

The File History paragraph is the same phenomenon. I think we need to fix this problem on the 180115 아육대 출근길 드림캐쳐 지유 1.jpg

I hope this problem can be solved due to technical problems. Takuyakoz (talk) 11:55, 8 November 2021 (UTC)[reply]

Tech News: 2021-45[edit]

20:34, 8 November 2021 (UTC)

Kyivstar[edit]

Is it possible to set a one-year limit for this Ukrainian mobile operator due to frequent vandal photo uploads? --Jphwra (talk) 12:55, 9 November 2021 (UTC)[reply]

@Jphwra: I don’t know if it would be technically possible (there’s an upper limit on how many IP addresses can be blocked with one block), but blocking a whole operator of a country having a 40M population for a year is certainly not acceptable from a community point of view. —Tacsipacsi (talk) 16:40, 10 November 2021 (UTC)[reply]

Auto-fill not working[edit]

When I start to type Filename into the search box (File:...), the auto-fill doesn't occur. When the exact name is given, I get to the page, but entire name has to by typed. Can anyone reproduce this? — Draceane talkcontrib. 15:11, 10 November 2021 (UTC)[reply]

This is because searching for files is currently not working. Dylsss (talk) 15:48, 10 November 2021 (UTC)[reply]

Cropping to show specific subjects[edit]

Figure skating pair Wang Huidi and Jia Ziqi.

Recently I have been cropping a lot of pairs of figure skaters to show the individual skaters. For example, the only photo we have of Wang Huidi or Jia Ziqi is the one shown here. At least it was, until I cropped it twice: once to focus on Ziqi and once to focus on Huidi. Also, the skaters' Wikidata items (Q60253443 and Q60253378), and therefore the categories Jia Ziqi and Wang Huidi's infoboxes, had no images at all. This is a good example, but there are many others.

Generally, each skater has their own category and their own Wikidata item. Many photos also mention both skaters in the description. And experience has shown that purging is often necessary. Therefore, each crop generally involves the following steps:

  1. Use CropTool to crop "A and B" so that it focuses on A, appending " - A" to form the new filename.
  2. Edit the new file's description to remove the reference to "B".
  3. Edit the new file to remove the category "B".
  4. Edit the new file's structured data to add "depicts: A".
  5. Edit the Wikidata item for "A" to include the relevant image(s) (the crop, and the original image showing the pair, if not already present).
  6. Purge the category, if necessary, to verify that its infobox displays correctly.

There are some obvious opportunities for automation here. This might be easier said than done. But surely steps 4-6 can be combined into a single step? Brianjd (talk) 03:30, 11 November 2021 (UTC) edited 04:08, 11 November 2021 (UTC)[reply]

FYI: mw.wikibase.mediainfo (Lua) works now[edit]

Just leaving a quick note here that mw.wikibase.mediainfo (documented at mw:Extension:WikibaseMediaInfo/Lua) works in Lua now. (Previously, it was nil due to an obscure bug.) As far as I’m aware, nobody noticed that it was broken (or at least, nobody complained in any places that I could find), but if you want to start using e.g. mw.wikibase.mediainfo.getCaptionByLang() instead of mw.wikibase.getLabelByLang(), now you can :) --Lucas Werkmeister (WMDE) (talk) 10:54, 12 November 2021 (UTC)[reply]

Incomplete upload logs[edit]

I was trying to investigate the claim that these files were uploaded by an administrator:

So I looked in their logs. But in each case, the oldest entry (in November or December 2007) is for the upload of a new (supposedly improved) version. I have no information about the original uploads. Why is this? Brianjd (talk) 09:10, 14 November 2021 (UTC)[reply]

Related DR: Commons:Deletion requests/Files in Category:Panty lines. Yann (talk) 11:22, 14 November 2021 (UTC)[reply]

Tech News: 2021-46[edit]

22:05, 15 November 2021 (UTC)

Bot archive[edit]

Hi, Up until September 2021 CommonsMaintenanceBot used to move Commons:Deletion requests/mobile tracking to an archive page and then recreate Commons:Deletion requests/mobile tracking as a brand new page each time, That bot has since been indeffed page blocked,
Do we have any bots that do the same or similar tasks ?, If not then should I add everything from the Mizsabot config so instead of moving the page it would just archive it?,
Archiving isn't my forte so apologies if this seems a stupid question - I just don't really know the best way forward with dealing with the backlog at that page, Thanks, –Davey2010Talk 00:38, 18 November 2021 (UTC)[reply]

Do we know what happened to the bot? The easiest would be if the bot simply continued to work, in case it’s possible. If it’s not possible for some reason, I have a Pywikibot-based bot that does roughly the same task, which could be generalized and reused. (But we need to get someone who’s willing to run it, as I don’t have—and don’t want to have—a bot account myself.) —Tacsipacsi (talk) 13:19, 18 November 2021 (UTC)[reply]
Ah sorry Tacsipacsi just realised it was page-blocked not actually indeffed (probably worth a visit to Specsavers :P), Sadly I don't know the first thing about running a bot so not something I could help with either, Thanks, –Davey2010Talk 20:16, 18 November 2021 (UTC)[reply]
Even an indefinite (total) block would not mean that we need to look for another solution—bots can be blocked indefinitely any time if, and as long as, they’re malfunctioning; when the bug is fixed, such blocks can be removed. If we don’t know why the bot has stopped (which was by the way well over a year after it was partially blocked, so it almost certainly has nothing to do with the block), let’s ask the bot owner. Maybe it’s m:HTTPS/2021 Let's Encrypt root expiry? The cert expiry at 14:01 UTC, 30 September seems to coincide with the last bot edit at 03:17 UTC, 30 September. —Tacsipacsi (talk) 00:26, 19 November 2021 (UTC)[reply]

Exif search?[edit]

Hi there, is there a way to search in the EXIF data? I noticed several Google street view images and all have the same horizontal and vertical reolution in exif. I would be interested if there is a way to find all images with that data, so we can check them. The data I see:

  • Horizontal resolution 37.8 dpc
  • Vertical resolution 37.8 dpc

Thanks!--Strainu (talk) 22:28, 19 November 2021 (UTC)[reply]

@Strainu: The Exif data aren't stored in a way that makes them easy to search, but I've knocked up a crude Quarry search that seems to find files with that resolution: https://quarry.wmcloud.org/query/59965. Unfortunately, it seems to match an awful lot of non-Google images, so it's probably not very helpful. --bjh21 (talk) 02:07, 20 November 2021 (UTC)[reply]

Unable to use Hotcat/Cat-a-lot or manual category editing for batch loaded files.[edit]

As the thread title, using File:Motore aeronautico - Museo scienza tecnologia Milano 02330 dia.jpg as an example there are no plus or minus signs to edit Category:Air transport collection in the Museo Nazionale della Scienza e della Tecnologia (Milan), manual editing of the file page reveals that this category is hidden. I have worked out that this category has been hard coded inside a template (Template:ICCD TRC) that was used in a batch upload of 5,400 images from the museum.

I have e-mailed and messaged the uploader (via wiki:it) but no response so far. I have searched various help page archives but didn't find any reference to this problem. Is it something I can work round with a particular user right, user syntaxhighlightference, gadget or any other practical method? I have screenshots of the template source fields that are causing the problem if needed. Many thanks. Nimbus227 (talk) 13:21, 20 November 2021 (UTC)[reply]

@Nimbus227: Sorry, but what exactly do you want us/yourself to do with that category? Delete it (from the file)? Rename it? Please specify. NguoiDungKhongDinhDanh Name me 17:56, 20 November 2021 (UTC)[reply]
I want to remove the category from the file (and many others), thanks. Nimbus227 (talk) 18:20, 20 November 2021 (UTC)[reply]
@Nimbus227: AFAIK, there are two ways:
  • Removing the template: This is the shorter way, and will not cause any "collateral damage". However, you may need to re-add informations originally provided by the template manually.
  • Tweak the code: More complex, but all other informations stay. I highly recommend not using this way, since the change itself can be considered "breaking change".
NguoiDungKhongDinhDanh Name me 20:19, 20 November 2021 (UTC)[reply]
I can edit the template in each file, the parameters |CTA= and |CTC= are driving the category but that would take forever. I apsyntaxhighlightciate that some categories need to be hidden for good reasons but this category is not one of them. Is it possible to null this feature of the template now the images have been uploaded and categories assigned? Thanks Nimbus227 (talk) 20:28, 20 November 2021 (UTC)[reply]
@Nimbus227: Now I see sunlight. Do you know COM:VFC? Try using it (with regex) to change whatever you want. NguoiDungKhongDinhDanh Name me 20:34, 20 November 2021 (UTC)[reply]
I'm not familiar with that but I will read through the instructions and try it, thanks. Nimbus227 (talk) 20:37, 20 November 2021 (UTC)[reply]
@Nimbus227: If you can just explain what you want to change (I don't speak Italian unfortunately), I can help you with editing. NguoiDungKhongDinhDanh Name me 20:40, 20 November 2021 (UTC)[reply]

My Italian is not very good either! The text 'Trasporti via aria' appears twice in the template code on each image file, in the ICCD TRC template there is code at the bottom that uses this text to produce the English language Category:Air transport collection in the Museo Nazionale della Scienza e della Tecnologia (Milan). I don't want to remove this category completely but if that's the only way then I can re-categorise all the images the museum uploaded as they are in a hidden cat.Nimbus227 (talk) 20:49, 20 November 2021 (UTC)[reply]

@Nimbus227: It seems that "Trasporti via aria" means "Transported via air". I can explain the code:

{{#if:{{{CTA|}}} <!-- If CTA param has a non-blank value, then add a category based on its value. -->
|[[Category:{{#switch: {{{CTA|}}}
...
| Trasporti via acqua = Water transport <!-- If CTA's value is equal to "Trasporti via acqua", output "Water transport" -->
| Trasporti via aria = Air transport <!-- If CTA's value is equal to "Trasporti via aria", output "Air transport" -->
| Trasporti via terra = Ground transport <!-- If CTA's value is equal to "Trasporti via terra", output "Ground transport" -->
...
}} collection in the Museo Nazionale della Scienza e della Tecnologia (Milan)]]|}} <!-- The rest of the first category. -->
....
{{#ifeq: {{{CTC|}}}| Trasporti via acqua | [[Category:Water transport collection in the Museo Nazionale della Scienza e della Tecnologia (Milan)]]}}
<!-- If CTA's value is equal to "Trasporti via aria", output "[[Category:Water transport collection...]]" -->
{{#ifeq: {{{CTC|}}}| Trasporti via aria | [[Category:Air transport collection in the Museo Nazionale della Scienza e della Tecnologia (Milan)]]}}
<!-- If CTA's value is equal to "Trasporti via aria", output "[[Category:Air transport collection...]]" -->

In short, all you need to do is give {{{CTA}}} and {{{CTC}}} a value (blank if you want to get rid of those cats). NguoiDungKhongDinhDanh Name me 21:23, 20 November 2021 (UTC)[reply]

Yes, thanks, it has worked on the first file in this thread, I asked VFC to find Trasporti via aria and replace it with nothing. Nimbus227 (talk) 21:27, 20 November 2021 (UTC)[reply]
VFC is doing what I need, many thanks. Nimbus227 (talk) 21:42, 20 November 2021 (UTC)[reply]

Wrong Wikidata id linked to category[edit]

At the time of writing this, the Wikidata infobox in Category:Backhoe loaders is using the wrong qid despite the Wikidata item being correct. I have purged and null-edited the category and even changed the WD sitelink from the gallery page to category.

/ Autom (talk) 07:17, 21 November 2021 (UTC)[reply]

The Wikidata link in the left-side panel is correct, though ... / Autom (talk) 07:19, 21 November 2021 (UTC)[reply]
@Autom: I saw backhoe loader (Q913743) in the infobox, and Yair rand's WI says "Wikidata item not found" (there's nothing on my left-side panel either). Would you mind explaning further what you see? NguoiDungKhongDinhDanh Name me 08:40, 21 November 2021 (UTC)[reply]
@NguoiDungKhongDinhDanh: Now I also see "Wikidata item not found", but when I wrote the above it showed the data of Q948917. Left panel link has disappeared now. / Autom (talk) 13:04, 21 November 2021 (UTC)[reply]
@Autom: The infobox's gone now. No Wikidata -> no infobox. I re-added Category:Backhoe loaders to backhoe loader (Q913743). Is that what you need? NguoiDungKhongDinhDanh Name me 13:13, 21 November 2021 (UTC)[reply]
@Autom @NguoiDungKhongDinhDanh I see d:Q913743 in both the "Wikidata item" link on the side and the infobox. So it all looks correct to me. Brianjd (talk) 13:18, 21 November 2021 (UTC)[reply]
Me too. That means linking to backhoe loader (Q913743) works. NguoiDungKhongDinhDanh Name me 13:20, 21 November 2021 (UTC)[reply]
@NguoiDungKhongDinhDanh and Brianjd: Yes, the result on Commons is now what I expected after my edits this morning, so the main issues was then due to slow propagation of the changes on Wikidata. I had the the items on Wikidata linked as they are now for 1 hour and 23 minutes, without the changes coming into effect on Commons.
I also thought the presence of Commons category (P373) would suffice to link the (category) page to an item, but that doesn't seem to be the case. I might have confused it with how it works on SVWP or maybe it doesn't work when the gallery is set as the site link. If that is how it works it might be a good idea to change it since many items have the gallery site linked instead of the category and Wikidata Infobox only is for categories.
/ Autom (talk) 13:42, 21 November 2021 (UTC)[reply]
P373 does not and will not suffice for this infobox: properties are one-way for on-wiki Lua modules—we can query the property’s value if we know the item ID, but we can’t find the item based on the property value. (The Swedish Wikipedia probably wants to query it in the “right” direction, so it works.) Only sitelinks can be queried the other way round. What can be done is creating a new item for the Commons category and creating two-way relation between Q913743 and the new category item using topic's main category (P910)/category's main topic (P301). This way the infobox can find the category item based on the sitelink, and then follow P301 to find the actual concept item (and it does so). —Tacsipacsi (talk) 23:27, 21 November 2021 (UTC)[reply]

Tech News: 2021-47[edit]

20:00, 22 November 2021 (UTC)

A slightly more sophisticated search?[edit]

Don't know if this has been covered before, but here goes: Some users spend a lot of time traversing the vast expanses of the category system. This is usually conducted via the "Go Box" in the right upper corner, and starts with the user having to write "Category:" and then some text, hoping for a meaningful autofill. Would it not be nice if we did not have to write "Category:" every single time? What if there was a small "C" icon (or similar) that would do the job? I know you can write "c:" and the category name, but then there is no autofill, so it usually does not save time, and a dedicated icon would be preferable. If there are other possible shortcuts, please tell. Cheers --Rsteen (talk) 12:07, 23 November 2021 (UTC)[reply]

CAT: is an “official” shortcut for Category:, defined in the software. This means, among other things, that if you use CAT: (or cat:, capitalization doesn’t matter) in the search box, you’ll get autocomplete. —Tacsipacsi (talk) 17:09, 23 November 2021 (UTC)[reply]
Thanks Tacsipacsi, that does make the searches go smoother. Cheers Rsteen (talk) 05:09, 24 November 2021 (UTC)[reply]

Tech News: 2021-48[edit]

21:13, 29 November 2021 (UTC)

Cannot delete file[edit]

I want to delete File:Fo-byen(Arhus, Taani).jpg (accd. to Commons:Deletion requests/File:Fo-byen(Arhus, Taani).jpg), but get an error message every time I try: „Fehler bei Datei-Löschung: In der Datenbank „local-multiwrite“ ist ein unbekannter Fehler aufgetreten.“ (Error when deleting file: Unknown error in database “local-multiwrite”). Is this a known bug? Are there any workarounds? --Rosenzweig τ 21:18, 30 November 2021 (UTC)[reply]

When trying to delete from the DR, the following error message appears: “DelReqHandler API request failed (internal_api_error_DBUnexpectedError): [a08c8fcf-cc6d-4dc2-804f-e1eb9551bf49] Caught exception of type Wikimedia\Rdbms\DBUnexpectedError”. --Rosenzweig τ 08:21, 1 December 2021 (UTC)[reply]
You can try revdel it instead while waiting for T244567 (been opening for nearly two years, no sign of progressing recently). NguoiDungKhongDinhDanh 17:52, 1 December 2021 (UTC)[reply]
I was able to delete one image version, but not the first two versions (same error message). Thank you for your reply. Regards --Rosenzweig τ 09:44, 2 December 2021 (UTC)[reply]

Non-existent category Deletion requests December 2021[edit]

I nominated a file for deletion using the "Nominate for deletion" command on the side, and the file was placed into this non-existent category. Should it exist? Whose job is it to create it? 04:24, 1 December 2021 (UTC)

Watchlist notices[edit]

I happen to have Commons:Administrators/Requests on my watchlist, and through this, I learned of a new request for adminship (don't get too excited: it's headed for a snow-close). I used to learn of these requests through watchlist notices. What happened to these notices? Brianjd (talk) 12:45, 2 December 2021 (UTC)[reply]

The user requested a watchlist notice here but it hasn't been actioned yet. From Hill To Shore (talk) 17:24, 2 December 2021 (UTC)[reply]

Removal of jquery.jStorage imminent; the default WatchlistNotice gadget is affected[edit]

Hey all,

I've noticed that the "WatchlistNotice" gadget is using (on MediaWiki:Gadget-WatchlistNotice.core.js) the old jquery.jStorage module, which has been deprecated for over five years and is being removed in next week's train. Switching over to mediawiki.storage is pretty trivial, but someone will probably want to do that pretty swiftly. (I'm not going to fix it as that'd cross the streams a bit, and personal-me isn't an IAdmin here AFAICR.) Jdforrester (WMF) (talk) 18:44, 3 December 2021 (UTC)[reply]