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? user:Megaugust 15:42, 26 October 2021

I can replicate. Maybe try looking through Macron's category directly? Arlo James Barnes 17:21, 12 December 2021 (UTC)[reply]

Tech News: 2021-48[edit]

21:13, 29 November 2021 (UTC)

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) — Preceding unsigned comment added by Brianjd (talk • contribs) 04:24, 1 December 2021‎ (UTC)[reply]

@Brianjd: Jeff G. created the category on 1 December. Normally these categories are created by a bot, but there may have been a malfunction. De728631 (talk) 16:09, 9 December 2021 (UTC)[reply]
(Edit conflict) @Brianjd: It looks like DschwenBot usually does that, but it hasn't made any edits since October. It seems that Dschwen has already been told about this: User talk:Dschwen#DschwenBot down? --bjh21 (talk) 16:33, 9 December 2021 (UTC)[reply]

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]

I've hacked in mediawiki.storage support for that gadget, it seems to be working. AntiCompositeNumber (talk) 23:18, 8 December 2021 (UTC)[reply]
Fixed MediaWiki:Gadget-VisualFileChange.js/cfg.js as well. AntiCompositeNumber (talk) 00:33, 9 December 2021 (UTC)[reply]

Tech News: 2021-49[edit]

21:57, 6 December 2021 (UTC)

Wikidata page needs fixing - too complex for me - please help[edit]

The Wikidata page https://www.wikidata.org/wiki/Wikidata:Lists/cemetery/Czech_Republic/Ol%C5%A1any_Cemetery needs a bit of fixing so that the 'introduction' text at the top shows what the page is about; right now, it shows empty fields. This markup is way beyond my expertise - I tried to figure it out, and failed. If someone could either fix it or point me to instructions where I could fix it, I'd appreciate it. (The page seems to be OK, except for that top intro text). Thanks. Seauton (talk) 01:14, 7 December 2021 (UTC)[reply]

@Seauton: This should probably have been posted at the Wikidata Community portal, but there are probably users here who are also familiar with Wikidata; perhaps one of them can help. Brianjd (talk) 07:40, 7 December 2021 (UTC)[reply]

Help:Gadget-GlobalUsageUI[edit]

For some odd reason, the Draft namespace is not detected with this gadget, causing to show a misleading result. 1989 (talk) 08:59, 8 December 2021 (UTC)[reply]

Categorising CJK Unified Ideographs[edit]

Reposting this for prominence, which I put on Commons talk:User scripts/Invisible charaters.

Hi - I've been trying to sort out CJK Unified Ideographs, given that they've often been uploaded in quite a piecemeal state, and it makes the most sense to follow the established convention of having a category for each character, which can then be placed within other supercategories as applicable. Currently, many are just dumped in vague groupings, which makes them difficult to find at best. For example, Extension G.

It seems that the title blacklist prevents characters from Extensions E through G from being used in article titles. That makes sense given the stated issues with file uploads, but could categories please be placed on the whitelist? It would be really irritating to have inconsistent categorisation just for these. Theknightwho (talk) 02:34, 9 December 2021 (UTC)[reply]

Yug and me are experiencing the same trouble, see File talk:𡦂-order.gif. It's time to update the blacklist to the current Unicode version, 14.0. OMG, the Unicode block CJK Unified Ideographs Extension E was introduced with Unicode 8.0 in June 2015, and now we're almost 2022. Love —LiliCharlie (talk) 14:33, 10 December 2021 (UTC)[reply]
I assume it's because (most of) Extension E isn't supported in the default font, and none of Extensions F or G are. In any event, I think the blacklist should be removed for categories (if not for files). Theknightwho (talk) 14:49, 12 December 2021 (UTC)[reply]

Category Infobox says "no wikidata ID" but the Wikidata objects links to the category[edit]

I created Category:Rathaus Leutzsch some time ago and added a link to wikidata:Q48195473. I think I've done this successfully on other objects before.

The infobox on the category page still says "no wikidata ID found". Why is that?

Please mention me when replying.

--Frupa (talk) 11:58, 11 December 2021 (UTC)[reply]

@Frupa: Ich bekomme da keine Fehlermeldung. Hast Du mal versucht, Deinen Browsercache zu leeren? De728631 (talk) 15:12, 11 December 2021 (UTC)[reply]
Null edit fixed the problem. MKFI (talk) 08:11, 13 December 2021 (UTC)[reply]

✓ Done Now it works fine. --Frupa (talk) 11:28, 15 December 2021 (UTC)[reply]

Bulk removing DRs (Historical textbooks)[edit]

Hi, is there a way to bulk remove {{Delete}}s on the files in Category:Historical textbooks or works in the US National Library of Education/bad license/1925-9? They were nominated for deletion and deleted in Commons:Deletion requests/Files in Category:Historical textbooks or works in the US National Library of Education/bad license/1925-9, but then undeleted. The deletion tag linking to the closed DR is no longer valid. Thanks, -M.nelson (talk) 16:12, 11 December 2021 (UTC)[reply]

@M.nelson: Yes, bots can do it. You can ask the bot owners at Commons:Bots/Work requests. —Tacsipacsi (talk) 17:34, 11 December 2021 (UTC)[reply]
✓ Done No need for a bot. Yann (talk) 18:14, 11 December 2021 (UTC)[reply]
Thank you both -M.nelson (talk) 18:41, 11 December 2021 (UTC)[reply]

Simple file moving script, preferably Python[edit]

Is anyone aware of a simple script for renaming files across wiki pages? I ask as I contribute to OSM Wiki and we have there pretty bad file situation, involving thousands of pages where files need to be renamed (people uploaded Wikimedia Commons files under wrong licenses - I want to move existing usages to the Wikimedia Commons file name and delete downscaled local copies under bad licenses).

I found https://commons.wikimedia.org/wiki/User:Perhelion/justReplace.js ( from https://commons.wikimedia.org/wiki/Commons:File_renaming/Global_replace ) and https://bitbucket.org/magnusmanske/commons-delinquent/src/master/ but sadly it would require quite long time to get how it works.

Is anyone aware of a simpler script, preferably in Python? I am especially interested in part that parses page and renames file references (but not text that accidentally matched file name) Mateusz Konieczny (talk) 08:45, 13 December 2021 (UTC)[reply]

@Mateusz Konieczny: On Commons, User:CommonsDelinker (PHP source) does global replacements. It’s not in Python and does a ton of other things (works globally, handles Wikibase—which won’t work on OSM wiki as it assumes images are stored as CommonsMedia statements, not strings—, does logging etc.), but maybe you can simplify it to match your use case. —Tacsipacsi (talk) 08:00, 14 December 2021 (UTC)[reply]
CommonsDelinker is https://bitbucket.org/magnusmanske/commons-delinquent/src/master/ - sadly I found it already (and mentioned) and sadly on initial reading of code I even failed to find where it parses pages to replace images Mateusz Konieczny (talk) 09:56, 14 December 2021 (UTC)[reply]

Tech News: 2021-50[edit]

22:25, 13 December 2021 (UTC)

How can I figure out the file url in the upload server?[edit]

For example, in the following page: https://commons.wikimedia.org/wiki/File:En-us-comment.ogg the actual media file url states as: https://upload.wikimedia.org/wikipedia/commons/b/b3/En-us-comment.ogg the directory "b/b3" seems to be a little random -- I can't figure out how it was assigned. So I cannot generate the actual media file url, even if I know the file name En-us-comment.ogg. Anyone can help me on this? I could not find any article discussing this. — Preceding unsigned comment added by Alanguonz (talk • contribs) 13:06, 16 December 2021‎ (UTC)[reply]

@Alanguonz You should not try to build media URLs yourself, you should always ask MediaWiki for them. This is because the URL format may change in the future. Instead, use {{filepath:En-us-comment.ogg}} or mw:API:Imageinfo. If you're curious, it's the first two characters of the MD5 hash of the filename. But like I said, you should not rely on that, the URL format may change in the future. The URL format is also more complicated for multi-page formats, video, etc.) AntiCompositeNumber (talk) 18:41, 16 December 2021 (UTC)[reply]

Tool for newest files in a category or campaign[edit]

Hello! I was wondering if there is a tool to find the newest/oldest files on some category, or uploaded via some campaign. e.g. if there is a file on Category:Uploaded via Campaign:wikivacaciones2018 uploaded this year. Thank you in advance, --·×ald·es 18:12, 20 December 2021 (UTC)[reply]

@XalD: The API can return this information, e.g. 10 most recently added files or 10 least recently added files (sorted by categorization date, not upload date, but at least for campaign categories the two should mostly be the same). This is not very user-friendly, though, and I don’t know of any tool that does this in a more user-friendly way—maybe time to write a new one? Or is there one that I don’t know of? —Tacsipacsi (talk) 19:02, 20 December 2021 (UTC)[reply]
Thank you! It really helps for what I was trying to find! ·×ald·es 19:08, 20 December 2021 (UTC)[reply]

Template:Citation[edit]

Can we sync Template:Citation and Template:Citation/core with the more recent versions on en.Wikipedia, or otherwise update them with the functionality over there? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 20:36, 20 December 2021 (UTC)[reply]

Tech News: 2021-51[edit]

22:03, 20 December 2021 (UTC)