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/09 /Archive/2024/10.

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.

Vandals often move captions to other languages – detection needed

[edit]

What's going on with people somewhat apparently systematically moving captions from one language to a false one? This is happening frequently and often, if not usually, not detected & reverted by editors.

Could a detection of this please be developed? Compared to other vandalism that is well-detected automatically on Wikipedia by for example ClueBot NG (acc) I think it would be easy to detect if a caption got moved from the original language to another one, if possible with language detection so it also checks if the language it was moved indeed does not match the caption text language. Maybe a better place to ask about this would be the Bot requests or the ClueBot NG talk page / code repo.


Examples

Previously I was wondering how to search my contributions (edit summaries). I was trying to use standardized phrases or terms in edit summaries so I can easily look them up later, for example to replace texts I previously added with templates. I found the following useful tool and because I try to always use term "rvv" when reverting edits that are or seem to most likely be vandalism many examples of such edits can be found here. These are the most recent ones: 1 2 3 4 5 6 7. By the way, I think captions are more a problem or redundant than anything else since there already is the machine-translatable description field (it's useful sometimes when descriptions are long but these could also instead have a short version at the top or be shortened). Another problem is that when undoing changes to captions there is no prefilled edit summary so one has to tediously copy the contributions link of the user and write the edit summary anew. Prototyperspective (talk) 13:04, 17 August 2024 (UTC)[reply]

Given how often this happens (I was able to find a couple of recent instances in a few minutes of looking through RecentChanges) and how weirdly specific of an action it is (it only changes the language of the caption, never its content), I suspect this is a UI/UX issue, not deliberate vandalism, and I suspect it can be addressed by making some changes, like inserting a confirmation dialog when changing the language of an existing caption.
Does anyone know how/where the caption editing interface is implemented, and who's responsible for it? (I also have a couple of gripes about the language picker used in the caption interface - especially its appearance on mobile.) Omphalographer (talk) 05:16, 18 August 2024 (UTC)[reply]
you're right. try File:JPG Test.jpg.
given existing captions, users can change the language and then click publish. that results in the aforementioned problematic edits. RZuo (talk) 05:30, 18 August 2024 (UTC)[reply]
There is the new feature to require captchas for action defined in an abuse filter. I thought about requiring captchas for all IP edits on captions. This might reduce these king of accidental edits. GPSLeo (talk) 05:36, 18 August 2024 (UTC)[reply]
  • Could be but sometimes they do change the text or change multiple languages at once and it seems like it's always only done by new or unregistered users who sometimes did some other different problematic changes.
  • Another thing that could be done is automatic detection of the language and displaying at least a warning or adding the file to a maintenance cat if it doesn't match the specified language – this would also be useful since often people specify the wrong language even at upload.
  • @RZuo: What do you mean? Why would Omphalographer be right in that this is a UI/UX issue? What you described is exactly the expected behavior: changing the language and then clicking publish, how does this suggest it's not vandalism and a UI issue? I don't see why you and GPSLeo think it would be accidental / an UI issue if one has to deliberately click "publish".
  • Even if both captchas are added and they indeed reduce these changes, I still think there should be automatic detection of these changes as well as other likely vandalism. Why is ClueBot_NG not active on WMC? Does ORES work with WMC? There's lots of vandalism here (not just in the captions and the relatively hidden structured data) and I've come across multiple cases where it stayed on a relatively large page for a year or so. Bots/tools could build a queue of edits to check as well as automatically revert edits that are very likely to be vandalism. Moreover, they could learn from edits that specify that the reverted edit was likely vandalism or similarly nonconstructive (it doesn't matter if deliberate or not) if terms like RVV are used.
Prototyperspective (talk) 10:07, 18 August 2024 (UTC)[reply]
People are on a website an they see a language selection. They want to change the language of the text. They do not expect that they are able to change the content on a website where they do not even have an account. The button says publish but how is this translated into different languages and are these translated terms always that clear? GPSLeo (talk) 10:37, 18 August 2024 (UTC)[reply]
This type of "vandalism" is so specific that it would basically have to be a very dedicated LTA who utilizes IPs from all around the world; it's disruptive but I don't think it's deliberate. Gnomingstuff (talk) 04:49, 26 August 2024 (UTC)[reply]
Yes I think the explanation by GPSLeo is quite plausible. The main subject of this thread however is detecting such edits and auto-reverting them (also useful for other unconstructive edits / reducing maintenance workload) regardless of whether or not they are intentional or not. I don't know what you mean by "LTA" but it could have also been many people that found this to be an effective type of vandalism as it's often not detected and reverted but I already think inadvertent edits may be more likely. Maybe there could be some special confirmation box asking if the user really wants to publish that to the file data without using the word "publish" because maybe those users didn't understand that word. In any case, detecting if the text in the caption matches the languages seems useful and needed in any case, for example because many users add captions in English to other languages at upload or similar things. Prototyperspective (talk) 09:52, 26 August 2024 (UTC)[reply]
Something in the GUI needs improvement. It's plausibel that changing the language and saving it actually adds an additional language rather than deleting one as well: [1] Enhancing999 (talk) 10:10, 26 August 2024 (UTC)[reply]
LTA = long-term abuse, people who vandalize in their specific identifiable way for months or years.
The main tells on these are edits by infrequent editors with 2 changes per file. Not much help though once it's out of recent changes. I've found some by searching for captions with mismatched languages e.g. "Spanish the," but obviously that only works with certain patterns.
The problem though with any kind of auto-reverting is that it would have to not catch people fixing this stuff, especially when it's undetected. Gnomingstuff (talk) 11:29, 27 August 2024 (UTC)[reply]
Many don't have 2 changes per file. I think the main indicators are 1. language does not match specified caption language (no other indicator is needed; check language auto-detection of Google Translate or DeepL to see what I mean with language detection) 2. user isn't an editor with many unreverted edits (would only use this indicator early on as language mismatching is a general problem).
I don't understand what you mean with The problem though with any kind of auto-reverting is that it would have to not catch people fixing this stuff. People fixing this stuff would move the caption back to its matching language or remove the flawed captions so they wouldn't be detected. Prototyperspective (talk) 11:51, 27 August 2024 (UTC)[reply]
The solution may be mw:Moderator Tools/Automoderator but I don't know if it also checks changes to captions, does it? Prototyperspective (talk) 10:51, 18 September 2024 (UTC)[reply]
Can Automoderator detect these changes? People still move the captions. Maybe it's indeed some interface issue where things aren't clear and people think moving the caption to another language and then clicking "Publish" (or a translation of that word) would show the caption in their language. Prototyperspective (talk) 10:43, 25 September 2024 (UTC)[reply]
[edit]

With videos it is possible to specify a start (and end) time of the video – see Commons:Video#Temporal media fragments.

  • Is it possible to link to times of the videos in the file description?
  • Is that already possible somehow for audio files?

I think it would be very useful if in the file description of Spoken Wikipedia audio files, like those that I just uploaded, there were links to the different sections of the article. If one is only interested in a particular section of the article one could jump to it directly and listen to only that. It also gives some orientation where one is currently at when listening to articles. Linking to chapters is possible on YouTube and probably many users have already noticed some ways this can be useful. For example, I'd like to link the timestamps in the description here and add timestamp links to the different exercises here.

This doesn't seem to work with videos either as one would have to append ?start=00:26 but can only append things like #start=00:26. Is there some issue about these things? Prototyperspective (talk) 12:46, 22 August 2024 (UTC)[reply]

There isn't really a universal chapter methodology in HTML5 video. The HTML5 idea is that you create your own VTT file (which we don't yet support). These could refer to Commons link (they can be anything you like, as all support for it is completely custom work). Then you write custom Javascript to listen to the timedtext events, read the 'text' (a description and link in this case) and go do something with that (wrapped inside a videojs custom plugin).
Related tickets about this in phabricator. phab:T116154, phab:T301826. —TheDJ (talkcontribs) 18:08, 25 August 2024 (UTC)[reply]
You can link to start points in the file description page using start= and end= query params like:
File:Using_a_Power_Rack_in_bodybuilding,_powerlifting,_strength_training,_resistance_exercise.webm?start=00:10&end=00:15, but it is not that useful, as there is no autoplay etc. —TheDJ (talkcontribs) 18:14, 25 August 2024 (UTC)[reply]
  • The two issues you linked don't seem to be related to this at all. What you wrote is about annotations like a link or a balloon message informing about an inaccuracy in the video at specific times of the video. In contrast this post here is about video chapters and linking to different times of the video in the file description.
  • Yes, I know that one can link to start points that way and explicitly said that in the last paragraph. As said, one would need to link to these from there like #start=00:26 because when including a link like your example, it opens the video in a new tab at that starting point instead of directly jumping to it.
  • This is really important for Spoken Wikipedia where you may like to jump to a particular section. There also needs to be some proper audio player, with the current one only being the fallback, that for example is wider so you can jump to some timing better and with a -10 seconds feature.
Prototyperspective (talk) 10:49, 26 August 2024 (UTC)[reply]
It generally needs a modern improved audio-player that has not only chapter/timestamp-link functionality, but also several other widely established standard features (one could use an existing open source audio player). Prototyperspective (talk) 10:54, 18 September 2024 (UTC)[reply]
Wishlist proposal for this now is here: meta:Community Wishlist/Wishes/Video & audio chapters (jump to timestamp). Prototyperspective (talk) 18:15, 16 October 2024 (UTC)[reply]
[edit]
Sharing in LINE.
Image being shared in sample

Odd, the link preview in LINE looks so unfriendly: File:Sharing Commons files in LINE.png Jidanni (talk) 13:31, 28 September 2024 (UTC)[reply]

The text is from MediaWiki:Upload-disallowed-here. The question is if Commons places that text too prominently or if LINE (software) just picks the wrong string (likely if it doesn't happen with most others). This should probably be reported at LINE instead.
 ∞∞ Enhancing999 (talk) 19:49, 28 September 2024 (UTC)[reply]

Search box for category pages

[edit]

Template:Search inside category is a neat template that can be manually added to category pages to add a search box where even unexperienced users can search the category contents.

This is most if not only useful when also searching subcategories so I forked it to Template:Search box inside category to use the deepcategory search operator that also searches subcategories. The problem with that is that it doesn't work in many categories where it would be most useful since deepcategory only works for relatively flat categories, not those with deeply nested subcategory branches. I created phab:T369808 and this was recently improved. However, it still fails on large categories and I think instead of failing it should show the results up to some level of subcategory depth and show a warning that not all subcategories could be included (maybe even list them).

Two examples where I think the search box searching all subcategories is useful: Category:Our World in Data and Category:Videos by Terra X.

Aside for the deepcategory issues there are now two further problems which is why I'm posting here:

  • How can it be made to use MediaSearch instead of the older SpecialSearch? (I've also asked here at mw:Extension:InputBox earlier)
  • This |namespaces= parameter doesn't seem to work – how can the box be made to search only Files?

Maybe at some point it (or a variant of it that is for example much smaller) could be added to category pages by default or to the Wikidata infobox. Better than these approaches would be if the Wikimedia search engine could show a dropdown whether to search all Wikimedia Commons or only the current category. The default would be to search all of WMC so the search experience for somebody looking to search all of Commons would stay the same but when looking to search only the category one would only need to select the second dropdown after entering some search terms into the box. This is like on GitHub where when entering something into the search bar when on some repository page (like this page) it shows the dropdown options "Search in this repository" or "Search all of GitHub".

If nobody knows, another page where to ask this would also be very useful.

--Prototyperspective (talk) 22:21, 28 September 2024 (UTC)[reply]

The search mode (MediaSearch vs. SpecialSearch) should default to the user's preferred choice. Commons:Village pump/Technical may be a better venue for, er, technical questions. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 12:57, 29 September 2024 (UTC)[reply]
I have configured MediaSearch to be the default but it searches SpecialSearch. Okay, I'll move this discussion there. Prototyperspective (talk) 20:44, 29 September 2024 (UTC)[reply]

Tech News: 2024-40

[edit]

MediaWiki message delivery 22:15, 30 September 2024 (UTC)[reply]

Uncaught error

[edit]

Its been several times that I get an uncaught error when clicking on Find possible candidates (Autopatrol) as suggested on Commons:Requests for rights#Autopatrol. The error it shows is Uncaught Error: Syntax error, unrecognized expression: #https://commons.wikimedia.org/wiki/Commons:Requests_for_rights/possible_autopatrolled_candidates from https://commons.wikimedia.org/w/load.php?lang=en&modules=ext.discussionTools.init%7Cjquery%2Coojs-ui-core%7Cjquery.ui&skin=vector&version=1ewe9 at line.... - difficult to even copy but I managed copying this much. Can anyone take a look? Regards, Aafi (talk) 04:57, 2 October 2024 (UTC)[reply]

Blank PNG preview of SVG file

[edit]

The article "en:Ordinary differential equation" used "File:Parabolic trajectory.svg" until User:204.18.91.249 removed it in this edit with the comment "there is no graph or picture. i delete it so some one notice it".

Indeed, all the previews on the page Parabolic_trajectory.svg are blank, although the original file is fine in Chrome. The file has not been changed since 2007, so I guess that the previews were previously working.

What is the best way to get this resolved? JonH (talk) 07:40, 2 October 2024 (UTC)[reply]

Many SVG previews are not working – here is another example (it lost the thumbnail after @Quiddity (WMF): updated it). I asked about it on its talk page, at least for finding out some info about what could be the cause. The best way would probably to create an issue on phabricator which likely just collects dust there for around a decade since there's too few active developers and maybe such an issue already exists (if so please link it here, I couldn't find it). Prototyperspective (talk) 09:23, 2 October 2024 (UTC)[reply]
@JonH: Malformed viewBox attribute: viewBox="". Fixed. Affected by renderer update in April 2024. Glrx (talk) 17:01, 2 October 2024 (UTC)[reply]
@Girx: Thanks for fixing this and restoring "en:Ordinary differential equation". JonH (talk) 00:56, 3 October 2024 (UTC)[reply]
@Prototyperspective: . File:Community Engagement - Maps of teams and workflows.svg had a bad illustrator namespace definition. Fixed. Glrx (talk) 17:09, 2 October 2024 (UTC)[reply]

Better triage for users starting cfd

[edit]

Quite often we see cfd like Commons:Categories for discussion/2024/09/Category:Deforestration in Turkey, which doesnt need cfd but a simple speedy tag, but MediaWiki:Gadget-AjaxQuickDelete.js doesnt currently have any info about this.

short term solution: add info to the popup so users can see the easier way before they start a cfd and copypaste the speedy tag.

long term solution: let the popup provide two modes for users to choose from: speedy and cfd.

the code to change is probably around MediaWiki:Gadget-AjaxQuickDelete.js#L-493. RoyZuo (talk) 12:24, 2 October 2024 (UTC)[reply]

It could be added explained on MediaWiki:Gadget-AjaxQuickDelete.js/DiscussCategoryInfo if that was displayed by default.
 ∞∞ Enhancing999 (talk) 09:14, 12 October 2024 (UTC)[reply]

Some files for Wikisource aren't loading properly (important!)

[edit]

See, for example, File:The Dream-Quest of Unknown Kadath.pdf – it seems like the JPG previews aren't loading? This is causing a problem at s:en:Index:The Dream-Quest of Unknown Kadath.pdf, because the images of the individual pages which we transcribe aren't loading. For example, go to s:en:Page:The Dream-Quest of Unknown Kadath.pdf/5 – the right hand side of your screen should not be empty, it should hold an image of the relevant page – see s:en:Page:Songs of a Cowherd.djvu/13 for an example.

This appears to be a problem at Commons' end. Please, does anyone know how to fix it? It is quite problematic for Wikisource, and I have noticed a similar effect elsewhere (see s:Wikisource:Scriptorium/Help#PDF_images_not_loading).

Thank-you. Cremastra (talk) 14:19, 3 October 2024 (UTC)[reply]

I think @Sannita (WMF) is checking it.
 ∞∞ Enhancing999 (talk) 21:20, 3 October 2024 (UTC)[reply]
Hi @Cremastra, thank you for reporting this malfunction. Would it be a problem for you to file a bug report on Phabricator about it, and then link it here to me? If you can't, I can do it and then relay it to the team. Let me know! Sannita (WMF) (talk) 08:27, 4 October 2024 (UTC)[reply]
Given the answer in Commons:Village_pump/Technical/Archive/2024/07#Problems_with_PDF_Preview, I think we can trust it has already been reported but fixing it isn't a priority. Workaround would be to upload page-by-page in jpg format.
 ∞∞ Enhancing999 (talk) 11:49, 4 October 2024 (UTC)[reply]
Page-by-page uploading is not better, and almost never is. It's always a technical nightmare, as a lot of stuff that is done automatically for normal indexes has to be done by hand for page-by-page uploading.
This so far appears to have happened only to pdfs, so hopefully it won't happen to djvus. The day we aren't able to load page images for any multi-page files, Wikisource is pretty much over.
This appears to be spreading, and if it really isn't high-priority, then the foundation is telling us all to go to hell. — Alien  3
3 3
06:51, 5 October 2024 (UTC)[reply]
@Sannita (WMF) Great to hear that the WMF is aware and working on this. I honestly have no idea how Phabricator works (and I almost never look at it anyways), and it seems to require a connected e-mail address, which I don't have, so if you could file a report, that would be really good. Thanks, Cremastra (talk) 19:40, 4 October 2024 (UTC)[reply]
It's gotten worse. At least one index that used to be fine (s:Index:Travels in Europe and Northern Africa. A woman's view (IA travelsineuropen00rose).pdf is now breaking, so no further pages can be proofread. Can this be listed "top" priority on phabricator? Cremastra (talk) 22:47, 4 October 2024 (UTC)[reply]
By the way, the error I get when I try to view the image file alone is error 429: too many requests'. The details are Request from [my IP adress] via cp1111 cp1111, Varnish XID 890103130 —— Upstream caches: cp1111 int. Does this have something to do with w:Varnish (software) (mw:Manual:Varnish caching)? I'm now totally out of my depth technically, so I don't think I can do anything to help. Cremastra (talk) 22:52, 4 October 2024 (UTC)[reply]
I've hopefully addressed this issue on the thumbnailling service and I'm seeing successful rendering in many of the linked files- please let us know on Phabricator if there are any files continuing to fail. Additionally, it's not acceptable that this issue happened without automatic detection on the server-side before it became a widespread issue for users, so we'll be implementing improved monitoring next week to ensure that if similar issues should happen they'll be dealt with promptly. HNowlan (WMF) (talk) 18:22, 5 October 2024 (UTC)[reply]
@HNowlan (WMF) Thank you for catching this! -- Zache (talk) 05:49, 6 October 2024 (UTC)[reply]

How to search fields of files' Information template?

[edit]

For example, how could one search file description for a term like "Kathmandu" (as asked about by another user here) like on can search with intitle. description:"Kathmandu" does show some results but I don't know what it does and the results don't have that word in their description. I could not find info on this at mw:Help:CirrusSearch either. Info how to search specified fields of {{Information}} should be added here.

One could also use this to infer categories (such as by reading the date field and then adding it to a category by date like "Videos of {year}") as proposed here. This may also be needed for a date range filter, see phab:T329961. I'd like to search the date field but there is no information on how to do that at Help:Searching but I think it's already possible if I remember correctly. For example, I found that many files in deepcategory:"NASA videos from unidentified year" deepcategory:"Videos of 2020‎" have been miscategorized into Videos of 2020 (and thus should not be copied into "NASA videos in 2020" from there) where they have the correct date in the date field which is why I'd like to use that to correct that as well as copy them to their year category in Category:Videos from NASA by year. Prototyperspective (talk) 19:03, 6 October 2024 (UTC)[reply]

Prototyperspective (talk) 12:16, 10 October 2024 (UTC)[reply]
Here EBernhardson (WMF) said Unfortunately, the image description is simply an argument to a template. CirrusSearch doesn't do anything at that level and can't be that specific..
I think the best workaround currently would be to use the insource search operator with the field name first so for example I searched for insource:"|source=[https://soundcloud.com to identify files for Category:Audio files from Soundcloud.com. I think easily searching fields of the File pages' Information template could be enabled by
  1. Developing some regex that searches for any content after e.g. |source=
  2. Creating some alias for it so instead of writing some complex regex query every time one can simply enter e.g. info-source:"soundcloud.com"
Please comment what you think about this proposed way to make this possible and if you have any info on what would be needed for that. Prototyperspective (talk) 13:06, 23 October 2024 (UTC)[reply]
[edit]

Example: An edit to a file changed its [en] caption to "28th September 2024 Sunday", but the preview in its diff and permalink displays not that but another text: "An introduction to persistent identifiers as part of a FAIR data landscape", which is the caption from the latest revision (made in diff). Previews in diffs and permalinks should display their specified revision, not the latest. -- Wotheina (talk) 05:05, 7 October 2024 (UTC)[reply]

My guess is that it shows always the latest caption? Another note, the caption box is not visible with OS X and Safari browser when I am looking the old revisions of the file pages. --Zache (talk) 07:07, 7 October 2024 (UTC)[reply]
I think Wotheina's bug has confused me before too. Is there a Phabricator: task for it? I did a quick search but I am not the best at finding bugs there. Also the Safari bug should be filed too. Commander Keane (talk) 21:45, 23 October 2024 (UTC)[reply]

Tech News: 2024-41

[edit]

MediaWiki message delivery 23:37, 7 October 2024 (UTC)[reply]

image updates

[edit]

Hi all, the attached image here updates as the user uploads new version every day. I would like to put a version which is current at a particular time but does not update itself when the user uploads a new version. How can I do this? Thanks in advance. Gryllida (talk) 01:20, 8 October 2024 (UTC)[reply]

Another way to phrase this would be how to specify a version of a file when using a file from WMC in other Wikimedia projects like Wikipedia. This would also be very useful for Our World in Data datagraphics where one may want to show a particular year in some article but have this site not get flooded with 100 or so charts per subject and the file by default always be up to date. I'd like to know how the specify the file version as well and if it's not yet possible please link the code issue on phabricator if there is any. See also Category:Wikipedia updating. Prototyperspective (talk) 13:00, 8 October 2024 (UTC)[reply]
@Gryllida: As the template on File:Milton 2024 track.png says, "If you wish to use a specific version of the file without it being overwritten, please upload the required version as a separate file." So download the file as it currently is and upload it under a different name (for instance with the date and time at the end of the name). The fiddly bit will be getting the description right: you might be able to work out how to modify the description of the existing file to be appropriate for a static one, but I'd be inclined towards the lazy approach of just making a generic description using {{Information}} or the Upload Wizard. As long as you get the copyright information right, it should be fine. --bjh21 (talk) 14:38, 8 October 2024 (UTC)[reply]
I would use mapframe from mw:Help:Extension:Kartographer. You can add JSON to specify tracks, markers and colors.
Map
Gulf of Mexico.
Glrx (talk) 17:09, 8 October 2024 (UTC)[reply]
I don't think @Supportstorm has a json version for this? Gryllida (talk) 03:28, 9 October 2024 (UTC)[reply]
Bjh21 is correct in that if you want a specific version of the file it needs to be uploaded separately. These hurricane tracks get updated consistently until the final best track is published. I've experimented with the map extension before, but it's really restrictive in what track maps should be. I could export the dataframe in my code to json for a map, but I don't want to spend time making a map look "pretty." Someone else would need to do that. Supportstorm (talk) 05:01, 9 October 2024 (UTC)[reply]
It's not too hard to generate the JSON, but I can't see any way to make the markers show up on their own, without the upside-down-teardrop callouts. That style works fine for maps of locations of cities or whatnot, but it's not right for this type of map. Might need a feature request.
Example: Track of Hurricane Milton. (I haven't implemented full marker rendering in this demo; if this were the real thing the markers would be different shapes and would be colored.) Omphalographer (talk) 23:37, 10 October 2024 (UTC)[reply]
[edit]

Is the statement at the header of Commons:Village pump/Technical: Feature or bug reports should be filed on Phabricator misleading?

See discussion at phab T367888: I'd say the Commons is welcome to fix misleading statements on Commons:Village pump/Technical - it's up to each developer/maintainer where they prefer to maintain/plan their software and its feature requests or issues. :) Waddie96 (talk) 15:43, 11 October 2024 (UTC)[reply]

1. That developers could do so doesn't mean that they do so. 2. If they do so then it would not be this page but e.g. MediaWiki talk:Gadget-HotCat.js. 3. Code issues are often discussed here first before an issue is created and this is good for many reasons in various circumstances and for various kinds of issues.
However, it could be altered to say that this is about MediaWiki core and core tools managed through phabricator and one could also add that even such things can still be discussed here. Prototyperspective (talk) 17:49, 11 October 2024 (UTC)[reply]

The template needs some fixes, see Template talk:Numbercategory-vrp.
 ∞∞ Enhancing999 (talk) 07:36, 12 October 2024 (UTC)[reply]

Vector-2022 and night mode

[edit]

I think it's time to make Wikimedia Commons switch both to Vector-2022 skin and enable the night mode for anonymous users, just like the English Wikipedia. Many Wikipedia's have Vector-2022 as the default skin and many more is getting it https://phabricator.wikimedia.org/T375549 and having night mode more exposed to regular contributors of Wikimedia Commons is essential to know we our file descriptions that are fetched to different Wikipedia languages are also compatible with night mode and latest UI changes of Wikipedia. −Ebrahimtalk 08:40, 12 October 2024 (UTC)[reply]

Has anything changed about Vector-2022's suitability for Commons? Otherwise we might as well wait for Vector-2025. Nightmode should be made available for all skins.
 ∞∞ Enhancing999 (talk) 09:11, 12 October 2024 (UTC)[reply]
100% support. switching will highlight the errors and will get people to fix them. Waiting is just delaying to do the same thing after the delay. —TheDJ (talkcontribs) 12:19, 14 October 2024 (UTC)[reply]
If it's already known to not work, better spare it then.
 ∞∞ Enhancing999 (talk) 14:36, 14 October 2024 (UTC)[reply]
Wikimedia Commons could be asked to be included to https://night-mode-checker.wmcloud.org/ also and then next step could be to start to fix the known errors. --Zache (talk) 16:45, 14 October 2024 (UTC)[reply]

Faulty SVG File: File:Ilbe logo.svg

[edit]

I recently come across File:Ilbe logo.svg.The file fails to display, and the following message is displayed. Apparently the error message differs from the one mentioned in #Problem in File:Typhoon-Yagi 5.jpg.

This page contains the following errors:
error on line 8 at column 113: Namespace prefix inkscape for groupmode on g is not defined
Below is a rendering of the page up to the first error.

Interestingly, the version on 2016-12-04 is not affected. I also find File:Ilbegay Pride Flag.svg (which appears to be a rainbow flag + the previously mentioned SVG file), and it returned similar error. Is it some sort of messed up SVG coding, or is there some technical question? Many thanks.廣九直通車 (talk) 09:20, 12 October 2024 (UTC)[reply]

The file did not declare the inkscape namespace. That is done with xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" on the svg element.
Such deficient files used to display on Commons until the SVG renderer was switched in April 2024. After that date, such files would not render. However, the files in the cache were not affected. Consequently, as long as a PNG rendering resided in the cache, the file would appear to work. That is why the old thumbnails may still display: they are coming out of the cache.
It is even more complicated. At some point, the WMF servers get so many failed requests for an image that they start returning errors claiming "too many requests" for that image. So once the file is fixed, it may take some time for it to display.
I fixed the namespace error, and now the SVG displays in a browser. In several hours, the PNG image should start displaying on WMF sites.
Glrx (talk) 15:05, 12 October 2024 (UTC)[reply]
Thanks! Just curious to know (approximately) how many SVG files hosted at here are affected?廣九直通車 (talk) 05:27, 14 October 2024 (UTC)[reply]

Templates in description field cause empty caption in Media Viewer

[edit]

Putting some templates inside description= field causes Media Viewer to display contents of the template (usually poorly able to describe what can be seen) instead of what is inside description=. See the problem in action: navigate to File:Bodegas de Mileștii Mici, Moldavia, 2023-11-02, DD 74.jpg, observe the nice description is there ('Wine cellars of Mileștii Mici'), click 'Open in Media Viewer' and you will be displayed only 'This file illustrates a cultural heritage monument in Moldova, ID' (additionally, ID will be cropped, but it's not that important).

Note the severity of the problem: every time a visitor clicks a photo on en.wikipedia.org, they execute the Media Viewer, and may see a confusing, broken caption like I gave as an example above. This is not the best User Experience. Another thing is that POTY voting page displays descriptions in the gallery of candidate pictures using the same logic.

What do you think? Derbeth talk 18:10, 13 October 2024 (UTC)[reply]

I also saw one more scenario, involving 'Captions' section. If you have a caption, and description= field is empty, Media Viewer correctly uses the caption. But I saw files where a caption was given but 'description' was just a template on cultural heritage. Or sometimes just {{Commonist}}. With such a form of 'description', Media Viewer replaces the useful caption with a generic text about cultural heritage, or even displays blank caption (probably in the case of commonist template, but I don't remember the exact situation). What should be the solution? Changing the page by copying caption to the 'description' field, alongside the template? Changing the page by moving the template outside of {{Information}}, for example just below it in the 'Summary' section? Changing Media Viewer to do some guessing and use 'Captions' instead of 'description' in case 'description' consists exclusively of some 'undesired' template, like cultural heritage, and nothing more (note how hard it's to implement when templates are created, removed and renamed)? --Derbeth talk 18:34, 13 October 2024 (UTC)[reply]

The same happens at Special:MediaSearch when selecting an image.
There was some discussion at Commons_talk:WMF_support_for_Commons/Upload_Wizard_Improvements about reducing clutter in "description=", but apparently, this is not a priority for WMF.
 ∞∞ Enhancing999 (talk) 19:20, 13 October 2024 (UTC)[reply]
Dear colleagues, after comparing various photos, I noticed that there are also monument templates that do not negatively affect the description in the Media Viewer and are displayed despite being placed in the summary field: e.g. 01, 02, 03 and 04. So this could be an indication that the cause lies in certain monument templates that need to be adjusted. But I could be wrong, it is just an indication that I noticed. Best regards, -- Radomianin (talk) 12:10, 14 October 2024 (UTC)[reply]
Addendum to the log: This discussion was preceded by a discussion on the colleague's user page. Best regards, -- Radomianin (talk) 09:33, 17 October 2024 (UTC)[reply]
One has "noprint noexcerpt" as classes, maybe one of them helps?
 ∞∞ Enhancing999 (talk) 14:20, 14 October 2024 (UTC)[reply]
I just checked that those classes alone don't help. I edited a template, checked File:Lodochnaya_stancia.jpg again, and both CSS classes appear in the web inspector, but the caption in MediaViewer is still the wrong one. Should be 'Boating station in Ukrainian city Kriviy Rig' (taken from 'Captions'), but is 'This is a photo of a natural heritage site in Ukraine' (template in 'description='). --Derbeth talk 08:22, 17 October 2024 (UTC)[reply]
I tried those classes too, but it doesn't seem to be sufficent. Maybe @TheDJ has further details on how it's generated.
 ∞∞ Enhancing999 (talk) 15:49, 18 October 2024 (UTC)[reply]
"Mediaviewer replaces it" Just a note, Mediaviewer does not such thing, the MetaData api does this. Of which Mediaviewer is simply the most prominent consumer. —TheDJ (talkcontribs) 12:12, 14 October 2024 (UTC)[reply]
Thanks for the explanation TheDJ. Would you like to help with reporting the bug to MediaWiki API in a way that gives the best chance it is picked for development? --Derbeth talk 08:22, 17 October 2024 (UTC)[reply]

Tech News: 2024-42

[edit]

MediaWiki message delivery 21:16, 14 October 2024 (UTC)[reply]

CategoryTree arrows

[edit]

Since yesterday, I see all CategoryTree arrows in grey, even for categories with subcategories. They are still clickable, but they appear to be grey. Only blue arrows that remain are those with sub-sub-categories. How can it be fixed? Is it this issue? — Draceane talkcontrib. 07:48, 18 October 2024 (UTC)[reply]

Do you still have this problem? If so please link an example. I see blue expandable arrows at categories with subcategories. Prototyperspective (talk) 10:51, 18 October 2024 (UTC)[reply]
Ok, it's probably just me... Safemode works well. Could be connected to the recent Cat-a-lot update? — Draceane talkcontrib. 11:15, 18 October 2024 (UTC)[reply]
[edit]

I am working on the maintenance category Category:Cultural heritage monuments in Berlin without linked Wikidata and noticed that even after purging and null edit to category page and template the category members are not updated many hours after they were linked to Wikidata. Are there any ideas on the reason and suggestions how to solve this? GPSLeo (talk) 08:21, 18 October 2024 (UTC)[reply]

Normally null edits to category page connected to the Wikidata item work. In general, it's the issue discussed at User_talk:Mike_Peel#Infoboxes_missing_(2024-10).
 ∞∞ Enhancing999 (talk) 18:30, 18 October 2024 (UTC)[reply]
[edit]

This category is also added to talk pages. Most if not all items of Commons:Report Talk pages in categories have this category set because some file used in the talk page has been deleted. Please change whatever is categorizing these pages into there so that these are not categorized under Gallery pages, for example by either not adding this cat to them or by making it add Category:Talk pages with broken file links (ideal solution) or Category:Pages with broken file links instead. Previously asked here. Prototyperspective (talk) 17:53, 19 October 2024 (UTC)[reply]

It can be changed in MediaWiki:Broken-file-category.
 ∞∞ Enhancing999 (talk) 18:39, 19 October 2024 (UTC)[reply]
Thank you! Made an edit request there. Prototyperspective (talk) 18:57, 19 October 2024 (UTC)[reply]

W3C validator has been basically down for months

[edit]

Where I and these folks are from, we cannot use the link provided by {{Valid SVG}}. The validator always says "429: Too many requests". The page loads, but the "external validation service" doesn't. Aaron Liu (talk) 20:47, 19 October 2024 (UTC)[reply]

The link may fail for many reasons. I'm often run into the problem of unable to validate because the DOCTYPE is not known; I just select SVG 1.1 and ignore the minor errors.
Chealer reports failure for File:Netscape_icon.svg. That file did not have {{Valid SVG}} or {{Igen}}, so I added them and {{Invalid SVG}}.
Igen created a working URL that said the file was valid
{{Valid SVG}} gave the message that validity was not checked. That suggests a broken template.
{{Invalid SVG}} said the file was invalid (that's its job), but the URL said it was valid.
That link is the same as above. However, a second click complained "Sorry! This document cannot be checked." The problem was the external checker was not available.
Note: I can do a control-Reload and sometimes get a good result.
The previous succeeding checks used SVG 1.1 + xHTML + MathML, but the failing clicks did not recognize a Document type. However, I could select "SVG 1.1" and revalidate resulting in the URL
The new URL reports 46 errors and 1 warning. The inkscape and rdf namespaces are not treated as warnings.
Somebody may be limiting the requests or there may be a race condition that the Nu validator does not respond quickly enough.
First, I think it is poor practice for the templates to use uri=https%3A%2F%2Fcommons.wikimedia.org%2Fwiki%2FSpecial%3AFilepath%2FNetscape_icon.svg.
The more direct method would use
But that validation fails for files without a DOCTYPE. Supply an explicit SVG 1.1:
Which, of course, does not recognize inkscape or rdf namespaces because they are not in the SVG 1.1 DTD and reports dozens of errors.
Perhaps the doctype parameter was used to encourage switching to the Nu validator. Here's the URL without the parameter.
That URL fails with the external checker not being available.
Second, the problem seems to be the validator wants to hand off the request to the Nu validator. It may do this when the SVG file does not have a DOCTYPE.
The GitHub issue used the W3C Nu validator, https://validator.w3.org/nu/ , directly. The Special URL was not an issue.
Instead of using that, go directly to Nu. Chealer offers
That old version of the file has a DOCTYPE, so the old W3C validator does a reasonable validation:
The current version of File:Flag of Cuba.svg does not have an XML processing instruction or a DOCTYPE. Force SVG 1.1
Conceivably, SVG 1.1 could be forced all the time, but that raises numerous inkscape and rdf errors.
Conclusion. I would use the Nu validator without the schema parameter.
Glrx (talk) 17:36, 22 October 2024 (UTC)[reply]

Tech News: 2024-43

[edit]

MediaWiki message delivery 20:48, 21 October 2024 (UTC)[reply]

This just materialized on a file I was editing, so I quickly turned the red link blue and found that it's popped up on 800+ files. What is this? Why is it here? —Justin (koavf)TCM 16:05, 24 October 2024 (UTC)[reply]

I noticed this too. I got as far as figuring out that {{#invoke:ISOdate|ISOdate|1=2006-07-24}} adds the category. I'm not too versed in Lua modules, so can't really continue the hunt. Cryptic-waveform (talk) 19:02, 24 October 2024 (UTC)[reply]
And so does {{#invoke:DateI18n|Date|year=2000|month=1|day=1}}. Cryptic-waveform (talk) 19:06, 24 October 2024 (UTC)[reply]
May be related to https://github.com/wikimedia/mediawiki-extensions-JsonConfig/commit/db05e3251393d734605d20c98a63dbd7f93d9426. Cryptic-waveform (talk) 19:13, 24 October 2024 (UTC)[reply]
@Cscott: Is this related to your change? And is it a desired outcome? Cryptic-waveform (talk) 19:15, 24 October 2024 (UTC)[reply]
@Koavf, @Cryptic-waveform & @Cscott - FYI, I used the CropTool today and the extracted photo file has the this same hidden category as the the original photo file here: File:Zheng Jianbang in 2023 (cropped).jpg.
  • 1. Does this category still apply to cropped images extracted from files within this new category?
  • 2. Was a there any "notice" or other advance communication about this small, but highly noticable "hidden" category? -- Ooligan (talk) 22:11, 24 October 2024 (UTC)[reply]
  1. I guess? ¯\_(ツ)_/¯
  2. No.
Justin (koavf)TCM 22:34, 24 October 2024 (UTC)[reply]

Related: https://en.wikipedia.org/wiki/Wikipedia:Categories_for_discussion/Log/2024_October_24#Category:Pages_using_the_JsonConfig_extension. Cryptic-waveform (talk) 19:21, 24 October 2024 (UTC)[reply]

See also mw:Extension:JsonConfig. No idea why this is something that needs to be tracked. —Justin (koavf)TCM 19:43, 24 October 2024 (UTC)[reply]

Requested fix

[edit]

Commons:Administrators'_noticeboard#Interface_admin_request. —Justin (koavf)TCM 22:38, 24 October 2024 (UTC)[reply]