Commons:Village pump/Technical/Archive/2024/06

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Enable numeric sorting for Commons categories

English Wikipedia has numeric sorting for its categoesolveries, e.g. en:Category:Companies by year of establishment and country see that "0–9" that is created to as MediaWiki understands these are numbers and should be sorted using numeric sorting rather than character by character but Wikimedia Commons doesn't do that sorting and e.g. there is no "0-9" on Category:Photographs_in_the_Golestan_Palace_Library so 1039 is put before 108 I've proposed that on phab:T366703 but I'm told to discuss that with Commons community also. English Wikipedia uses the same config and the change from going from uppercase sorting to uca-default is discussed at phab:T136150. −ebrahimtalk 13:29, 5 June 2024 (UTC)

Obsolete, previously agreed to have, Commons:Village_pump/Archive/2024/04#h-Numerical_sorting_in_categories-20240401232200ebrahimtalk 17:24, 5 June 2024 (UTC)

Subcategory sorting broken

Did this get changed today?
Any idea why "M" for subcategories is between "A" and "C" on Category:Goethe streets ?
Also "next" on Category:Non-empty category redirects doesn't work anymore. Enhancing999 (talk) 14:38, 6 June 2024 (UTC)

@Enhancing999: Yes, according to phab:T362494 it seems to have been deployed about half an hour ago. I suspect that there may be some transient problems while sort keys get updated for the new ordering. --bjh21 (talk) 14:45, 6 June 2024 (UTC)
Weird. Let's given them a week to sort it out. Enhancing999 (talk) 14:51, 6 June 2024 (UTC)
Seems they gave up on it. Phab:T366809. [1] Enhancing999 (talk) 15:38, 6 June 2024 (UTC)

The find from the post-mortem at phab:T362494 seems to be that the script was run with the wrong options leading to change every sortkey, not just numeric ones. That it takes a long time to run shouldn't be that much an issue. Enhancing999 (talk) 09:15, 7 June 2024 (UTC)

@Enhancing999 That's not entirely correct. The problem is that the category collation script wasn't run at all, and running it would take weeks to months, during which categories would be broken in the ways you noticed. Because of the size of the Commons categorylinks database, this would cause more stress to the database than the database administrators are willing to tolerate. Using pure numeric collation instead of uca-default-u-kn would reduce the broken categories issue, but wouldn't change the database load issue. The size of the Commons database (specifically the tables for categories and templates) is so large that on its own it is causing stability issues (phab:T343131). We will need to take a hard and careful look at how we use categories and templates and reduce unnecessary uses of both, migrating data to SDC (which is stored more efficiently) where reasonable. Unfortunately we won't be able to do this on our own, it will need WMF support. AntiCompositeNumber (talk) 00:10, 10 June 2024 (UTC)
The two problems I reported here seem to be due entirely due to the wrong options being used. Or am I missing something? Enhancing999 (talk) 08:41, 10 June 2024 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. --Enhancing999 (talk) 12:11, 1 July 2024 (UTC)

sort

Any ideas about how to sort files in subcategories of Category:Photographs in the Golestan Palace Library by number? each subcategory might contain more than 100 files in the future. Hanooz 12:46, 7 June 2024 (UTC)

Either
  • by setting the album category with sortkey in a template
  • or by adding a sortkey in on the file sample.
Enhancing999 (talk) 13:33, 7 June 2024 (UTC)
Thanks. I'm looking for a more proper way as there are more than 3000 files like the one you mentioned. Hanooz 13:40, 7 June 2024 (UTC)
It should be fairly straightforward either way. Commons:Bots/Work_requests can help. Enhancing999 (talk) 13:49, 7 June 2024 (UTC)
User:Hanooz: This was requested at Commons:Village pump/Archive/2024/04#h-Numerical sorting in categories-20240401232200 and now is purposed and blocked on phabricator:T362494 and interestingly enough my involvement with the issue is because of the same category also. If this didn't happen we can prepend 0 to subcategories sortkey as a work around. −ebrahimtalk 14:26, 10 June 2024 (UTC)
I guess a three-digit sortkey must be added to each file. Hanooz 18:35, 10 June 2024 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. --Enhancing999 (talk) 12:11, 1 July 2024 (UTC)

Special:Search and broken thumbnails

Apparently this was fixed 2 years back, but somehow came back: phab:T320459 "Should not see squared, cropped thumbnails next to search results for files on Special:Search page on Commons".

What has changed since? How can we fix it again? @El Grafo, Matthiasmullie, and Raymond: Enhancing999 (talk) 10:53, 10 June 2024 (UTC)

Might have to do with the recent changes to MediaWiki:Common.css – @Ebrahim: could you check that please? El Grafo (talk) 12:23, 10 June 2024 (UTC)
Enhancing999, El Grafo: This isn't related to my change as that was about jQuery UI dialog in RTL and the code is available in several wikis so the change is MediaWiki side as far as I can tell but surely I want to help to fix it but I don't remember what the fixed situation looked like but have made this temporarily link so you can see if this is what you want which if so I can apply to be shown always −ebrahimtalk 14:40, 10 June 2024 (UTC)
@ebrahim: That would be an improvement. The images are no longer randomly cropped. Ideally, I guess lines for each result would have a similar height and the text would still align even if the images vary in actual width. A bit like the sample above (obviously with a larger text area). Thanks for looking into this. Enhancing999 (talk) 15:20, 10 June 2024 (UTC)
Enhancing999: I've applied the change I shown on the temporarily link but I don't know yet how to apply this one you've brought which indeed looks great −ebrahimtalk 15:52, 10 June 2024 (UTC)
Is there a way to revert or toggle this back to the squares or set a maximum height? The changes have resulted in vertically large images being huge and taking up several screenfuls of screen space. This is making using search to scan many images at once nigh on impossible. It is excruciating. Gnomingstuff (talk) 16:56, 10 June 2024 (UTC)
For a specific example of what I mean, search "Unicode Tangut 17000 to 17FFF". If an image with similar proportions shows up in search -- and they frequently do, even in my experience in a short span of time -- image search becomes massively, massively cumbersome. Gnomingstuff (talk) 16:58, 10 June 2024 (UTC)
I made some MediaWiki core changes to get rid of the table layout. It might be that it is related to that ? —TheDJ (talkcontribs) 18:50, 10 June 2024 (UTC)
Ok, this is definitely related. I wasn't aware that Commons had this override, so i couldn't take it into account when I was working on this. I have one small problem, in that I don't remember what sizing this used exactly before. I will test this out with my local MediaWiki install tomorrow and can then give you update CSS code for Commons to fix the problem. —TheDJ (talkcontribs) 21:11, 10 June 2024 (UTC)
Hmm, this was already broken for quite a bit before my change (ever since the new image html was in place like a year ago, although my change made it break harder). OK, what is it that we WANT ? I think we want consistent indentation of the text. Core currently specifies the image as 90px wide. And then we want portrait images to not get cut off. But we also need portrait to be limited, or some exceptional cases would span half the page. Let's say limit height to a maximum of 180px ? Then we want to preserve aspect ratio. We currently vertically align to the top, and horizontally centre. We could align left instead, that might visually look more consistent. Is that a good representation ?
There are some indications that Commons was using more than 90px wide... Does anyone know if Commons was using a larger image in the search results than other wikis ? —TheDJ (talkcontribs) 19:15, 11 June 2024 (UTC)
2021
2017
Ideally we would use a size that already exists, i.e. the thumbnail needn't be generate for the search.
Above screenshots from 2017 and 2021. I doubt that was 90px. Not sure if anything is even visible on 90px.
Categories use 120px, maybe a bit larger would be fine. Enhancing999 (talk) 19:30, 11 June 2024 (UTC)
Come to think of it .. for the size, couldn't we use the user's preferred thumbnail setting? Enhancing999 (talk) 21:55, 11 June 2024 (UTC)
The actual size of thumbnail never changes, just the scale at which we display it. Going too large will simply cause more pixelation. There is some play, I’ll check tomorrow how much. —TheDJ (talkcontribs) 23:11, 11 June 2024 (UTC)
Gnomingstuff: Your take is also totally understandable but this change is hard to revert for a specific user so consider my change temporarily till we see what User:TheDJ can come up with as honestly I don't remember how it looked like before the changes. −ebrahimtalk 06:53, 11 June 2024 (UTC)
@Ebrahim admittedly I am not a CSS expert but max-height on the container and object-fit on the image (to crop anything that falls outside the container)? Gnomingstuff (talk) 14:05, 11 June 2024 (UTC)
The idea is to avoid random cropping (who could possible want that). It really makes search results hard to read. Enhancing999 (talk) 14:08, 11 June 2024 (UTC)
I would want that. It makes search results even harder to read when I have to scroll 3 viewport heights just to get past one image. Gnomingstuff (talk) 15:11, 13 June 2024 (UTC)
I was awaiting TheDJ's fix and somehow I didn't notice the ping in MediaWiki talk:Common.css and I was checking here instead… The fix is applied and it looks great to me but if there a specific case where things needs to be improved please bring it here to see what we can do about it. Thanks! −Ebrahimtalk 21:35, 14 June 2024 (UTC)
Great! Thanks to both of you! Enhancing999 (talk) 22:00, 14 June 2024 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. --Enhancing999 (talk) 12:11, 1 July 2024 (UTC)

Are there any uses of this category by MediaWiki itself? We are discussing changing its name or scope at Commons:Categories_for_discussion/2019/06/Category:Pages_with_maps#June_2024. Enhancing999 (talk) 11:03, 13 June 2024 (UTC)

Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. --Enhancing999 (talk) 12:11, 1 July 2024 (UTC)

Want to know how to place a multi-page (4 page, pdf file) into a Spanish Wikipedia gallery?

I am the editor of the Spanish article of Juan Francisco Morales Llerena of Ecuador. What do I have to do to place a four page PDF file into the Gallery of Juan Francisco Morales Llerena's Wikipedia page. I had placed a few multi-page PDF files into "Juan Francisco Morales Llerena's" Gallery a few years ago, but I cannot do it now. Something has changed, am I right or wrong? Bg1948Bg (talk) 15:41, 19 June 2024 (UTC)

@Bg1948Bg take a look at Help:PDF#Using_PDF_within_Wikimedia_projects. RZuo (talk) 17:22, 19 June 2024 (UTC)
Thanks a lot. Will do. I was getting a bit frustrated, but I will never give up. General Juan Francisco Morales Llerena is too important of a historical figure to do that. Thanks. Bg1948Bg (talk) 17:51, 19 June 2024 (UTC)

@Bg1948Bg: see above. Enhancing999 (talk) 12:08, 30 June 2024 (UTC)

Thank you. I finally discovered what I was doing wrong. I had the Permission set On which kept someone else with Adobe Acrobat software to make changes to my document. I took Off the ability to block other people from making edits to my Adobe Acrobat document and the document opened to each page of the PDF without any problems. It might be a could idea, if Wikipedia would have this piece of knowledge published on their information sheet that tells how to insert a PDF into a Wikipedia article. Thanks again to responding to my inquiry. Bg1948Bg (talk) 13:07, 30 June 2024 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. --Enhancing999 (talk) 12:11, 1 July 2024 (UTC)

Displaying a DjVu file in another wiki

Hello,

I just imported a new DjVu file (File:Herrieu - Chansons populaires du pays de Vannes, 2e série, 1913.djvu) but the file is not displaying on the other wikis (see on br.wikisource or fr.wikisource for example).

Do I need to wait a bit ? Gwendal (talk) 11:57, 28 June 2024 (UTC)

It shows up for me now, so that's probably it. In the future, you can try purging the page on Commons to speed things up a bit. —CalendulaAsteraceae (talkcontribs) 00:41, 30 June 2024 (UTC)
Thanks, that was it. Gwendal (talk) 11:41, 30 June 2024 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. --Enhancing999 (talk) 12:11, 1 July 2024 (UTC)

Batch change of description in user category

Hi, I would like to change authorship description (author=RomanM82 to author=Roman Mifek) for all files in my user Category:Files by User:RomanM82. Can you help me? Thank you, RomanM82 (talk) 16:57, 30 June 2024 (UTC)

Try Commons:Bots/Work_requests. Enhancing999 (talk) 12:08, 1 July 2024 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. --Enhancing999 (talk) 12:11, 1 July 2024 (UTC)

Tech News: 2024-23

MediaWiki message delivery 22:32, 3 June 2024 (UTC)

You are invited to join the discussion about localization of the Cat-a-lot gadget at MediaWiki talk:Gadget-Cat-a-lot.js#MediaWiki:Mobile-frontend-return-to-page vs MediaWiki:Returnto. —⁠andrybak (talk) 21:59, 4 June 2024 (UTC)

Tech News: 2024-24

MediaWiki message delivery 20:17, 10 June 2024 (UTC)

New designs for logo detection tool

Mockup for an alert when a logo is detected

Hello all! We're happy to share that we will work on logo detection in the following months and that we defined an initial approach for this.

You can read more at the project page and you can have your say in the project's talk.

We want your feedback on it, and we need your insights on how to further tune the detection tool.

Thanks for your attention! Sannita (WMF) (talk) 13:55, 11 June 2024 (UTC)

Template presentation wigging out

{{By color}} is displaying some CSS on Category:Orange gradient. I don't recall seeing this before and have used this template on several other pages. —Justin (koavf)TCM 01:50, 13 June 2024 (UTC)

It seems to come from Template:Gradient, possibly transcluded there after a change by @OmegaFallon: on Template:By color [14] adding Template:Translated meta category name. Enhancing999 (talk) 03:18, 13 June 2024 (UTC)

Tech News: 2024-25

MediaWiki message delivery 23:46, 17 June 2024 (UTC)

New changes to the "Depicts" step in UploadWizard available on Beta Commons

Hi all! I wanted to announce that on Beta Commons a new version of the "depicts" step of UploadWizard is available for testing. This new version will be available until Monday afternoon. We're waiting for your feedback on it at the general Village Pump. Sannita (WMF) (talk) 10:30, 19 June 2024 (UTC)

Adding mediainfo to many files

How to apply this edit to another 60 files? I have used Upload Master, but on last step it tagged only one file instead of all files from batch upload. MBH 12:39, 18 June 2024 (UTC)

You can use Petscan and Quickstatemnts for that like this
  1. Open Quickstatements https://quickstatements.toolforge.org
    1. Login to quickstatements from top right corner login link (you need to do OAUTH authorization before the Petscan->Quckstatement integration works)
  2. Open Petscan https://petscan.wmflabs.org
    1. In tab "Categories" click link "commons"
    2. In tab "Categories" add value "Interior of B-396" to the categories box
    3. In tab "Page properties" check the value "File"
    4. Click Do it! -button
      1. There should be 104 results
      2. In top of the result list is text box with text: "Command list; "P31:Q5" to add, or "-P31"/"-P31:Q5" to remove statements". Change the value to "P180:Q4073829"
      3. Click check all
      4. Click start QS
        1. In quickstatements click Run
--Zache (talk) 13:11, 18 June 2024 (UTC)
*Zache Thank you, all done. MBH 11:43, 19 June 2024 (UTC)
User:Magnus Manske/sdc tool.js is way easier.
also, when you were using uploadwizard to batch upload, at the last step you can "copy statement to all files", which would have done exactly what you want to do. RZuo (talk) 15:45, 18 June 2024 (UTC)
@RZuo @Zache another question: I tagged English description of files as Russian [25] [26] , how to fix this? MBH 21:07, 20 June 2024 (UTC)
I would just use deepl, google translate, chatgpt etc to translate it to russian. Immediatly one could also just revert the edit, but in this case it doesn't work as system says that there is an edit conflict. --Zache (talk) 04:05, 21 June 2024 (UTC)
@MBH https://commons.wikimedia.org/w/index.php?title=File:View_from_Moscow_Sun_Ferris_wheel_19.jpg&diff=886167097&oldid=885974896
open the file page. a few lines below the file you can see two tabs "File information" and "Structured data". you can edit "Captions" in the "File information" tab. click the bin icon to delete a caption. click "publish changes" to save your edits. RZuo (talk) 07:31, 21 June 2024 (UTC)

Cat-a-lot still doesn't work well

Though this section was archived because the problem would supposedly have been resolved, Cat-a-lot still doesn't work for subcategories with at least one subcategory. So can this problem get a high priority and really be solved? It is now almost half a year that it arose. JopkeB (talk) 17:04, 6 June 2024 (UTC)

Also, could it be made to work on Special:MediaSearch? Or fix Special:Search to display the full images? Enhancing999 (talk) 09:12, 7 June 2024 (UTC)
Per MediaWiki_talk:Gadget-Cat-a-lot.js#Editing_"Expand"_on_English_Wikipedia: It seems to try to edit the local version of Expand, which hangs if that page does not exist and edits Expand if it does. This led to en:Expand getting fully protected, so Cat-a-lot skips categories with subcategories. –LaundryPizza03 (d) 00:50, 23 June 2024 (UTC)
@LaundryPizza03: Is that forever or can it be fixed? Until the beginning of this year it worked well. JopkeB (talk) 03:56, 23 June 2024 (UTC)
What are you talking about? –LaundryPizza03 (d) 05:31, 23 June 2024 (UTC)
Is the problem (which is getting worse, today I cannot even work with Cat-a-Lot on the Special:Search anymore, only within categories) due to last forever or can it be fixed? This is becoming more and more an unworkable situation. JopkeB (talk) 07:09, 23 June 2024 (UTC)

Tech News: 2024-26

MediaWiki message delivery 22:29, 24 June 2024 (UTC)

Interface administrator requests at MediaWiki talk:Gadget-Cat-a-lot.js

There are several edit requests for interface administrators at MediaWiki talk:Gadget-Cat-a-lot.js. The following edit requests have diffs with proposals. In order of importance:

  1. Bug fix: MediaWiki talk:Gadget-Cat-a-lot.js/Archive 3#Minor edit unmarking feature not working (Special thanks to User:Miraclepine for reporting the bug.)
  2. Localization fix: MediaWiki talk:Gadget-Cat-a-lot.js/Archive 3#Mobile-frontend-return-to-page
  3. UI tweak: MediaWiki talk:Gadget-Cat-a-lot.js/Archive 3#Please add link to Help:Gadget-Cat-a-lot in the box

The page MediaWiki talk:Gadget-Cat-a-lot.js already has instances of {{Edit request}}. Because of it, these new requests won't show up in watchlists of those watching Category:Commons protected edit requests for interface administrators. Hence this additional message at Village pump. —⁠andrybak (talk) 16:31, 15 June 2024 (UTC)

Lucas Werkmeister, as the most recently active interface administrator with recent edits in Gadgets, could you please take a look? —⁠andrybak (talk) 19:46, 16 June 2024 (UTC)
Did two of them, leaving the third one open for feedback for a moment. And yeah, the watchlist issue is a general problem with the current edit request system – MediaWiki talk:Copyupload-allowed-domains also suffers from it from time to time. Lucas Werkmeister (talk) 21:03, 16 June 2024 (UTC)
Thank you! I've struck out the completed requests above. —⁠andrybak (talk) 21:20, 16 June 2024 (UTC)
Third one also done, and I’ll see if I can deal with Valerio’s edit request too, to get this out of the category. Lucas Werkmeister (talk) 20:03, 19 June 2024 (UTC)
I've disabled Valerio's request. Nardog proposed a bugfix two days ago in MediaWiki talk:Gadget-Cat-a-lot.js § Random unexpected failures at enwiki. —⁠andrybak (talk) 00:01, 25 June 2024 (UTC)
Updated the links to the archived sections. Struck out the third request, which was implemented in Special:Diff/885487790. —⁠andrybak (talk) 19:24, 27 June 2024 (UTC)

Section MediaWiki talk:Gadget-Cat-a-lot.js#Random unexpected failures at enwiki has a patch, which is already tested. Could an interface administrator please take a look? —⁠andrybak (talk) 20:24, 8 July 2024 (UTC)

User:AntiCompositeNumber or User:Mike Peel, could you please take a look at the edit request by Nardog: MediaWiki talk:Gadget-Cat-a-lot.js#Random unexpected failures at enwiki? —⁠andrybak (talk) 13:28, 13 July 2024 (UTC)
User:Jarekt, could you please apply the edit request by Nardog to fix a bug in the Cat-a-lot gadget: MediaWiki talk:Gadget-Cat-a-lot.js#Random unexpected failures at enwiki? —⁠andrybak (talk) 08:34, 1 August 2024 (UTC)
Jarekt doesn't do js requests. Also, you might want to open a new section for new requests and mark it them as done once completed, otherwise the same happens here what you are trying to counter by posting here. As there is no interface admin board, maybe COM:AN should be used.
BTW Using cat-a-lot frequently myself, I appreciate that you are fixing it. Enhancing999 (talk) 09:17, 1 August 2024 (UTC)
Jarekt doesn't do js requests – oh man, let's try again, I guess: User:JopkeB brought up Special:Diff/876867555 below. Perhaps, MusikAnimal could help us, then? Could you please take a look at the edit request at MediaWiki talk:Gadget-Cat-a-lot.js#Random unexpected failures at enwiki? —⁠andrybak (talk) 10:27, 1 August 2024 (UTC)
andrybak, yes I do not speak javascript, so I am trying to leave those requests to people that do. But feel free to ping me for any template, Lua or protected file related requests. By the way, there is quite a backlog of javascript requests at Category:Commons protected edit requests for interface administrators, some of them going back to 2023 and maybe earlier. --Jarekt (talk) 14:23, 1 August 2024 (UTC)
Sorry for my delay in returning to this. I've implemented the change as suggested. Since we seem to be short-handed here, I'll have a go at Category:Commons protected edit requests for interface administrators as well. Note however I'm using my global interface editing rights – rights I do not hold locally here on Commons. I am always happy to help, but it does seem odd to keep coming back here when we have quite a few local users capable of handling these requests. MusikAnimal talk 17:24, 7 August 2024 (UTC)
Thank you for taking care of this. —⁠andrybak (talk) 20:35, 7 August 2024 (UTC)
This section was archived on a request by: —⁠andrybak (talk) 20:35, 7 August 2024 (UTC)

Cat-a-lot does still not work for all categories

I just saw that Commons:Village_pump/Technical/Archive/2024/02#Cat-a-lot_does_not_work_for_categories was closed: This section was archived because: Fixed in Special:Diff/876867555, see MediaWiki talk:Gadget-Cat-a-lot.js#Cat-a-lot failing 202402. —⁠andrybak (talk) 22:02, 4 June 2024 (UTC).
But this problem has still not be solved: when I use Cat-a-lot trying to move/copy categories that have subcategories, to other categories, the program still runs endlessly without doing anything. That is within a category and in the Special search mode. In the Special search mode there is also another problem: sometimes some files will not be moved, sometimes because they are already in the category (while at other times a message simply appears for that situation) and sometimes it is totally unclear why some files are not moving. Please do not declare this problem for the third time to be solved unless it really has been solved. JopkeB (talk) 08:27, 1 August 2024 (UTC)

JopkeB, thank you for bringing this up. The most recent discussion about this problem is at MediaWiki talk:Gadget-Cat-a-lot.js#Random unexpected failures at enwiki. An interface administrator is needed to apply the fix provided by User:Nardog. I've tried getting their attention at Commons:Village pump/Technical#Interface administrator requests at MediaWiki talk:Gadget-Cat-a-lot.js. Two weeks has passed since last message, we could try pinging another interface administrator. —⁠andrybak (talk) 08:32, 1 August 2024 (UTC)
Do I understand it well: somebody has changed the program in the test mode, the only thing that has to be done is an interface administrator to test it and if (s)he gives permission the solution can be implemented?
Would it help if I would put it on the meta:Community Wishlist? JopkeB (talk) 08:51, 1 August 2024 (UTC)
Yes to the first question. Probably no to the second. —⁠andrybak (talk) 10:28, 1 August 2024 (UTC)
Thanks a lot for your efforts to solve the problem, the update and your answers. JopkeB (talk) 16:12, 1 August 2024 (UTC)
Cat-a-lot works again like a charm! JopkeB (talk) 05:25, 8 August 2024 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. --JopkeB (talk) 05:26, 8 August 2024 (UTC)