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/2023/11 /Archive/2023/12.

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.

Request to add Tai Ahom Unicode to Commons[edit]

Moved to MediaWiki_talk:Titleblacklist#Whitelist Tai Ahom alphabet

Captions migration[edit]

some files might have captions in the langcode zh-yue. they should be migrated to langcode yue.

how to find all the zh-yue captions?--RZuo (talk) 12:36, 28 October 2023 (UTC)Reply[reply]

the task was refused to be fixed, and closed.
i'm done reporting the problem. i dont care about the mess.--RZuo (talk) 19:11, 18 November 2023 (UTC)Reply[reply]

悉請熟悉過濾器的人協助[edit]

正如User_talk:そらみみ#您好所述,過濾器對於道路相關的分類是非常敏感,造成顯示紅色訊息:An automated filter has identified this edit as potentially unconstructive, and it has been disallowed. If this edit is constructive, please report this error. 然而,照片確實是有顯示道路標誌或道路有關的標示牌,若是因為過濾器問題而阻止添加分類,可能會給讀者找尋照片時,錯失可以使用的照片。有鑑於此,悉請熟悉過濾器的人協助,看能否更改設定或修復故障。謝謝。--125.230.90.21 14:52, 5 November 2023 (UTC)Reply[reply]

一張圖片不能編輯而已,算了吧。除非有更多的疑似誤判,否則編輯過濾器並非必須修改。 RZuo (talk) 15:11, 5 November 2023 (UTC)Reply[reply]
不是一張,而是很多張。因為只要是照片有拍攝到道路相關的標示牌及標誌,甚至是圓環設施,所有的分類都會被過濾器給阻擋。這些分類僅止於道路相關的分類,比如圓環夜景、禁止標誌、道路龍門架,而且還有更多分類,未能一一列舉,我已經算不清被擋了多少個分類。我只能說太多照片會受到影響。可是,按照そらみみ回答來看,似乎只有非註冊帳號的IP才會受到阻擋。此外,我連照片名稱寫在這裡也會受到過濾器阻擋 (使用維基file連結會被阻擋),包含User_talk:そらみみ也是會被阻擋。因此,我懷疑是過濾器有問題。--125.230.90.21 18:08, 5 November 2023 (UTC)Reply[reply]
RZuo,你可以前往Special:Contributions/125.230.90.21查看,我對照片是如何添加分類,如此就能清楚知道我反映的過濾器問題是否屬實。--125.230.90.21 18:13, 5 November 2023 (UTC)Reply[reply]
上次圓環是在這張照片遇到,我是取最後一次編輯給你看。關於更多的編輯,可以前往Special:Contributions/125.230.87.246查看。--125.230.90.21 18:19, 5 November 2023 (UTC)Reply[reply]

有沒有人可以幫忙?我又被過濾器阻擋了。「國六埔里端.jpg」這張照片不能添加道路有關的分類。--125.230.90.219 18:26, 14 November 2023 (UTC)Reply[reply]

大哥注册个号吧,IP用户的编辑确实是很受限制,达到编辑数量成了确认用户就会好很多。 Whisper of the heart 19:02, 29 November 2023 (UTC)Reply[reply]

Mobile-frontend-return-to-page[edit]

this seems to be a system message, from https://translatewiki.net/wiki/Special:PrefixIndex/MediaWiki:Mobile-frontend-return-to-page . somehow it's not displaying correctly anymore, as you can see if you use MediaWiki:Gadget-Cat-a-lot.js or MediaWiki:Gadget-Restore-a-lot.js. anyone knows why and how to fix it? or if we can find another system message to put in place of this? RZuo (talk) 08:34, 12 November 2023 (UTC)Reply[reply]

@RZuo: Until the issue is resolved at Translatewiki I have locally forced an English language version for the while. I cannot see that we have made any changes locally to have made a difference, so wondering whether there has been a change over there. (said without particularly looking) I would suggest lodging a phabricator: request to see if someone can look and resolved as it would seem that the connection between here and there has been terminated, and possibly due to system code changes.  — billinghurst sDrewth 09:19, 17 November 2023 (UTC)Reply[reply]

Tech News: 2023-46[edit]

MediaWiki message delivery 23:49, 13 November 2023 (UTC)Reply[reply]

Flickr2Commons[edit]

F2C stucking to "Loading..." when I just open the tool. Only I have the problem? Юрий Д.К 22:14, 15 November 2023 (UTC)Reply[reply]

i had the same problem a few days ago. but now the tool shows up normally for me. i didnt make any special attempts in between to get it work.--RZuo (talk) 19:11, 18 November 2023 (UTC)Reply[reply]

Missing Full Name Attribution Option in Photo Upload Form[edit]

In the new photo upload form, there is a missing option to enter one's own first and last name. I publish photos under the Creative Commons 4.0 Attribution license. I should have the ability to specify how I am credited under these photos. I, Jakub Hałun, am the author of these photographs, not 'jakubhal,' which is a technical and arbitrary account name for me. ---- Jakubhal 14:08, 18 November 2023 (UTC)Reply[reply]

@User:Sannita_(WMF).--RZuo (talk) 19:11, 18 November 2023 (UTC)Reply[reply]
I completely agree that you should be able to state how you wish to be attributed. @Jakubhal: may I assume that you know you can do any of the following as a workaround:
  • Add the "author" parameter to {{Self}} immediately after uploading.
  • Use VFC to mass-modify your uploads and place the "author" parameter into {{Self}} on any number of your recent uploads.
  • Use the file page one of your existing uploads as a basis to copy-paste, and use Special:Upload instead of Special:UploadWizard for your uploads (which is what I do). - Jmabel ! talk 19:13, 18 November 2023 (UTC)Reply[reply]
Special:Preferences#mw-prefsection-uploads is better. RZuo (talk) 21:16, 18 November 2023 (UTC)Reply[reply]
Thank you very much. The preference setting works. As for VFC, I have already fixed existing uploads, but I will install it and try it in the future. Thanks also for that tip. -- Jakubhal 09:16, 19 November 2023 (UTC)Reply[reply]
@User:Udehb-WMF. RZuo (talk) 12:36, 19 November 2023 (UTC)Reply[reply]
Thank you, @RZuo for call my attention to this, I will bring this up to the team. Udehb-WMF (talk) 09:11, 20 November 2023 (UTC)Reply[reply]
Would definitely like to re-iterate that removing this option from the Upload Wizard is a big setback. I always change my attribution to my real name and am frustrated to have to manually change it after the upload. Thanks, IagoQnsi (talk) 08:10, 3 December 2023 (UTC)Reply[reply]

File:North Dawu Mountain - Goat.jpg Conflict between Modules[edit]

The two modules en and WDPA are interacting strangely in the Description of File:North Dawu Mountain - Goat.jpg causing WDPA to be kind of splayed as code. Geographyinitiative (talk) 17:15, 19 November 2023 (UTC)Reply[reply]

{{WDPA}} is based on a table, which cannot be used anywhere. For example, it cannot be used in {{En}}. But it doesn’t need to be used in {{En}} either, since it’s an internationalized template on its own, so I just removed the unnecessary wrapping. —Tacsipacsi (talk) 21:38, 19 November 2023 (UTC)Reply[reply]

Another SVG bug?[edit]

File:Full Adder using reversible Fredkin gates.svg is now rendered with a very incorrectly sized font (for the brace). It appeared correctly in the article until I've edited it slightly (to change the styles of some other text elements), which wasn't expected to affect the currently broken part. But now even for that old version the thumbnail in the file history looks wrong. The file itself seems to be correct, as it passes the W3C SVG validator without any issues and is also rendered as expected when opened directly in browsers or Inkscape.

@Glrx: does this problem look familiar? Can it be circumvented easily, if nobody is going to repair the render despite its many problems? — Mikhail Ryazanov (talk) 23:05, 19 November 2023 (UTC)Reply[reply]

Seems like phab:T43425 which would be fixed with https://gerrit.wikimedia.org/r/c/operations/software/thumbor-plugins/+/920760 . Follow both links for updates. For an hotfix, you could change the file so all css font values have quotations. Snævar (talk) 07:23, 20 November 2023 (UTC)Reply[reply]
That bug report is about "the 'font' property", not really mentioning specifying font-family and font-size separately. I've tried quoting the font-family values, and it didn't help. (Quoting font-size breaks local rendering and, I suppose, is not valid.) — Mikhail Ryazanov (talk) 07:43, 20 November 2023 (UTC)Reply[reply]
I do not recall seeing this problem.
An absolute font-size is set with CSS for an outer group. The font-size for all text elements are set with CSS to a relative em value. I changed the CSS to specify an absolute font-size in pixels.
I also added a generic font fallback.
Glrx (talk) 19:35, 20 November 2023 (UTC)Reply[reply]
Thanks! BTW, I've checked (locally) that rsvg-convert version 2.54.7 renders this file (as is was, with relative font sizes) correctly, so it's probably indeed a bug in the currently deployed outdated rsvg. Do I understand correctly that Wikimedia is finally going to do an upgrade soon? Could you please then check that this bug isn't present in the rsvg version that will be used? — Mikhail Ryazanov (talk) 21:17, 20 November 2023 (UTC)Reply[reply]
I do not know what to say.
WMF should upgrade rsvg, but I do not know its plans.
The technical side. My understanding of containers says upgrading Ubuntu's rsvg from 2.44.10 to a recent version should be simple. The code to make Thumbor handle the accept language command line argument correctly is simple. The management/political side. I do not have a clue.
Glrx (talk) 18:16, 21 November 2023 (UTC)Reply[reply]

Tech News: 2023-47[edit]

MediaWiki message delivery 00:52, 21 November 2023 (UTC)Reply[reply]

Tech News: 2023-48[edit]

MediaWiki message delivery 23:06, 27 November 2023 (UTC)Reply[reply]

Problem with SVG map[edit]

In File:Visa policy of Benin.svg and File:Visa policy of the Philippines.svg, Hong Kong and Macau have different colors from Mainland China. However, the colors of HK and MO display the same color as Mainland CN at thumbnails. How to solve this problem? Thanks!--Whisper of the heart 18:55, 29 November 2023 (UTC)Reply[reply]

How would I go about writing a script that affects video?[edit]

Hi, I asked this question at the help desk, and a user suggested I ask questions here in the future.

How would i go about writing a script that affects the video that appears when you click on a video to play it? Like make it so the time display at the bottom left corner also shows the milliseconds? insne (talk) 16:53, 30 November 2023 (UTC)Reply[reply]

App not working?[edit]

I'm getting a generic "upload failed" error message when I try to use the Commons Android app. Persists across multiple files and attempts. Is this a frequent or known issue? {{u|Sdkb}}talk 22:48, 30 November 2023 (UTC)Reply[reply]

if no one else answers you here promptly, you might wanna try https://github.com/commons-app/apps-android-commons/issues .
i dont use the app so i dont have an answer. RZuo (talk) 08:36, 1 December 2023 (UTC)Reply[reply]

TimedText[edit]

Where do I find the "Select language and press the Go button"? I'd like a warning to be added because we had a lot of badly machine-translated content. --Achim55 (talk) 11:18, 2 December 2023 (UTC)Reply[reply]

@Achim55: The text is from MediaWiki:Timedmedia-subtitle-new-desc. PrimeHunter (talk) 21:13, 4 December 2023 (UTC)Reply[reply]
PrimeHunter, great, thank you! An 'insource' search doesn't find it: [17], that's why I asked here. Strange. That page indeed reads "Select language and press the Go button", but if you click 'edit' you'll get "Wikimedia Commons does not currently have a system message called Timedmedia-subtitle-new-desc." --Achim55 (talk) 21:34, 4 December 2023 (UTC)Reply[reply]
@Achim55: It shows the default value of an interface message in the MediaWiki software. Commons can customize it by saving a page there. See more at mw:Help:System message or w:Help:MediaWiki namespace. MediaWiki defaults like this are not included in search results. If Commons creates a customized message then it will be included. Here is a page with 25000+ current MediaWiki messages: https://commons.wikimedia.org/w/api.php?action=query&meta=allmessages&amlang=en. It can be searched with a browser, using Ctrl+f in Windows browsers. I keep an offline copy on my PC. PrimeHunter (talk) 23:14, 4 December 2023 (UTC)Reply[reply]

Grid Engine shutdown[edit]

For those that didn't see it at en:Wikipedia:Village pump (technical)#Toolforge Grid Engine shutdown, per https://lists.wikimedia.org/hyperkitty/list/wikitech-l@lists.wikimedia.org/thread/VIWWQKMSQO2ED3TVUR7KPPWRTOBYBVOA/, Toolforge will begin shutting down the Grid Engine on December 14th. There are a large number of tools (CropTool is the one that stuck out at me the most) listed at https://grid-deprecation.toolforge.org/ that will stop working at that time. Ahecht (TALK
PAGE
) 16:16, 2 December 2023 (UTC)Reply[reply]

And on the subject of CropTool, if someone has the time to try to get it working on Kubernetes (since the current maintainer is inactive), I'd suggest starting with the version from August 2020 before code refactoring that broke lossless cropping and TIFF, PDF, and DJVU support. Ahecht (TALK
PAGE
) 16:27, 2 December 2023 (UTC)Reply[reply]
oh no, also User:Steinsplitter's bot, https://grid-deprecation.toolforge.org/t/sbot . RZuo (talk) 06:11, 3 December 2023 (UTC)Reply[reply]
Oof, that list is a lot longer than I had hoped for.... Luckily a good portion seems to be webservers, which should be pretty easy to restart in Kubernetes most of the time, but still, that's a lot of bots that have not been updated yet. —TheDJ (talkcontribs) 15:11, 4 December 2023 (UTC)Reply[reply]

Invalid timedtext pagename[edit]

example: TimedText:Jana_Gana_Mana_instrumental.ogg.Indian_English. RZuo (talk) 11:01, 3 December 2023 (UTC)Reply[reply]

✓ Done: Deleted as dupe of TimedText:Jana Gana Mana instrumental.ogg.en.srt (I checked line by line). Btw, some months ago I created User:Achim55/TimedText pages to be checked where such files show up. A bunch of such naming errors have already been fixed since. --Achim55 (talk) 19:17, 3 December 2023 (UTC)Reply[reply]

Module:Tricolor: Lua error: not enough memory; better way to get combinations?[edit]

I'm working on implementing {{Tricolor}} as a module, based on Module:Bicolor and using Module:Bicolor/data. Unfortunately, when I tested it out at Template:Tricolor/testcases, it threw a memory error. I'm reasonably certain the problem is that the code is generating 50^3 = 125,000 entries of categories to possibly display. Since we only care about categories where there are three distinct colors, listed in alphabetical order, it would be fine to only generate (50 choose 3) = 50!/(3! 47!) = 50 * 49 * 48/3 = 39,200 categories, which mmmight be a small enough list to work with? I would appreciate advice either on how to get a list of unique combinations of elements of a table, or more broadly on what's a good way to approach this problem. —CalendulaAsteraceae (talkcontribs) 00:36, 4 December 2023 (UTC)Reply[reply]

OK, looks like 39,200 is not good enough and I'll need to figure out another approach. —CalendulaAsteraceae (talkcontribs) 01:00, 4 December 2023 (UTC)Reply[reply]
Hmm, I could restrict the color combinations to those which have a category in Category:Combinations of 3 colors, that's less than 2,000. Is there an equivalent of mw:API:Categorymembers for Lua? —CalendulaAsteraceae (talkcontribs) 05:57, 4 December 2023 (UTC)Reply[reply]

PDF Preview Failed to Load[edit]

I recently checked with some of my uploaded PDF files (and PDF files uploaded by others as well), and a number of them fails to load the preview even with good Internet connection. The following are some problematic files that I encountered:

It seems that the problem doesn't exist for older PDF files I uploaded or I seen. Is there some bugs? Many thanks.廣九直通車 (talk) 06:16, 4 December 2023 (UTC)Reply[reply]

if by "preview" you mean the big image at the start of the page and the thumbnail in "File history", i can see them properly for the first 3 files. File:Parliamentary Constituencies Act 1986.pdf shows a completely white image, because it seems p1 is indeed blank?--RZuo (talk) 06:42, 4 December 2023 (UTC)Reply[reply]
@RZuo: No, if you click into the file, the first page of File:Parliamentary Constituencies Act 1986.pdf should show a table of contents.廣九直通車 (talk) 10:26, 4 December 2023 (UTC)Reply[reply]
This looks like the existing issue of Thumbor sometimes being rate-limited (HTTP error 429). If you open the thumbnail in a new tab, you might see an error. For instance, for me the thumnbail of page 1 of File:Parliamentary Constituencies Act 1986.pdf is not being served properly. It might be fine for some people; it depends on what CDN server you are hitting. I think T337649 might be the task, or T307787. Sam Wilson 10:38, 4 December 2023 (UTC)Reply[reply]
In my experience, PDF and DjVu previews have never loaded reliably, and they got considerably worse a few weeks ago. It doesn't mean there's anything wrong with the files (although larger and more complex files are less likely to load); the thumbnailing process is just not very reliable. Omphalographer (talk) 00:18, 5 December 2023 (UTC)Reply[reply]

Gadget to jump from timedtext back to audio/video file[edit]

is there already such a gadget?

without gadget you can only open the player and click the circle i button. i'm unaware of any other method.

if not, then i have a piece of code here. :)

var nsnum = mw.config.get('wgNamespaceNumber');
jQuery(document).ready(function(){
    'use strict';
    if (nsnum === 102 || nsnum === 103) {
    	mw.util.addPortletLink('p-namespaces',
    	mw.config.get('wgScript') + "?title=File:" + mw.config.get('wgTitle').replace(/\.[^\.]+\.srt/g, ""), 
    	'Back to media',
    	'ca-backtomedia',
    	"Go to the media file page");
    }
  });

--RZuo (talk) 06:42, 4 December 2023 (UTC)Reply[reply]

I use to right-click + open in a new tab. Or did I misunderstand? --Achim55 (talk) 07:35, 4 December 2023 (UTC)Reply[reply]
thx for the tip. i didnt know that's possible... so i could simply ctrl+click and it opens in a new tab. it's not really intuitive. RZuo (talk) 08:37, 4 December 2023 (UTC)Reply[reply]
omg it's actually possible to click the media box anywhere on any wiki project this way to open it in a new tab. i never discovered this trick. RZuo (talk) 08:42, 4 December 2023 (UTC)Reply[reply]

Tech News: 2023-49[edit]

MediaWiki message delivery 23:47, 4 December 2023 (UTC)Reply[reply]

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[reply]

User template update[edit]

Do we have any tutorials on updating my user template? --Don (talk) 15:58, 6 December 2023 (UTC)Reply[reply]

Internal error: The server could not save the temporary file[edit]

Hi!

When I upload some larger files, I get the following error: "Interner Fehler: Der Server konnte keine temporäre Datei speichern." (Internal error: The server could not save the temporary file). Is someone encountering the same? I saw this error yesterday already. --PantheraLeo1359531 😺 (talk) 16:03, 7 December 2023 (UTC)Reply[reply]

Addendum: The error affects the upload wizard, but also the chunked uploader --PantheraLeo1359531 😺 (talk) 16:42, 7 December 2023 (UTC)Reply[reply]

Making content in template only visible to a certain user group?[edit]

is there a way to make certain things only visible to say registered users or autopatrollers?

a use case would be transcluding certain maintenance related stuff (so only useful for commons users but not any website visitor) on category pages. RZuo (talk) 13:46, 10 December 2023 (UTC)Reply[reply]

It’s technically possible using the classes defined on the CSS pages listed at Special:PrefixIndex/MediaWiki:Group-, but I’d recommend against it except for things that are totally useless for users not in the given group (e.g. hiding delete buttons for non-admins is okay, since they can’t delete pages anyway), as logged-in status or user groups are not good proxies for what the user’s intentions are – maybe an experienced user didn’t log in because they decided not to create an account, use an insecure computer, don’t want to go through the 2FA login process etc.; and conversely, maybe a logged-in user isn’t really a contributor (and as such doesn’t need the maintenance links), but someone who only came here to upload a few pictures or even someone who never wanted a Commons account, but got one due to central login. —Tacsipacsi (talk) 17:31, 10 December 2023 (UTC)Reply[reply]

Tech News: 2023-50[edit]

MediaWiki message delivery 02:10, 12 December 2023 (UTC)Reply[reply]

Internal error: Server failed to store temporary file. (for pdf)[edit]

Hi all

I'm getting an error trying to upload what I think is a very standard pdf file, I started a discussion here. Please can anyone help? My assumption is its a rare/niche technical issue. Please reply there so the disussion doesn't get broken up.

Thanks

John Cummings (talk) 08:25, 13 December 2023 (UTC)Reply[reply]

Path between categories[edit]

Do we have a tool, to show path between two categories? Juandev (talk) 16:57, 13 December 2023 (UTC)Reply[reply]

Upload wizard change[edit]

The upload wizard design seems to have been changed in the last day or two. Is there any possibility that whoever changed it could provide more space for answers to 2. Where did you find this work? Enter the website, the book, or another source. and 3. Enter the name of the original author of this work., both of which questions often require more than a single short sentence. By way of example, for an image I've just uploaded I'd like to give the following information for q.2 - which used to fit in the edit box before this change; now there's a single line edit box which requires both horizontal and vertical scrolling to try to make any sense of the input text:

Upper Wharfedale : being a complete account of the history, antiquities and scenery of the picturesque valley of the Wharfe, from Otley to Langstrothdale via Internet Archive - https://archive.org/details/upperwharfedaleb00speiuoft/page/n177/mode/2up

Image cropped from https://ia800905.us.archive.org/view_archive.php?archive=/9/items/upperwharfedaleb00speiuoft/upperwharfedaleb00speiuoft_jp2.zip&file=upperwharfedaleb00speiuoft_jp2%2Fupperwharfedaleb00speiuoft_0195.jp2&ext=jpg

--Tagishsimon (talk) 05:46, 14 December 2023 (UTC)Reply[reply]