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

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)
  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)
  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)
 
 
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)
  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)

  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)
  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)
  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)
  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)