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 Octicons-location.svg
 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; the latest archive is Commons:Village pump/Technical/Archive/2023/04.

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.

Non-manual way to upload these photos?[edit]

Hello, I am trying to upload some photos from a National Park Service account on Flickr. I love the flickr URL uploader, but can't seem to use it for these photos. It auto-tags them as ineligible due to Flickr's autolicensing every image as "all rights reserved". Despite this, the images by the Federal Government are in the public domain, and are definitely PD as stated extremely clearly in the Flickr account's "About" page. Is there a way for me or a user with more power to upload them without having to download each one and slowly reupload and relabel? ɱ (talk) 22:25, 29 March 2023 (UTC)Reply[reply]

Does anyone have any insight on this? ɱ (talk) 03:26, 29 April 2023 (UTC)Reply[reply]

Help with Module:Century?[edit]

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

Ah. New question, does anyone have advice on how to make my code more efficient? —CalendulaAsteraceae (talkcontribs) 05:39, 26 April 2023 (UTC)Reply[reply]
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)Reply[reply]
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)Reply[reply]
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)Reply[reply]
@Snævar: Thank you! —CalendulaAsteraceae (talkcontribs) 23:08, 30 April 2023 (UTC)Reply[reply]

Image Annotator[edit]

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

File:Chicago-chinatown2 new.jpg[edit]

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

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

Test whether some strings are identical[edit]

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

SVG rendering varies based on resolution[edit]

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

I have a couple problems here. First is the one reported by @Ricky81682 above: the code only checks back to 5000 BC, but some categories go back further than that. Also, adding more centuries means adding more expensive function calls. Is there a way to get a list of all extant subcategories of a category? This could be filtered and used to determine the starting point when showall = true, and used in place of mw.site.stats.pagesInCategory when showall = false.

Second, at the moment the category links aren't being interpreted as links; see {{Subject by century/sandbox}}. How can I fix this? —CalendulaAsteraceae (talkcontribs) 01:05, 1 May 2023 (UTC)Reply[reply]

@CalendulaAsteraceae Or we create a smaller template uniquely for this case? Ricky81682 (talk) 01:33, 1 May 2023 (UTC)Reply[reply]
@Ricky81682: I added an optional minimum century parameter to the module, which fixes this problem. (I would still like a better algorithm if feasible.) —CalendulaAsteraceae (talkcontribs) 01:50, 1 May 2023 (UTC)Reply[reply]

Tech News: 2023-18[edit]

MediaWiki message delivery 01:43, 2 May 2023 (UTC)Reply[reply]

Copying SVG images as JPGs, and poor handling of transparency.[edit]

Common problem, but here's just one typical example: File:Oxygenation-atm-2.svg

This is a line chart (any diagram has the same issue) drawn as an SVG. PNG thumbnail versions are linked conveniently, in different sizes. Hand-editing the link extension even gives JPGs.

The problem is that this SVG is transparent (whether it ought to be entirely so is another question). The PNGs are transparent too. But the "default rendering colour" for that transparent is black, rather than white. This is the opposite of behaviour for the main use case on Wikipedia, where they're placed onto a white background.

The result of this is that there's no simple way to copy and paste such an image into most of the widespread social media platforms. It'll be rendered as a black rectangle instead.

Even when thumbnailed as a JPG (i.e. with no transparency) the outcome is the useless black rectangle (and surely as a JPG there's no reason for that behaviour at all).

The MediaWiki behaviour when rendering transparent bitmaps such as this should be to give a useful output. That would involve changing the implied background colour (even when transparent) to be white, not black, thus downstream renderers that don't implement transparency would at least give a visible image. Especially so for a JPG render here, as transparency has to be flattened at that point anyway.

This would make the thumbnailing behaviour more consistent with the publishing approach on Wikipedia, it would also make the thumbnails for generally useful for readers who are re-using these images off-Wikimedia. Andy Dingley (talk) 10:15, 3 May 2023 (UTC)Reply[reply]

So in other words, you're proposing fully transparent areas in PNG thumbnails to be encoded as #ffffff00 instead of #00000000? -- El Grafo (talk) 11:12, 4 May 2023 (UTC)Reply[reply]
Something like that, yes (I'm not a bitmap format expert). This should be a no-effect change to anything that supports transparency, and an improvement to those that don't. Andy Dingley (talk) 11:32, 4 May 2023 (UTC)Reply[reply]

Downloading images in OpenSeadragon?[edit]

does anyone have experience in getting the original hi res images inside OpenSeadragon? i'm trying to download the source files (dont know if they are images or pdfs) of old hk newspapers, like https://mmis.hkpl.gov.hk/coverpage/-/coverpage/view?_coverpage_WAR_mmisportalportlet_hsf=Hong+Kong+Daily+Press&_coverpage_WAR_mmisportalportlet_actual_q=%28%20all_dc.title%3A%28%22Hong%5C%20Kong%5C%20Daily%5C%20Press%22%29%29%20AND+%28%20verbatim_dc.collection%3A%28%22Old%5C%20HK%5C%20Newspapers%22%29%29&_coverpage_WAR_mmisportalportlet_sort_field=dc.publicationdate_bsort&p_r_p_-1078056564_c=QF757YsWv5%2F6rByrziBvQzxON8TH4X4a&_coverpage_WAR_mmisportalportlet_o=0&_coverpage_WAR_mmisportalportlet_sort_order=asc . RZuo (talk) 12:07, 3 May 2023 (UTC)Reply[reply]

Tech News: 2023-19[edit]

MediaWiki message delivery 00:34, 9 May 2023 (UTC)Reply[reply]

UploadWizard Flickr uploading feature[edit]

When using the feature that allows you to upload Flickr images to commons with UploadWizard, UploadWizard does not state the title of a Flickr work. The versions of cc-by and cc-by-sa that flickr uses clear state that when attributing a work you need to provide "the title of the Work if supplied", Why doesn't UploadWizard do this? Flickr2commons already has this feature... Teneab (talk) 15:40, 10 May 2023 (UTC)Reply[reply]

Best way to search for a user's assessed uploads?[edit]

by "assessed uploads" i mean "Featured pictures, Quality images, or Valued images". Help:FastCCI can do this on a category. what if i want to do that about a user? if the user didnt put his/her uploads in a category.

i only know using CirrusSearch tricks to find one kind at a time, but dont know a way to find all 3 kinds (and possibly featured media and so on) at the same time. RZuo (talk) 16:02, 10 May 2023 (UTC)Reply[reply]

@RZuo: perhaps PetScan with union of image categories and which link to specific user page: [15] MKFI (talk) 08:39, 11 May 2023 (UTC)Reply[reply]
@RZuo: in Wiki's advanced search function, have the main search look for the author's name (as it would appear in the description template), while simultaneously looking for featured_pictures quality_images valued_images in the advanced search parameter "one of these words". --HyperGaruda (talk) 19:53, 15 May 2023 (UTC)Reply[reply]

Demande pour téléverser un fichier avec l'extansion .odt[edit]

Bonjour,

J'aimerais téléverser un fichier odt contenant une image, mais un message s'affiche, exposant qu'il n'est pas possible de verser des fichiers avec l'extension .odt, pourquoi? en effet, j'ai moi-même créé ce fichier, je ne vois donc pas la raison de ce refus.

Bien cordialement et en espérant être assez explicite, Yulan de Rê (talk) 17:31, 14 May 2023 (UTC)Reply[reply]

odt files are not accepted. see com:file types.
please upload the image directly using Special:UploadWizard.
google translation:
les fichiers odt ne sont pas acceptés. voir Commons:File_types/fr.
veuillez télécharger l'image directement à l'aide de Special:UploadWizard.--RZuo (talk) 18:31, 14 May 2023 (UTC)Reply[reply]
@Yulan de Rê: ça veut dire qu'il faut extraire l'image du fichier .odt et l'enregistrer au format .jpg (photos) ou .svg/.png (images schématiques). J'espère bien que vous êtes aussi l'auteur original de l'image et pas seulement du fichier .odt. Si non, ça peut être regardé comme une violation des droits d'auteur. --HyperGaruda (talk) 20:12, 15 May 2023 (UTC)Reply[reply]
Merci @HyperGaruda! Bon après-midi. Yulan de Rê (talk) 10:34, 16 May 2023 (UTC)Reply[reply]

Tech News: 2023-20[edit]

MediaWiki message delivery 21:42, 15 May 2023 (UTC)Reply[reply]

How to rename files?[edit]

Hi

How can I change filesnames?

Like changing file:Waverly Council Chambers.jpg to "Waverley Council Chambers.jpg"

How can I change folders' names?

Like changing folder's name of "Category:Centennial Park, Woollahra Gate from Oxford Street" to "Category:Centennial Park, Woollahra Gates from Oxford Street". I also need to change Category:The Offerings of War and Peace to "Category:The Offerings of War and Peace statues". Shkuru Afshar (talk) 12:56, 17 May 2023 (UTC)Reply[reply]

@Shkuru Afshar: See:
respectively. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 14:28, 21 May 2023 (UTC)Reply[reply]
Thank you Shkuru Afshar (talk) 12:46, 22 May 2023 (UTC)Reply[reply]

Any way to let certain gadget add edited pages to watchlist with expiry date?[edit]

for example, as a filemover, i wanna add both file:oldname.xyz and file:newname.xyz to my watchlist and let them expire after 1 month, so as to monitor them for a short time after my edits. is there a way to make certain gadgets do this? i think i've seen gadgets adding pages to watchlist, but without expiry. RZuo (talk) 11:08, 19 May 2023 (UTC)Reply[reply]

The API module has a parameter named watchlistexpiry, so it should be possible. Since watchlist expiry is a relatively new thing, gadgets not updated since then of course don’t support it. —Tacsipacsi (talk) 22:42, 23 May 2023 (UTC)Reply[reply]
Yeah, this could be done to MediaWiki:Gadget-AjaxQuickDelete.js. I will add it to my to do list, but don't expect anything soon. —‍Mdaniels5757 (talk • contribs) 22:51, 23 May 2023 (UTC)Reply[reply]

I recently uploaded a file: File:Manchester Metropolitan University Business School.png, and it seems to have quite a bit of Warning Symbol – Chromatic Aberration.svg chromatic aberration could anyone fix this for me? The target areas are mainly on the left, including the person's body, and the top left of the image's corner. Thanks, Please use the {{Reply to}} template when replying. 多多123 13:43, 21 May 2023 (UTC)Reply[reply]

@多多123: Ask at: Commons:Graphic Lab. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 14:29, 21 May 2023 (UTC)Reply[reply]
Thanks. 多多123 15:35, 21 May 2023 (UTC)Reply[reply]

Vertical-oriented text created in Inkscape not visible[edit]

I created File:Four Sons of Horus coffin diagram.svg in Inkscape. The second half of the diagram, the lower one, contains four columns of vertical text (the individual letters are upright, but they're arranged vertically). But they're not visible in the uploaded version. Does anyone know why this is, and what can be done about it? A. Parrot (talk) 21:12, 21 May 2023 (UTC)Reply[reply]

Having each letter in the vertical text in its own line works. There is also some cleanup that should be made, your original raster file is still in there and there is an path artifact at x150 y540. In Inkscape 1.2 the vertical text also clashes with the casket. Finish it off by selecting everything in Inkscape and doing Edit - resize page to selection. Snævar (talk) 10:32, 22 May 2023 (UTC)Reply[reply]
Thank you for your help. Inkscape, or graphics creation in general, obviously isn't my strong suit. A. Parrot (talk) 18:42, 22 May 2023 (UTC)Reply[reply]

Upload wizard bug?[edit]

If I have uploaded an image and described the file, and I click submit, it says some mistake happens, but then I must just click on and go forward with the process ignoring that there was a mistake, and then it actually works. In the end all images are up. And since I am here, when I upload images first, it usually says I am already uploading a file, but that's normal for my workflow. But the one after the description is new, anyway I am glad for any help, if there is any. Paradise Chronicle (talk) 05:48, 22 May 2023 (UTC)Reply[reply]

Somehow the second bug after the description has not appeared the last few times. The first one though still appears at times as regular. Paradise Chronicle (talk) 13:42, 22 May 2023 (UTC)Reply[reply]
Sorry I thought that discussion was archived already :)
It is a minor problem, but I have it since months and maybe it would be good I report better. While uploading, I often get the pop up:
'There is an error in your submission'. You are already uploading file ....
Here are a few from some minutes ago.
Here, Here Here here and here.
Anyway, if I ignore it and just click ok, it works. So it doesn't really disturb me, but I don't believe that's the way Upload Wizard should work. Paradise Chronicle (talk) 05:34, 27 May 2023 (UTC)Reply[reply]
Here are some more "errors"
Here, here, here, here, here, here and here, all from some minutes ago. Paradise Chronicle (talk) 06:48, 27 May 2023 (UTC)Reply[reply]

Tech News: 2023-21[edit]

16:52, 22 May 2023 (UTC)

No Audio File proficiency for the new babel template?[edit]

Hi! I'm trying to add a Babel box for Audio File editing skills on my talk page. The code AF (in uppercase letters) will produce an Audio Editing proficiency box using the old Babel template. But when I use the code AF (either uppercase or lowercase letters) in the new Babel extension, it will say I have proficiency in Afrikaans instead of Audio Files. How can I add the Audio File proficiency box to the new Babel extension? I'm a pretty new editor, so thank you, and sorry in advance if I put this question in the wrong place. Quadruple Tilde (talk) 18:02, 23 May 2023 (UTC)Reply[reply]

I did a bit more exploring. The Bitmap code (BG in uppercase) also seems to function only in the old Babel template. The codes for Animation Graphics (uppercase ANI), Vector Graphics (uppercase VG) and Photographer (uppercase PH) all seem to work in both the old and new Babel boxes. Quadruple Tilde (talk) 18:06, 23 May 2023 (UTC)Reply[reply]

Removal of ticket permission – false positive[edit]

Whenever reverting a vandalism on pages with {{PermissionTicket}} there will be a "Removal of ticket permission" alert, though no one touched the template. The edit will also be unnecessarily tagged; example: Special:Diff/766550973. Ponor (talk) 14:38, 24 May 2023 (UTC)Reply[reply]

PDFs for glyph variants[edit]

Hi. I've been uploading Unicode characters in SVG format, including character variants available in the font. However, Inkscape can only access the first variant, so for those letters that have additional alt forms, I tried a PDF. An example is file:Gentium alt engma.pdf. However, that's uploaded with very low resolution, first time that's happened. Any idea what I'm doing wrong? Thanks, Kwamikagami (talk) 02:29, 25 May 2023 (UTC)Reply[reply]

I don’t know how you configured LibreOffice Writer, but this is the actual size of the PDF. On the other hand, LibreOffice Draw seems to be able to export in SVG – did you try that? —Tacsipacsi (talk) 07:35, 26 May 2023 (UTC)Reply[reply]
No, thanks for the tip! Kwamikagami (talk) 08:59, 26 May 2023 (UTC)Reply[reply]
Yes! As long as I convert to a curve first, it works. (Evidently can't embed fonts.) That solves that problem! Appreciate it. Kwamikagami (talk) 10:40, 26 May 2023 (UTC)Reply[reply]

Increasing number of my deleted edits[edit]

Hi

Within the last 12 months, I had less than 100 manually reverted or reverted edits and less than 5 deleted images. By 6 December 2022 I had 385 total deleted edits and today I have 814 deleted edits!!! 450 deleted edits in almost 6 months!!! I also have nominated less than 30 images for deletion during this time period.

If you check all may edits so far, the total number of my deleted or reverted edits are less than 300.

Why it is happening?

Why number of deleted edits is increasing dramatically with the limited number of deletion or reverting or any notifications during this short time period?

Cheers Shkuru Afshar (talk) 12:08, 25 May 2023 (UTC)Reply[reply]

Reverted edits don’t count as deleted. However, all edits you made to pages that were subsequently deleted count as deleted edits, not only edits in which you nominated pages for deletion. You don’t get automatic notifications about deletion of pages you’ve ever edited unless the pages are on your watchlist – maybe this explains the growing number of deleted edits? —Tacsipacsi (talk) 08:41, 26 May 2023 (UTC)Reply[reply]
How come I have edited 450 pages in 6 months that have been subsequently deleted? I mean what could be wrong about all those pages?
In any circumstances, over 450 pages that I edited can't be deleted. It is a very high number within 6 months. Shkuru Afshar (talk) 03:07, 27 May 2023 (UTC)Reply[reply]
It’s 450 edits made to pages that have been deleted in the last six months. It’s not necessarily 450 different pages, and not necessarily edits you made in the last six months – some of them may be edits you made to pages in 2014, provided that the pages were deleted in the last six months. (However, all of these are speculations and assumptions, as only admins can see your deleted edits to see what actually happened.) —Tacsipacsi (talk) 10:09, 27 May 2023 (UTC)Reply[reply]

GeographBot images seemingly not uploading/cropping correctly[edit]

Hi, strange issue here that has happened a few times now - after using the CropTool File:Gas bus in Wolverhampton bus station - geograph.org.uk - 4828426.jpg that was uploaded by User:GeographBot, File:Gas bus in Wolverhampton bus station - geograph.org.uk - 4828426 (cropped).jpg seemingly has uploaded with no summary and no complete indication of it's copyright status. The link to the Geograph page the uncropped image was uploaded from is also broken.

Again, this has happened a few times now, sometimes even on new uploads by GeographBot that I haven't edited. Is there something I've done wrong during the cropping process, or is this an issue with bot uploads? And either case, how can this be quickly rectified without manually having to copy over the information? Hullian111 (talk) 14:38, 26 May 2023 (UTC)Reply[reply]