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/08 /Archive/2023/09.

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

RSVG rendering preview on user:Rillke/MwJSBot.js not working[edit]

When I preview any SVG using User:Rillke/MwJSBot.js, I don't get the RSVG rendering preview to work. It just shows the default File:Bug blank.svg as if the SVG is broken, but they aren't. Am I the only one having this problem? Jonteemil (talk) 16:48, 23 July 2023 (UTC)Reply[reply]

Anyone? Jonteemil (talk) 14:48, 28 July 2023 (UTC)Reply[reply]
@Glrx: Can you confirm or disconfirm this? Jonteemil (talk) 19:11, 2 August 2023 (UTC)Reply[reply]
@Jonteemil and Rillke:
I've been using User:Rillke/SVGedit.js for a time, but I have not paid much attention to the RSVG rendering. I usually do not hit the preview button. When I do, I'm happy to see a local SVG rendering. RSVG departs from the SVG specification in a few places.
The RSVG preview has not worked in a long time. For example, using SVGedit on File:IPv6 header-en.svg (which specifies a width and height) does not produce an RSVG preview.
If I look at the SVGedit code, line 396 does a fetchPreview(val). I presume that obtains the RSVG rendering. That method probably fails, so line 413 substitutes a PNG rendering of File:Bug blank.svg. (An alternative explanation is the preview method succeeds but line 399 image/jpeg is incorrect and causes a failure. I expect RSVG to return an image/png rather than an image/jpeg. Data URL claims JPEG but is PNG. Another possibility is the line 411 timeout is too short.)
Looking further, fetchPreview sends its request to //convert.toolforge.org/svg2png.php. If I go to that website and issue a request for a large (2199×1477) SVG file, I get a 500 Internal Server Error. If I give it a small file, my computer receives a appropriate PNG. I will guess the endpoint functions for at least some files.
That leads me back to guessing something goes wrong inside of line 397 .done.
Glrx (talk) 20:51, 2 August 2023 (UTC)Reply[reply]
@Glrx: Okay, I don't probably use the tool as often as you do but I do it from time to time and I always preview so I don't happen to save anything erroneous. This problem is something that I haven't experienced before so it must be some new change to the code, or the code of another program that the SVGedit tool uses. Do you know of anyone who'd be willing to take a look at fixing this? Jonteemil (talk) 04:46, 3 August 2023 (UTC)Reply[reply]
@Jonteemil and Cmglee:
You load SVGedit from Meta:User:Jonteemil/global.js, but you use Cmglee's version at User:Cmglee/SVGedit.js. That's fortunate because Cmglee is still active; Rillke has not edited in some time. You can ask Cmglee to try changing line 401 to use image/png to see if that fixes preview.
Glrx (talk) 05:32, 3 August 2023 (UTC)Reply[reply]
Thanks for your clear instructions and analysis, @Glrx: I've changed "jpeg" to "png" but the problem persists. I think rsvg previews are broken as with commons:commons_SVG_Checker. Would you be able to debug why commons:commons_SVG_Checker also gives the bug image? Thanks, cmɢʟee ⋅τaʟκ 15:34, 3 August 2023 (UTC)Reply[reply]
@Cmglee:
Thanks for running the test. I'll try looking at the HTTP transfer and see if there are cross origin issues.
The code backing the SVG Checker also uses line 451 image/jpeg:
Thanks again.
Glrx (talk) 17:58, 3 August 2023 (UTC)Reply[reply]
image/jpeg likely isn't the issue as it worked before around 2019. Don't know if Commons_talk:Commons_SVG_Checker#is_it_down? is a useful lead. Thanks too for trying, cmɢʟee ⋅τaʟκ 19:23, 3 August 2023 (UTC)Reply[reply]
@Cmglee and Jonteemil:
I go to Commons SVG Checker, select an SVG file, and then execute the SVG check.
The request to convert.toolforge.org/svg2png.php fails.
Console reports
Referrer Policy: Ignoring the less restricted referrer policy “origin-when-cross-origin” for the cross-site request: https://convert.toolforge.org/svg2png.php index.php:322:8
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://convert.toolforge.org/svg2png.php. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 200.
The request fails in the browser because the svg2png does not supply an appropriate Access-Control-Allow-Origin header.
Cannot find tool on toolforge.org.
Guess this is the source
This URL should return the version:
svg2png.php line 35 calls matchOrigin($origin) and emits appropriate CORS access headers if there is a match. I'm confused. The access headers were not emitted, but if no match then no PNG should be emitted (exit is called before calling RSVG). A PNG was emitted. Is there another source? Is PHP or something else suppressing the CORS headers?
I cannot find matchOrigin; I expect it to be in shared/commons.php, but that links to Rillke (which is not 2 dirs up).
Interesting GitHub issue re toolforge and wmflabs (apparently fixed by renaming wmflabs URLs to toolforge URLs around 2020).
line 8 uses old URL:
  • $url = $prot . "://tools.wmflabs.org/$tool_user_name/";
but does not seem to be used for matching the origin.
Glrx (talk) 20:36, 3 August 2023 (UTC)Reply[reply]
@Jonteemil and Cmglee:
I suspect that is not the current source. I can convert SVG to PNG from a non-WMF origin, so I suspect the current source has deleted not only the origin matching test but also the CORS headers.
Glrx (talk) 21:19, 3 August 2023 (UTC)Reply[reply]
@Glrx: Thanks again for investigating. I must admit that your findings are far beyond what I'm familiar with. Pinging @Redrose64: and @JoKalliauer: (may not be active recently) for their opinions, cmɢʟee ⋅τaʟκ 02:22, 4 August 2023 (UTC)Reply[reply]
@Cmglee and JoKalliauer:
Turns out that Johannes cloned convert to make his SVG workaround bot. His clone has the matchOrigin code:
I still cannot explain the failure to supply the CORS headers.
Glrx (talk) 04:12, 4 August 2023 (UTC)Reply[reply]
webservice restart might work
@Glrx and Jonteemil: I do not know why Rillke's rendering does not work, maybe consider reopening phab:T217362.
I assume that Commons:Commons_SVG_Checker might use the same code, which recommends since 2019 to use @Jarry1250: tool: https://svgcheck.toolforge.org/ which works imho flawlessly. (But you have to manually upload the image.)
I assume that
webservice stop
webservice --backend=gridengine start
would fix it, see wikitech:Help:Toolforge/Web. I also sometimes have to restart webservice for https://svgworkaroundbot.toolforge.org/ to work again.
github.com/JoKalliauer/convert doesn't help in this case, it only converts svg to (less buggy) svg, it does not render svg to png, and the issue with User:Rillke/MwJSBot.js is imho independent on the SVG, therefore it won't help. I use Rillke's code basically as black-box without understanding JavaScript, so I won't be helpful in bug fixing the code, or finding the issue.
I'm basically inactive, and stopped following treads, however I'm happy to get pinged to help. :-)
 — Johannes Kalliauer - Talk | Contributions 07:50, 4 August 2023 (UTC)Reply[reply]

There should be a Phabricator issue (or equivalent) about this toolforge app. It is used in several places, but the behavior of the installed tool does not match the existing (and incomplete) GitHub source. Furthermore, a modification to the tool source (make the web page display the PNG rather than download it: Content-Disposition header) could avoid a lot of uploads at File:Test.svg. Glrx (talk) 23:40, 18 August 2023 (UTC)Reply[reply]

Submitted Phab:T345972 Glrx (talk) 04:27, 9 September 2023 (UTC)Reply[reply]

File:Ada Health Symptom Checker conceptual overview.png[edit]

Hi, Can someone please have a look at this unresolved section at the help desk? : Commons:Help desk/Archive/2023/08#Uploaded image appearing broken. It's about thumbnails not generated for this png image : File:Ada Health Symptom Checker conceptual overview.png. -- Asclepias (talk) 13:03, 11 August 2023 (UTC)Reply[reply]

Apparently, the system is unable to generate any thumbnail of this image. Is that due to something inherent to the image? What could that be? -- Asclepias (talk) 15:15, 17 August 2023 (UTC)Reply[reply]

Another case reported there: Commons:Help desk#File:Island of Ireland NASA.png for the image File:Island of Ireland NASA.png. -- Asclepias (talk) 12:56, 30 August 2023 (UTC)Reply[reply]

Unable to access Commons from mobile Wikipedia[edit]

Hello. Often when I go to Commons from the mobile Wikipedia's images after clicking a specific photo and "Details" tab, the website fails to load. This issue doesn't always occur. Sometimes the site does load alternatively in mobile or desktop mode. It's been happening for a while and I hope you can look into this issue, thank you! Linkin Prankster (talk) 18:25, 23 August 2023 (UTC)Reply[reply]

Tech News: 2023-35[edit]

MediaWiki message delivery 13:58, 28 August 2023 (UTC)Reply[reply]

List of languages supported by TimedText[edit]

Where do I find the languages that are supported by TimedText? I thought it might be Data:I18n/Module:Lang.tab but I'm not sure. Background: For maintenance I'd like to find pages like TimedText:Cavallo.ogv.undefined.srt or TimedText:WalesCalltoAction.ogv.LANG.srt. Cheers, Achim55 (talk) 07:43, 29 August 2023 (UTC)Reply[reply]

No, the supported languages are defined in MediaWiki, not on-wiki. In Lua, mw.language.fetchLanguageNames() (without parameters) returns the same set of languages as what TimedText supports. —Tacsipacsi (talk) 13:17, 3 September 2023 (UTC)Reply[reply]

Asking for help with the {{POTD viwiki}} template[edit]

Hi. Recently, I've been trying to make the POTD template for Vietnamese Wikipedia (Viwiki) on Wiki Commons, based on the {{POTD bnwiki}}, as A.Savin suggested here. Everything works well, except the link doesn't lead to the local POTD on Viwiki, but the main page of the Viwiki POTD instead. I tried to use this template on this one and see the problem. I don't know why but I guess, it's because of the differences between the two languages.

The Local POTD of the Viwiki is Wikipedia:Hình ảnh chọn lọc/Y/M/d
Example: The Local POTD of August 28th, 2023 is Wikipedia:Hình ảnh chọn lọc/2023/08/28

Thank you!
ABAL1412🇻🇳🇸🇺🇷🇺 (talk ☭) 10:36, 29 August 2023 (UTC)Reply[reply]

I've added code to the English-language version of the template so that the specific date appears when one is provided. See the image page you previously linked to for an example. I don't know Vietnamese so I'm not sure how to do this for the Vietnamese-language version of the template, but you can see what I did in Template:POTD viwiki/en.
One major change I made is that the date format must be in YYYY-MM-DD (for example 2023-08-28). This makes it easier to translate to different languages. I updated the documentation at Template:POTD viwiki/doc in English but not in Vietnamese. I would appreciate any assistance to update the Vietnamese translation.
Anon126 ( ) 05:50, 14 September 2023 (UTC)Reply[reply]
Notify ABAL1412. Anon126 ( ) 05:51, 14 September 2023 (UTC)Reply[reply]
@Anon126 Thank you so much! I've translated the template into Vietnamese. But when I switch the language setting to English, it still show the text in Vietnamese. - ABAL1412🇻🇳🇸🇺🇷🇺 (talk ☭) 11:16, 14 September 2023 (UTC)Reply[reply]
@ABAL1412: The language-specific version should go on Template:POTD viwiki/vi, not Template:POTD viwiki. I've fixed this, and it should automatically change the language now. Anon126 ( ) 11:25, 14 September 2023 (UTC)Reply[reply]
Oh. Didn't know that. Thanks! - ABAL1412🇻🇳🇸🇺🇷🇺 (talk ☭) 11:26, 14 September 2023 (UTC)Reply[reply]
@Anon126 By the way, before the 20th week of 2011, the POTD isn't on Vi Wiki yet, instead, we have Picture of the week. After that 20th week, it has been changed to POTD. Would you please help me to make a template for the Vi Picture of the week? I just want to update all the assessments from Vi Wiki to Wiki Commons.

The link to the Picture of the week page on Vi Wiki is Wikipedia:Hình ảnh chọn lọc/Year/The number of the week.
For instance: vi:Wikipedia:Hình ảnh chọn lọc/2008/Tuần 45
(Note: week is tuần in Vietnamese. The capitalization rule is exactly the same as English, French, etc.)

So far, the Vi Wiki doesn't have the Picture of the year, Quality image, Value image or even Featured image. We only have the POTD, which was Picture of the week before 2011. The first Picture of the week is for the 45th week of 2008. The last Picture of the week is for the 19th week of 2011. Hope that you can help me with this one. Thank you so much! <3
- ABAL1412🇻🇳🇸🇺🇷🇺 (talk ☭) 17:15, 14 September 2023 (UTC)Reply[reply]
For this, I would suggest creating a separate template, something like "Template:POTW viwiki", which takes two parameters, one for the year and one for the week number. Anon126 ( ) 04:10, 15 September 2023 (UTC)Reply[reply]

Color issues with certain .jpg files[edit]

As I'm sorting Category:DOCUMERICA photographs by Ernst Halberstadt, I've been trying to upload larger versions of some files from the original source. However, when I download the larger .jpg from the source file on Digital Commonwealth, it's substantially darker than the version shown there. The issue doesn't appear when viewing the .jpg on the source site, nor if I download the .tiff version. That makes me think it might be some issue with the RGB profile or other settings within the file.

For an example, see File:Related to Kennedy Library site - car barn proposed site for Library at Harvard Square - DPLA - ce077e82f52703890e0826b2eff36b1b.jpg. The 21:43, November 2, 2022 version is the original bot upload, the 06:32, September 2, 2023 version is the .jpg from Digital Commonwealth, and the 06:38, September 2, 2023 version is a .jpg export from the .tiff file. Thanks, Pi.1415926535 (talk) 04:42, 3 September 2023 (UTC)Reply[reply]

Watermark on hundreds of images[edit]

Can someone put a watermark template on images by user:AfroBrazilian from 2020-2023. There are a few hundred of them. I'm sure a bot can do it but I don't know how. There seem to be no images with watermarks pre-2020. Thank you. Steinninn ♨ 13:30, 3 September 2023 (UTC)Reply[reply]

✓ Done for the 232 most recent uploads. VFC seems to be working in a less than optimal manner right now. -- Tuválkin 22:16, 3 September 2023 (UTC)Reply[reply]

Tech News: 2023-36[edit]

MediaWiki message delivery 23:31, 4 September 2023 (UTC)Reply[reply]

Initial setup has been completed for Adiutor[edit]

Hello, I am pleased to announce that I have successfully completed the initial setup of the Adiutor gadget on Wikimedia Commons. Adiutor is a gadget designed to enhance the maintenance and administrative tasks on Wikimedia projects, making them more efficient and user-friendly.

Adiutor offers a wide range of features to assist Wikipedia editors and administrators, including the ability to create speedy deletion requests, nominate files for deletion, request page protections, issue warnings to users, and much more. Administrators also have access to advanced functions such as user blocking and speedy page deletion.

Your feedback is highly valuable in the ongoing improvement of Adiutor. If you encounter any bugs or have feature requests, please don't hesitate to report them on the discussion page. Your active participation and support are essential in making Adiutor an even more functional and user-friendly tool for the Wikimedia community.

Additionally, we have created a Telegram group where you can join the discussion, ask questions, and connect with other users interested in Adiutor: Join Adiutor Telegram Group.

Thank you for your attention, and I look forward to working together to enhance our Wikimedia Commons experience with the help of Adiutor.

Best regards, 𝗩𝗶𝗸𝗶𝗽𝗼𝗹𝗶𝗺𝗲𝗿 00:50, 5 September 2023 (UTC)Reply[reply]

Workflow for images showing misidentified organisms[edit]

Hello, I am an entomologist and i very, very often spot images showing misidentified specimen. For example this one here: File:Pissodes pini a1.jpg

It's clearly not a member of the genus Pissodes, but Hylobius. However, i cannot identify the specimen with certainty, as it does not specify the locality where the image was taken. I do not know every weevil on the world, so i would assume it is Hylobius abietis if i assume the image was taken in Central Europe.

So, what would be the workflow to deal with this image? Should i rename it? Should i add a note to the description? Should i remove it from category Pissodes pini? Should i put it into the right category without renaming? Should i remove it from all Wikipedia articles where it has been used erroneously? That seems like a lot of work for a single image. Is there some tool to quicken the process?

All the Best, Bagous Bagous (talk) 11:34, 10 September 2023 (UTC)Reply[reply]

thx a lot for helping. commons need professionals like you to identify and correct images.
i dont know of a standard workflow for dealing with such scenarios. here's what i would do:
  1. try to ascertain the subjects in photos as accurately as possible. like for your example, it's ofc best to pinpoint the exact species.
  2. when the exact name cannot be determined, just go with the most accurate one.
  3. modify descriptions and categories accordingly. please make sure you include the reasoning behind your edits if the change is not obviously evident. not everyone is a professional in the specific field of interest. you can write those down within file description or on its file talk page if long passages or discussions are expected.
  4. request com:file rename.
RZuo (talk) 13:54, 10 September 2023 (UTC)Reply[reply]
@Bagous: RZuo's answer is correct, but incomplete. You should (or at least could; it would be helpful): change the category; check any pages on sister projects that are using the image and update them or replace/ remove the image accordingly. in the case where you can only identify to genus, family or other level, you can use a category like Category:Unidentified Curculionidae. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 16:24, 10 September 2023 (UTC)Reply[reply]

Tech News: 2023-37[edit]

MediaWiki message delivery 21:05, 11 September 2023 (UTC)Reply[reply]

Page scrolls upwards after refresh[edit]

I'm experiencing a UI problem: every time I refresh an image page, after it loads, it slowly scrolls upwards for a while. Here is a screen recording demonstrating the issue: https://archive.org/download/c9sm2/wiki.webm

I'm on Linux Firefox with all addons disabled while troubleshooting. The issue happens in the skins Vector(2022/2010) and Timeless; but not MinervaNeue nor Monobook. When I disable javascript it no longer happens, and by process of elimination I've found that adding this line to uBlock stops it from happening:

commons.wikimedia.org/w/load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%7Cwikibase.mediainfo.statements&skin=vector-2022&version=yvqja

Does anyone know what's going on? –Vuccala (talk) 23:44, 11 September 2023 (UTC)Reply[reply]

I also experience this every now and then, but not consistently (also Firefox on Linux). I’ve only ever experienced it on Commons file pages, so I think it’s caused by Wikibase MediaInfo (which is the wikibase.mediainfo.statements part in your URL). —Tacsipacsi (talk) 14:39, 12 September 2023 (UTC)Reply[reply]
I find I now have to block all of commons.wikimedia.org/w/load.php to prevent it from happened. I have now opened a bug report on Phabricator for the issue: https://phabricator.wikimedia.org/T346591Vuccala (talk) 02:46, 18 September 2023 (UTC)Reply[reply]

Mirror image[edit]

File:Angels Flight is seen from south as buildings are razed in Los Angeles, Calif., 1962.jpg text in image appears mirrored

..... 0mtwb9gd5wx (talk) 17:42, 13 September 2023 (UTC)Reply[reply]
@0mtwb9gd5wx: Sorry, what text you're referring to? Anon126 ( ) 04:39, 14 September 2023 (UTC)Reply[reply]
You might have to zoom in to see it, but the funicular car at the center of the photo has a sign on top of it, and there's a liquor store sign in the background above that. Both were visually mirrored, probably because the photographic negative was scanned backwards.
I've uploaded a new version of the image which reads properly. Omphalographer (talk) 20:27, 14 September 2023 (UTC)Reply[reply]

Strange link appearing on page for Category:Test images[edit]

Category:Test images shows a link to the Foundation Wiki sandbox page: foundation:Wikimedia:Sandbox. It seems to originate from {{Wikidata Infobox}}, since it goes away when I remove it (in the preview, not actually applying the edit). But I can't tell where exactly it's coming from, and it doesn't show up when I place it in Commons:Sandbox (which is linked to the same Wikidata item). This is probably a minor issue but I'm wondering where it's coming from and if it's a possible bug in the template. Anon126 ( ) 05:43, 16 September 2023 (UTC)Reply[reply]

@Anon126: It is. The problem is that in Module:Wikidata Infobox, foundationwiki needs to be added to the excludedProjects table to indicate that even though its name ends with "wiki", it's not a language edition of Wikipedia. --bjh21 (talk) 08:33, 16 September 2023 (UTC)Reply[reply]

Tech News: 2023-38[edit]

MediaWiki message delivery 19:17, 18 September 2023 (UTC)Reply[reply]

GLAMorous documentation[edit]

Is there a documentation for GLAMorous? Juandev (talk) 20:17, 20 September 2023 (UTC)Reply[reply]

The image displayed in file description is different from the only image stored in history (and displayed through File: code). Purge - no change. What's wrong? Retired electrician (talk) 13:55, 21 September 2023 (UTC)Reply[reply]