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/2024/06 /Archive/2024/07.

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.

Can someone perhaps remove all the deleted and renamed files from User:Dispenser/Double extension so that only the ones that still need to be fixed are left? Jonteemil (talk) 20:46, 28 May 2024 (UTC)[reply]

Anyone can do so by forking the Quarry query mentioned in the SQL snippet (look for Fork in the upper right corner of the Quarry page), but I’m not comfortable editing a random other user’s subpage without seeing an explicit permission for doing so. —Tacsipacsi (talk) 17:37, 9 June 2024 (UTC)[reply]
I tried forking it, see quarry:query/83409, but it just keeps running. It has run for a week now, yet still running. Jonteemil (talk) 17:21, 11 June 2024 (UTC)[reply]
You could try to do just jpg ones or recent uploads.
At File:BSicon_numN327.svg.svg, I noticed the gui at Wikipedia lets you enter an extension and then adds it as well.
Before fixing individual files, I'd try to identify as many tools that create them and fix these first. Otherwise, more files will just be created. Enhancing999 (talk) 12:06, 1 July 2024 (UTC)[reply]

Searching with 'haswbstatement' doesn't seem to filter properly.

[edit]

See here for an example. I'm searching in the File namespace for incategory:"Photos by Grendelkhan" -haswbstatement:P170, which brings up files which do have creator (P170) defined on them. If I switch to incategory:"Photos by Grendelkhan" haswbstatement:P170, I get zero results. I'm confused. According to mw:Help:Extension:WikibaseCirrusSearch, this should be filtering on the presence of a structured data field, but if anything it's doing the opposite? grendel|khan 15:18, 30 May 2024 (UTC)[reply]

as i'm writing:
  1. Media in category "Photos by Grendelkhan" The following 200 files are in this category, out of 725 total.
  2. incategory:"Photos by Grendelkhan" -haswbstatement:P170 -> Results 1 – 30 of 725
  3. 725-725=0 = incategory:"Photos by Grendelkhan" haswbstatement:P170
RZuo (talk) 21:26, 30 May 2024 (UTC)[reply]
Exactly; all of those photos have creator (P170) statements on them, but the filtering isn't doing the right thing. grendel|khan 16:44, 3 June 2024 (UTC)[reply]

Tech News: 2024-23

[edit]

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

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

Cat-a-lot still doesn't work well

[edit]

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

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)[reply]
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)[reply]
@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)[reply]
What are you talking about? –LaundryPizza03 (d) 05:31, 23 June 2024 (UTC)[reply]
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)[reply]

Tech News: 2024-24

[edit]

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

New designs for logo detection tool

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

Protection level

[edit]

File:Kalocsaizsuzsa.jpg is autopatrol protected so why is there (protectedpagetext: editprotected, edit) system message on it? Is the Wikibase part of the page indeed under full (sysop) protection? --Geohakkeri (talk) 21:40, 12 June 2024 (UTC)[reply]

That is weird. The text This page is currently protected, and can be edited only by administrators. comes from Template:Protectedpagetext/PageProtected, but the expected text is at Template:Protectedpagetext/PageAutopatrolProtected. Both of these are transcluded by MediaWiki:Protectedpagetext depending on its first parameter $1. Here's the wikitext:
{{#switch: {{{1|$1}}}
 | editprotected = {{Protectedpagetext/PageProtected}} <!-- Fully protected -->
 | templateeditor = {{Protectedpagetext/PageTemplateProtected}} <!-- Template protected -->
 | editautopatrolprotected = {{Protectedpagetext/PageAutopatrolProtected}} <!-- editautopatrolprotected -->
 | #default = {{Protectedpagetext/PageSemiProtected}} <!-- Semi-protected -->
}}
Per mw:Manual:Interface/Protectedpagetext: $1 - the raw name of the right which is needed to edit the page. Special:ExpandTemplates for page File:Kalocsaizsuzsa.jpg and wikitext {{PROTECTIONLEVEL:edit}} gives editautopatrolprotected, as expected, but "protection level" and "name of the right" might not be the same. —⁠andrybak (talk) 20:08, 15 June 2024 (UTC)[reply]
editautopatrolprotected was added to MediaWiki:Protectedpagetext in Special:Diff/853065284 by User:GPSLeo, who is also the author of Template:Protectedpagetext/PageAutopatrolProtected. Perhaps they can check what went wrong. —⁠andrybak (talk) 20:15, 15 June 2024 (UTC)[reply]
This is the relevant code, I guess. There are editprotected and editsemiprotected hardcoded as the only options there. --Geohakkeri (talk) 20:51, 15 June 2024 (UTC)[reply]
So, if MediaWiki:Protectedpagetext depended on {{PROTECTIONLEVEL:edit}} rather than the proper parametre, it would be a quick fix at least. --Geohakkeri (talk) 21:11, 15 June 2024 (UTC)[reply]
Hmm. For reference, English Wikipedia's en:MediaWiki:Protectedpagetext has a similar #switch, with protect, editprotected, templateeditor, and extendedconfirmed.
Searching the code of MediaWiki,[1] I also found mentions of Protectedpagetext in PermissionManager.php,[2] which passes as the first parameter $1 either the string protect or a variable $right, which comes from function getRestrictions of RestrictionStore. My knowledge of PHP is limited, but I'd guess that possible values for restrictions come from $wgRestrictionLevels, hence templateeditor and editautopatrolprotected in Commons' version and templateeditor and extendedconfirmed in enwiki's version. —⁠andrybak (talk) 22:15, 15 June 2024 (UTC)[reply]
{{MediaWiki:Protectedpagetext|{{PROTECTIONLEVEL:edit}}}} on File:Kalocsaizsuzsa.jpg would display Template:Protectedpagetext/PageAutopatrolProtected.
Wonder if it works correctly on enwiki, w:Special:WhatLinksHere/Template:Protected_page_text/extendedconfirmed has no uses.
https://commons.wikimedia.org/wiki/File:Kalocsaizsuzsa.jpg?uselang=qqx shows (protectedpagetext: editprotected, edit)
Not sure what {{CASCADINGSOURCES}} is meant to do.
Maybe we could insert a switch based on Protectionlevel after "|editprotected =". Enhancing999 (talk) 15:15, 30 June 2024 (UTC)[reply]
I tried to look into this at test.wikipedia.org, but the settings there are different.
Here what is displayed on a file description page comes from javascript var "wbmiProtectionMsg". This might be filled with the actual protection level of the javascript source. Enhancing999 (talk) 12:16, 1 July 2024 (UTC)[reply]

Footnotes

  1. git grep -i protectedpagetext -- '.' ':^languages/'
  2. note the manual mapping of sysop and autoconfirmed needed for backwards compatibility

Template presentation wigging out

[edit]

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

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

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

[edit]

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

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)[reply]
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)[reply]
Thank you! I've struck out the completed requests above. —⁠andrybak (talk) 21:20, 16 June 2024 (UTC)[reply]
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)[reply]
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)[reply]
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)[reply]

Tech News: 2024-25

[edit]

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

Adding mediainfo to many files

[edit]

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

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)[reply]
*Zache Thank you, all done. MBH 11:43, 19 June 2024 (UTC)[reply]
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)[reply]
@RZuo @Zache another question: I tagged English description of files as Russian [24] [25] , how to fix this? MBH 21:07, 20 June 2024 (UTC)[reply]
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)[reply]
@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)[reply]

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

[edit]

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

Upload functions used by various tools

[edit]

Just wondering, is there a technical difference in the backend between the following ways:

Some observations:

  • I'd expect #1 and #2 to be the same, but somehow uploads are less likely to fail if one creates the file description page first and then uses the "upload" link there (#2).
  • The documentation for #4 mentions the api. Presumably this is the same being used by #5. The test I did with #4 seemed to work better than #3 usually does.

If ask for ranking the reliability of these tools, I'd say #5/#4, #2, #1, #3. Enhancing999 (talk) 15:29, 24 June 2024 (UTC)[reply]

Tech News: 2024-26

[edit]

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

Tech News: 2024-27

[edit]

MediaWiki message delivery 23:56, 1 July 2024 (UTC)[reply]

Cleaning up list of followed pages / How to limit an extended watchlist?

[edit]

Hi, is there a way to do a mass cleanup of the list followed pages? My list is so long that it frequently refuses to load (it times out). I want to keep a much smaller collection of files on the list. How can I mass remove selections of files, like the complete contents of some categories and their subcategories. What's the best practice to do this? Or even only follow what happens to my personal uploads. Peli (talk) 12:20, 2 July 2024 (UTC)[reply]

have you reviewed Special:Preferences#mw-prefsection-watchlist? so that you dont keep adding much more to your list. RZuo (talk) 13:59, 2 July 2024 (UTC)[reply]
@Pelikana: You can get the raw contents of your watchlist from Special:EditWatchlist/raw, and you can then edit it either in your browser or in the text editor of your choice. I can't immediately think of a way to winnow it by category, but it looks like it's sorted by when items were added so it might be that the items you want to remove are conveniently close together. --bjh21 (talk) 23:17, 2 July 2024 (UTC)[reply]

Below Commons:Copyright rules by subject matter#Toys there is a heading that isn't working, namely ==Trademarks and logos==. Can someone fix it? I wasn't able to. Jonteemil (talk) 15:30, 2 July 2024 (UTC)[reply]

✓ Erledigt --Geohakkeri (talk) 15:42, 2 July 2024 (UTC)[reply]
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. Thanks. --Enhancing999 (talk) 10:19, 3 July 2024 (UTC)

I don't know why this picture looks like it was damaged. If someone knowledgeable about this can fix it, that would be for the best.--125.230.78.179 10:57, 3 July 2024 (UTC)[reply]

Let’s ping User:Sreejithk2000 as an involved admin. --Geohakkeri (talk) 11:13, 3 July 2024 (UTC)[reply]
I don't know either, but I reverted it to the old version. Yann (talk) 11:13, 3 July 2024 (UTC)[reply]
From the file history, I see that the file was overwritten at one point and I moved the overwritten file to File:HarukiKuramochi20230723-1.jpeg. I don't exactly remember how this image got corrupted though. --Sreejith K (talk) 14:09, 3 July 2024 (UTC)[reply]