MediaWiki talk:Gadget-Cat-a-lot.js

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


SpBot archives all sections tagged with {{Section resolved|1=~~~~}} after 3 days. For the archive overview, see Special:PrefixIndex/MediaWiki talk:Gadget-Cat-a-lot.js/Archive.

ToDo List

[edit]

Comments

[edit]

Duplicate category

[edit]

I notice in this edit, that when you have duplicate category, if you use Cat-a-lot then both categories are renamed instead of delete duplicate category. --Smooth_O (talk) 12:49, 5 August 2012 (UTC)[reply]

Just noticed this still happens; see the history of File:Bluebells - panoramio (3).jpg for example. For some reason a bot added the disambiguation cat Newark twice. When I moved the file with Cat-a-lot and then copied it to two other cats from the new location (all without actually seeing the wikitext, of course), all three lines got duplicated.—Odysseus1479 (talk) 20:47, 17 February 2018 (UTC)[reply]

flat file lists as input

[edit]

Cat-a-lot is great, but it would be greater if I could take the results of a query from Cat Scan for example, trim them down as necessary for my purposes, and use the flat file list as input to Cat-a-lot. Is it conceivable that you could add such a feature? In this case, the page that Cat-a-lot was running "on" would not be relevant; instead of selecting files on that page with a mouse, I would select "manual file list" within Cat-a-lot, and paste in my file list, in the format

Category:Charles Backofen
Category:Charles Codman
Category:Charles Osgood
Category:Edward Troye
Category:Erastus Salisbury Field
Category:Fitz Hugh Lane
Category:Francis William Edmonds
Category:Frederick R. Spencer

and then select the destination category with the current interface options. In the above example, I want to add "c:19th-century painters from the United States" without having to select each one from "c:Painters from the United States" (imagine that the list has 100 entries...). More specifically, I want to move them from the old category, which leads to a variation of this suggestion. Another way of looking at this is that I want to paste in a list of files/categories that are programatically selected from the current category page, instead of the user clicking on each one. Short version: I am suggesting one or both of the following features: "Paste a list of files/categories to be selected programatically from the current page" allowing for adding OR moving; and/or "Paste a list of files/categories to be added to any category" (so the page I'm currently on does not matter to Cat-a-lot). If I had to pick one, I would pick the programmatic selection from the current category, as it allows for moving. I just gave an example but I believe this feature has broad applicability. Thanks for taking the time to read this message. Boo-Boo Baroo (talk) 05:46, 10 December 2012 (UTC)[reply]

That might be a useful cat-a-lot improvement, though as a current work around, if you have a list of files, you can paste them as a list of thumbnails on a sandbox page and use Help:VisualFileChange.js to make almost any change you are likely to want, including changing categories. Thanks -- (talk) 06:29, 10 December 2012 (UTC)[reply]
When cross-posting, it would be kind to add a ref to the previous post: COM:HD#category additions in batch. But thanks for your suggestion. It sounds good. -- Rillke(q?) 17:28, 10 December 2012 (UTC)[reply]
Thank you both for your replies. Rillke, I didn't see your reply there (about two weeks later) and thought my question was stale. Thanks for the info--I plan to try VisualFileChange for files--but there doesn't seem to be any solution for altering categories themselves (as you've noted). The main use I envision is dispersing categories that contain hundreds/thousands of other categories into more usable subsets (in the case of categories for people, by century, for example). Boo-Boo Baroo (talk) 19:24, 10 December 2012 (UTC)[reply]

working on template /doc

[edit]

Hi, we use this great tool in fa.wiki according to Hebrew version, the only problem is when the category exists in /doc subpage it can not remove or edit or move that template's category! for example moving fa:رده:Language icon templates members. I tried to make a hack for it but doesn't work! would you please tell me where should i change? (fa:مدیاویکی:Gadget-Cat-a-lot.js) yours, Yamaha5 (talk) 10:37, 16 May 2013 (UTC)[reply]

Remove all categories but one

[edit]

Is there any hope of seeing an upgrade soon that allows removing ALL categories from file(s) except a selected category? Maybe adding a small checkbox in the bottom right corner, that if checked, will do that. This would be extremely helpful in sorting large number of files that are excessively over-categorized but have their own specific category. --P199 (talk) 23:42, 11 October 2013 (UTC)[reply]

IMO Visual File Change will do. --Zhuyifei1999 (talk) 10:12, 12 October 2013 (UTC)[reply]
This would be nice to have in Cat-a-lot. I'd certainly find it useful, and it would be more intuitive than Visual File Change. HJ Mitchell | Penny for your thoughts? 15:18, 18 October 2013 (UTC)[reply]
I don't think that is a good idea. When using cat-a-lot in a category you see the files in that category, so you can see if they fit in the category or if they should be moved or copied to other categories. But you don't see which other categories the files are in, so you can't know if all those categories are wrong or not. /Ö 16:13, 18 October 2013 (UTC)[reply]
Often enough, this has to be done to all files in a certain category, then you know it, otherwise you could look.
In my opinion, it would be more (very!) helpful to be able to remove all files in the current category from a different category. For example, removing all files in the current category from the category one level higher is something that has to be done all the time (because people over-categorize that way). Also, in these cases, no file should be in the current and the superordinate category, so selection is easy and not a lot can be done wrong. — Julian H.✈ (talk/files) 16:33, 18 October 2013 (UTC)[reply]
I was thinking it would be more useful for search results. For example, I often categorise images of buildings, which might well be best placed in a category for that building and no other category (except hidden categories), but are often placed in categories of the city, the county, buildings in the city, and various other higher-level categories. I also agree with Julian H.'s suggested addition. HJ Mitchell | Penny for your thoughts? 16:35, 18 October 2013 (UTC)[reply]
We do need better tools for removing things from parent categories, and it would be great if catalot did that. But I agree that we would have a problem if we automatically removed all other categories without looking at the categories and images involved. For example, if I create a category for the stained glass windows in a church and make that a subcategory of both the church and stained glass windows in that county, then when I move images from the church to the stained glass windows in that church it would save a bit of work if they also came out of the other parent category stained glass windows in that county. But if one or two of them are in a category works by Veronica Whall then it would be wrong to remove that category. To some that would look like vandalism. WereSpielChequers (talk) 11:48, 20 October 2013 (UTC)[reply]
  • Of course, like all other tools, such a feature should be used carefully by trusted users. But the potential for mistakes already exists for Cat-a-lot in its current state, so this is not a reason not to implement it. In fact, we need more powerful tools to keep up with the flood of images being uploaded... --P 1 9 9   00:08, 21 October 2013 (UTC)[reply]
As you designed it can't be used carefully. If you don't make it automatic, perhaps listing the categories that would be removed then that could work. But automatically removing categories would mean undoing other people's categorisation work and slowing down the process of categorisation. We need better categorisation tools, automatically removing categories even if they are valid and useful would not be a better tool. Some of its edits would look like vandalism. WereSpielChequers (talk) 21:08, 23 October 2013 (UTC)[reply]
OK, here are a few:
  1. Currently we can only search by keywords. Please could we search by geocode and bring up fifty thumbnails closest to the geocode you specify and then just click on the ones you want to put them in a particular category using catalot. This would be even more useful if it included the option to exclude ones in the same category.
  2. Sometimes I'm splitting a village category into two or three villages of the same name in different counties. This is a slow process that requires lots of individual map searches. It would be much better if I could in a slightly similar way to above, have a tool that showed all the items in a category as points on a map, and then be able to draw a line on the map and send all on one side off to foo, Lincolnshire and the rest to Foo, Suffolk. This would also be incredibly useful in processing the backlog of geograph images as we have many geocodes that contain parts of two villages
  3. It would be good to be able to see a list of all the categories that the images in a category are in, and then be able to click individual categories and mark them remove or move to parent. So I do a lot of English church categories. If I move twenty images into a category "St Foo's church, Boston, Lincolnshire" it would be good if I could then see a list such as, Images in this category are in the following categories:
4 in Gothic churches in Lincolnshire [] move to parent, [] remove
6 in Boston, Lincolnshire [] move to parent, [] remove
1 Pipistrelle bats in England [] move to parent, [] remove
2 in Anglican churches in Lincolnshire [] move to parent, [] remove
1 in stained glass windows in Lincolnshire [] move to parent, [] remove
1 in brick churches in Lincolnshire [] move to parent, [] remove
13 in Grade I listed churches in Lincolnshire [] move to parent, [] remove
14 in Churches in Boston, Lincolnshire [] move to parent, [] remove
I could then click the boxes as follows and save an awful lot of work, but without losing the work that others have done, including identifying that one of those images has a really nice photo of a bat and another of a stained glass window.
4 in Gothic churches in Lincolnshire [x] move to parent, [] remove
6 in Boston, Lincolnshire [] move to parent, [x] remove
1 Pipistrelle bats in England [] move to parent, [] remove
2 in Anglican churches in Lincolnshire [x] move to parent, [] remove
1 in stained glass windows in Lincolnshire [] move to parent, [] remove
1 in brick churches in Lincolnshire [x] move to parent, [] remove
13 in Grade I listed churches in Lincolnshire [x] move to parent, [] remove
14 in Churches in Boston, Lincolnshire [x] move to parent, [] remove
Currently to do the above example in hotcat you need to look at twenty images and a category, hit remove 40 times, and type out large parts of five categories to add them to the parent category. WereSpielChequers (talk) 08:33, 24 October 2013 (UTC)[reply]

Thoughts on category sorting

[edit]

Since the code is currently getting reworked, I wanted to get some feedback on some thoughts I'd been having. One of the biggest user-level time-wasting maintenance problems on Commons is that there's no simple way to move images that are in Category A and Category B into Category C. Right now, in order to do this, you have to move the files twice from each of the two parent categories. That's annoying, and leads to errors where an image is missed in one category.

The easy way to do it would be to have the ability to choose images in Category A with Cat-a-lot, and be able to either a) then move or copy from Category B into Category C or b) (preferrably) move in one shot from A and B into C.

The harder way I asked at Help talk:FastCCI#The Perennial Question, but I thought I'd get some feedback here too. If Cat-a-lot modified to talk to FastCCI, then the intersections generated by FastCCI could be used to transfer. I suspect that would require a pretty difficult amount of work to implement, though. Pi.1415926535 (talk) 20:37, 7 August 2014 (UTC)[reply]

Keep in mind that currently FastCCI has no interface to limit the intersection to a depth of zero (which is what you seem to want), instead it scans deep into subcategories and may return a lot more results than you want. --Dschwen (talk) 07:33, 8 August 2014 (UTC)[reply]
In theory a combined search with, for example incategory:"Foo" incategory:"Bar", should return the intersection. -- Rillke(q?) 10:15, 8 August 2014 (UTC)[reply]
How does that work in Cat-a-lot? (talk) 14:14, 8 August 2014 (UTC)[reply]
You go to Special:Search, select the file namespace, search for incategory:"Foo" incategory:"Bar" and then use cat-a-lot to categorize the result. -- Rillke(q?) 09:39, 9 August 2014 (UTC)[reply]
The problem, I think, is that cat-a-lot can only add categories when working with search results, when often the objective is to move them out of one or more of the other categories. (Apologies to Pi.1415926535 if this isn't what you were trying to get at.) --jnkyrdsprkl (talk) 20:34, 9 August 2014 (UTC)[reply]
Yes, that is exactly the problem, you said it better than I. Pi.1415926535 (talk) 20:53, 10 August 2014 (UTC)[reply]
I solve it simply by doing several edits with Cat-a-lot. For example, I've been subcategorizing Category:Audio files in English and Category:Audio files of males speaking English recently. And I just did two edits on each affected file, sometimes three:
Other sections on this talk page also mention Help:VisualFileChange.js, which can be used to achieve similar result with more preparation, but fewer edits. —⁠andrybak (talk) 11:50, 15 June 2024 (UTC)[reply]
[edit]

I am trying to add the category Category:Taken with Sony DSC-WX70 to some 10,000 files, but Cat-a-lot hangs after categorizing a few thousand files. I tried in Chrome first, it stopped at 1,900 count. Then I tried in Firefox and it stopped at 3,400. Then I tried in Chromium and it hanged at 8,600. Maybe this happens because of the browser limitations though? -- Fructibus (talk) 22:02, 20 November 2017 (UTC)[reply]

@Fructibus: Hm, maybe, but there is also a speed cap for edits for normal users (which you should have exceeded by far). High probably your gallery exceeds the normal view limit too (it does not display for me). -- User: Perhelion 23:36, 20 November 2017 (UTC)[reply]
@Perhelion: Ohh, I didn't know about the speed cap. How much is it? Can you limit Cat-a-lot speed to stay below that? Well, I must admit it's quite easy for me to ask for all kind of new features.. :D -- Fructibus (talk) 23:51, 20 November 2017 (UTC)[reply]
Normally the limit is 8 hits/minute, maybe for autopatroller as you the limit is higher. We could implement MediaWiki:Gadget-libAPI.js, which has a time handling of this (but I'm not sure yet on this). -- User: Perhelion 00:42, 21 November 2017 (UTC)[reply]
@Perhelion: I think such a speed limit might be already documented, shall I ask at the village pump about it?
Meanwhile I would like to ask for another feature, related to this: to add a button to select all the file links. When the user selects the files in a search result or in a category or in a gallery, they actually select file links. Therefore I think it's not a significant difference to select links too. For example I would like to select all the image links in this page: User:Fructibus/C. Then the users won't need to create a gallery - when a gallery contains thousands of images, the browser consumes a lot of memory and processor power. -- Fructibus (talk) 08:23, 21 November 2017 (UTC)[reply]
I got another indication: I just tested Cat-a-lot with the same gallery of 10,054 images, to add them in a category where they were already added, and the gadget hanged at the item 8078. There is no edit on the server, so this is a browser limitation for sure. -- Fructibus (talk) 20:59, 23 November 2017 (UTC)[reply]
@Fructibus: So I can't fix this here. But I can fulfill your second request (select all files). I would fulfill this combined with this request #flat file lists as input -- User: Perhelion 17:24, 25 November 2017 (UTC)[reply]
That's such a great news, thanks! :) -- Fructibus (talk) 19:36, 25 November 2017 (UTC)[reply]
@Perhelion: There's an OOM condition here. getContent() is called with an immediate for loop in getTargetCat(), and editCategories() is only an event handler of getContent(). This causes the doAPICall()s from getContent() be effectively executed before every single doAPICall()s from editCategories(). Since browser usually has a limit of per-domain concurrent requests, no edit can be made until all the wikitext of thousands of pages are loaded, effectively breaking garbage collection. I wonder if there is a workaround. --Zhuyifei1999 (talk) 08:39, 26 November 2017 (UTC)[reply]
Yes indeed, thanks for pointing this out. I also thought on an API call like in AQD. I'll do this also soon. -- User: Perhelion 11:01, 26 November 2017 (UTC)[reply]
Btw: As I see right now, this could be useful too. -- User: Perhelion 16:12, 13 December 2017 (UTC)[reply]

Bug: cat-a-lot does not detect failed edits

[edit]

When an edit fails, cat-a-lot doesn't detect it. For example, try to categorize File:Example.jpg. (assuming you are not an admin)

Because of the ratelimit a massive number of categorizations was lost. - Alexis Jazz ping plz 15:32, 21 May 2018 (UTC)[reply]

Request regarding copying and sortkeys

[edit]

Currently, Cat-a-lot will preserve the previous sortkey if a page is copied from one category to another. Would it be possible to toggle this behaviour so you could use the copy function without adding the "old" sortkey? This would be useful whereever the "Defaultsort" entry is preferred over any local sortkeys. De728631 (talk) 20:48, 1 May 2019 (UTC)[reply]

Ignore all the ones in Category:Wikidata infobox maintenance

[edit]

I suggest to the developers that all subcats of Category:Wikidata infobox maintenance be ignored by cat-a-lot, because they are automatically added by {{Wikidata infobox}}. They are not meant to be added manually. They are also taking up too much space in the cat-a-lot menu because almost every cat using the infobox has three or more Uses of Wikidata Infobox blah blah blah.--Roy17 (talk) 17:34, 17 June 2019 (UTC)[reply]

A more general alternative solution would be to ignore every subcategory of Category:Uses of Autocat template. —⁠andrybak (talk) 12:02, 15 June 2024 (UTC)[reply]

Feature requests for over-categorization

[edit]
  1. Configurable limit for traveling up the tree
  2. Configurable limit for traveling down the tree
  3. Ability to fix over-categorization by removing the upper cat automatically
  4. Configurability to ignore "(flat category)" for overcat purposes

  — Jeff G. please ping or talk to me 16:47, 10 August 2019 (UTC)[reply]

Yes, I am still interested in all of these.   — 🇺🇦Jeff G. please ping or talk to me🇺🇦 12:20, 15 June 2024 (UTC)[reply]

Could Cat-a-lot add the function to move the disambiguation pages?

[edit]

There are too much pages using template:disambig or template:disambiguation crowded in categories of disambiguation. If cat-a-lot could deal with the disambiguation pages, it will be faster to clean them. 迴廊彼端 (talk) 10:13, 13 August 2019 (UTC)[reply]

Hello 迴廊彼端, that would be far too much for CaL, because this requires an extra level of logic, what this picture is to be concrete. Simple removal does not seem to be an option. -- User: Perhelion 07:29, 14 August 2019 (UTC)[reply]

Local help page

[edit]

I created a local help page on Hebrew Wikipedia. Is it possible to link to it from the gadget panel? דגש חזק (talk) 22:33, 11 February 2020 (UTC)[reply]

User:דגש, page Help:Gadget-Cat-a-lot doesn't seem to be translated into Hebrew yet. You could create a subpage Help:Gadget-Cat-a-lot/he with a link to Hebrew Wikipedia. —⁠andrybak (talk) 12:08, 15 June 2024 (UTC)[reply]

Disable in other pages

[edit]

Is it possible to make Cat-a-lot visible only in category pages? It feels quite annoying and distracting to see them in mainspace articles. --Kailash29792 (talk) 05:31, 1 May 2020 (UTC)[reply]

Kailash29792 this can be achieved with JavaScript. Here are instructions:
  1. Disable the gadget at Special:Preferences#mw-prefsection-gadgets
  2. Copy JavaScript from Help:Gadget-Cat-a-lot#As a project gadget
  3. Add it to your "common.js", tweak window.catALotPrefs to what you want, and save
Note the code if (mw.config.get('wgNamespaceNumber') === 14) {14 is the ID number of namespace "Category". See Help:Namespaces and en:Wikipedia:Namespace. —⁠andrybak (talk) 12:16, 15 June 2024 (UTC)[reply]
Andrybak, I've done it. But looks like there are errors, can anyone else correct it? Kailash29792 (talk) 12:37, 22 June 2024 (UTC)[reply]
@Kailash29792, you got one too many 14s. In window.catALotPrefs = 14 , remove the 14. It should be just window.catALotPrefs = { editpages: true, subcatcount: 100 };. Hope this helps. —⁠andrybak (talk) 18:22, 22 June 2024 (UTC)[reply]
Tried. Kailash29792 (talk) 06:47, 23 June 2024 (UTC)[reply]
@Kailash29792, you're missing a closing curly brace }. Open the editor on page User:Kailash29792/common.js. You should see a code editor (as on the screenshot in mw:Extension:CodeEditor). There you can hover the mouse over the error marker (a red square with a white cross inside) on line 4. It will tell Unmatched '{'. To fix the error, add the matching closing curly brace } to the if, at the bottom, as line 11.
This means, that in Special:Diff/886853339, when copy-pasting from Help:Gadget-Cat-a-lot#As a project gadget, you've missed the last line. —⁠andrybak (talk) 22:05, 23 June 2024 (UTC)[reply]

Request: add class "noprint" to the main box

[edit]

When trying to print ANY content or category page in Commons where this gadget may be used and is visible, if we try to print, the "Cat-a-lot" box appears on EVERY printed page, over the actual content we want to print (it appears partly at top of the printed page with the shadow and bottom border of the box, and the rest at bottom, within the printable margins of the page; there's no way to hide this unwanted box).

Please add the class "noprint" to the main container of the Cat-a-loc" box, that should never be printed, even if it's visible during navigation. Or use CSS "@media print{ /*selector of the box*/ {display:none}}".

Thanks. verdy_p (talk) 01:28, 2 May 2020 (UTC)[reply]

Allow translating Cat-a-lot's name

[edit]

The tool shows a yellow box at the bottom of the page with the label "Cat-a-lot" in it. This label should become translatable. This is particularly useful for languages that do not use Latin alphabet (e.g. Persian, Cantonese, Hindi, etc.) Huji (talk) 18:49, 11 May 2020 (UTC)[reply]

Installation on non-Wikimedia projects

[edit]

I wonder if it possible to install cat-a-lot to other non-Wikimedia wikis. The instructions only said If Cat-a-lot is not present as gadget in your local Wikimedia project (like Wikipedia). pandakekok9 13:06, 24 May 2020 (UTC)[reply]

@Pandakekok9: Two months late but I saw this now. I don't really know what you mean since the help page explicitly tells you how you add it on, for example enwikipedia. You can see w:User:Jonteemil/common.js how I've copied the help page example.Jonteemil (talk) 16:17, 29 July 2020 (UTC)[reply]

Request: add page to category

[edit]

so we have tools to add categories to pages (e.g. hotcat), and cat-a-lot, which manipulate pages via the category page. so i can select an article or file from the category page, and without leaving the category, remove this article. what i'm missing is the reverse action: add page to the category, regardless of how (or even if) this file or article is categorized now. should be pretty simple - pop a new input line with autocompletion, similar to the "category" input line, except it should be for any page, not just categories, and click.

bonus points for textarea, where i could paste a multi-line list of pages, but for me, at least, this is secondary. the ability to "pull" a page into a category from the category page itself would be very useful in many cases. peace - קיפודנחש (talk) 19:45, 3 July 2020 (UTC)[reply]

Difficult to use on mobile devices (suggestions)

[edit]

On mobile devices the screens are often curved, causing part of the Cat-a-lot link to be invisible, so it only reads "Cat-a" and is difficult to click on since the very corner of the screen is not as responsive or easy to touch. The font size and size for the floating text to start the tool are also too small. Suggestions:

  • Please add it to Page tools menu, rather than having to scroll to the bottom turn back up to run it
  • Move floating text slightly higher up, and add a border at least 2em in size
  • Increase the text size for both the floating text and the X to close the tool
  • Change the close X to be "X (close)" or add an icon so it's much larger to select
  • Improve the instructions by including a screenshot showing where to find the tool

Great tool! Thanks to all contributors. Amousey (talk) 11:26, 20 August 2020 (UTC)[reply]

Cat-a-lot nuisance clutter

[edit]

Recently a whole lot of hidden parent categories have been appearing in Cat-a-lot's listings for a category; e.g. Category:Carduelis carduelis includes Category:Biology categories with double wikidata item, Category:Biology pages with wikidata item specified in VN, Category:Biology pages with wikidata link, Category:Interwiki from wikidata, Category:Uses of Wikidata Infobox, Category:Taxon categories, Category:Uses of Wikidata Infobox for taxons, and so on. All of these push the subcategories that one actually wants to use, off the bottom of the page where they have to be scrolled to - very tedious. In the vast majority of uses of Cat-a-lot, one doesn't use these. Can these hidden parent categories be, well, hidden, from the Cat-a-lot list, unless specifically asked for in Cat-a-lot Options, please? (i.e., add an option in Preferences "Show hidden parent categories"). Thanks! - MPF (talk) 21:08, 28 September 2020 (UTC)[reply]

MPF, please see section MediaWiki talk:Gadget-Cat-a-lot.js#Ignore all the ones in Category:Wikidata infobox maintenance about a similar request. —⁠andrybak (talk) 12:24, 15 June 2024 (UTC)[reply]

Cat-a-lot cannot handle white characters

[edit]

I've noticed that if some of white characters is present in the code of the changed category (caused mostly by copying, e.g. left-to-right mark (‎): [[Category:ABC‎]] – see the code with CodeMirror), Cat-a-lot won't move the file to other category as the category cannot be found. The copying is not affected, though. — Draceane talkcontrib. 20:42, 19 October 2020 (UTC)[reply]

cat-a-lot edit tags

[edit]

so i tried to decipher from documentation and from code, and couldn't figure it out.

it seems that cat-a-lot edits are tagged on commons, but not when loading the gadget from other projects (using mw.loader.load() ), which we do on hewiki.

is there a way to tell cat-a-lot to add an edit tag on other wikis? for reference, here is the hewiki cat-a-lot gadget source:

if ( mw.config.get( 'wgNamespaceNumber') == 14 ) {
	window.catALotPrefs = { editpages:  true, subcatcount: 500 };
	mw.loader.using(['jquery.ui', 'mediawiki.util']).done(function(){
		mw.util.addCSS("#cat_a_lot { left: inherit !important; }"); // for some reason, cat-a-lot from commons has a quirk with RLT, and this fixes it
		mw.util.addCSS("#cat_a_lot_settings { display:none !important;}"); // preferences depend on some other gadgets,not available on hewiki, so hide linkette
	  	mw.loader.load('//commons.wikimedia.org/w/index.php?title=MediaWiki:Gadget-Cat-a-lot.js&action=raw&ctype=text/javascript');
	  	mw.loader.load('//commons.wikimedia.org/w/index.php?title=MediaWiki:Gadget-Cat-a-lot.css&action=raw&ctype=text/css', 'text/css');
	});
}

thanks. peace - קיפודנחש (talk) 18:33, 12 April 2021 (UTC)[reply]

In code, the tag is disabled for anything other than Commons:
		// TODO: better extern project support for possible change-tag? (needs currently change after init)
		if ( project === 'commonswiki' ) { mw.messages.set( { 'cat-a-lot-using-summary': '' } ); } else { // Reset
			this.changeTag = '';
			this.settings.redir_category = '';
		}
So code changes would be needed, if other projects are to have their own version of the edit tag.
For the tag itself, there are pages MediaWiki:Tag-Cat-a-lot and MediaWiki:Tag-Cat-a-lot-description, but I don't know if anything else is needed for "integration" of the tag. MediaWiki:Gadgets-definition (mw:Extension:Gadgets) doesn't seem to mention tags. From mw:Manual:Tags, it seems that tags are created manually by administrators at Special:Tags. However, this page is a bit confusing and it talks mostly about use of tags in Extensions as opposed to Gadgets. Perhaps User:Steinsplitter (author of these pages) knows if there's anything else. —⁠andrybak (talk) 01:33, 21 June 2024 (UTC)[reply]

MediaSearch

[edit]

Will the gadget be fixed to work with MediaSearch? --INS Pirat (talk) 20:53, 13 July 2021 (UTC)[reply]

+1. this would be really good.
  1. line 422 findAllLabels
  2. line 1518
i think these parts need to be edited. RZuo (talk) 11:58, 27 January 2023 (UTC)[reply]
Also wondered why it doesn't work on the modern search and just the old special search with small thumbnails and a vertical display. Could somebody add MediaSearch support? Prototyperspective (talk) 10:28, 27 May 2024 (UTC)[reply]

Enabling it on Special:MediaSearch

[edit]

Making it available on Special:MediaSearch would be helpful. Enhancing999 (talk) 09:42, 16 June 2024 (UTC)[reply]

@Andrybak: would this be easy to add? Enhancing999 (talk) 12:59, 3 August 2024 (UTC)[reply]
@Nardog: what do you think? Enhancing999 (talk) 13:00, 3 August 2024 (UTC)[reply]

Enwiki

[edit]

This doesn't quite behave properly when categorising redirects (it edit a the redirect target). Also, I'm not sure how the preferences work (nothing happens when clicking on the button), but it says in #cat-a-lot edit tags preferences depend on some other gadgets,not available on hewiki, so hide linkette. Presumably this is the same, though still not sure how to change it? (Please ping me, or I won't see any replies.) Qwerfjkl (talk) 21:16, 30 August 2021 (UTC)[reply]

Pinging @Jeff G. (Not sure where to announce this, as the page notice says). Qwerfjkl (talk) 21:15, 2 September 2021 (UTC)[reply]
@Qwerfjkl: I can confirm the reported behavior and speculate that following redirects is usually a wanted behavior (categorizing redirects is not done on Commons).   — Jeff G. please ping or talk to me 09:31, 3 September 2021 (UTC)[reply]
@Jeff G. Would it be possible to do this on other wikis? Qwerfjkl (talk) 13:00, 3 September 2021 (UTC)[reply]
@Qwerfjkl: Sorry, I don't know. Pinging @Krinkle, Kwj2772, Steinsplitter as recent editors of the script who still have access.   — Jeff G. please ping or talk to me 09:31, 4 September 2021 (UTC)[reply]

Making a stable version of getMarkedLabels()

[edit]

{{Edit request}}

I noticed this function that returns selected files:

mw.libs.catALot.getMarkedLabels()

But it has a strange return type! Try it in your console. An user expects an iterable array but it's not. An user also expects each element as a clean self-describing object but they are not.

How to fix that? Let's create another function for backward-compatibility. For example:

mw.libs.catALot.getMarkedLabelsArray()

This new proposal should return a clean array, with simple objects. So it's more stable and can be used from other gadgets as well!

Here the example return type:

[
  {
    fullPageName: "Complete title of the page with namespace",
    selectedEl:   "jQuery selector of the selected box",
  },
  ...
]

OK OK. How to do that?

[edit]

I have worked on a safe copy-paste version to fix that. This can be done by any sysop or interface admin. Here how:

  1. Copy this source: Special:PermaLink/617020624
  2. Paste here: MediaWiki:Gadget-Cat-a-lot.js
  3. View diff (it's very small)
  4. Save!

That's all! <3

Can I do something more?

[edit]

Sure! I also prepared another version, that is more risky since it's a refactor to clean stuff:

  1. Copy this source: User:Valerio Bozzolan/MediaWiki:Gadget-Cat-a-lot.js
  2. Test in your browser console
  3. Say here if it works for you:
    1. Tested adding and removing a category and it just works, maybe we should test other things --Valerio Bozzolan (talk) 14:43, 28 December 2021 (UTC)[reply]
    2. Tested by moving some files in a category, and then picking more files and moving to another category (also without reloading the page) and it works --Valerio Bozzolan (talk) 09:04, 7 January 2022 (UTC)[reply]
    3. Tested by ...

When we reach a certain number of reviewers we can save. Thank you for your participation! --Valerio Bozzolan (talk) 14:43, 28 December 2021 (UTC)[reply]

Valerio Bozzolan, I can't comment on the changes you're proposing, but there have been other changes to the gadget since 2021, so your instruction to copy-paste Special:Permalink/617020624 from 28 December 2021 isn't workable anymore.
Instead of a permalink, you can also prepare a link to Special:ComparePages, which would highlight the proposed changes, making it easier to apply them, regardless of intervening changes to the live version of the gadget. —⁠andrybak (talk) 00:03, 15 June 2024 (UTC)[reply]
I’m not convinced this addition is worth it, to be honest. To convert the array-like object into an array you could just use Array.from( mw.libs.catALot.getMarkedLabels() ) (or even [ ...mw.libs.catALot.getMarkedLabels() ]? not sure about the browser compatibility of that); and I’m not sure how helpful the object names are – in particular, given that the selected element is a jQuery object, not a native DOM element, I’d really expect it to have a $ in the name. Lucas Werkmeister (talk) 20:14, 19 June 2024 (UTC)[reply]
I've disabled the edit request for now, because the proposed code isn't actual anymore + there isn't a consensus for this change. —⁠andrybak (talk) 23:58, 24 June 2024 (UTC)[reply]

Non-mainspace pages

[edit]

On enwiki (at least), I think the gadget doesn't recognise pages not in the mainspace e.g. User: - it just says "No files selected" when you try to perform an action. Qwerfjkl (talk) 18:40, 19 December 2021 (UTC)[reply]

Can't save preferences

[edit]

I'm getting "Error saving User:Joeyconnick/common.js. Code is missingparam." Can someone help me out? —Joeyconnick (talk) 19:44, 27 December 2021 (UTC)[reply]

Cat-a-lot not working on Chrome/Android

[edit]

Since a few days (since Monday?) Cat-a-lot isn't working on smartphones with Chrome browser. The reason is the user comment field displayed. Searching for another category the virtual keyboard does not display the return key. Instead of the return key tab or next key is displayed - and the search for the category name in the search field doesn't work. The cursor switches to the user comment (pressing "next" on the virtual keyboard). Here the return key is displayed on the virtual keyboard, but it has no function. As workaround I've added mw.util.addCSS("#cat_a_lot_comment { display:none !important;}"); to my common.js. I've the difficult to explain problem only on smartphone browsers. --XRay 💬 04:37, 17 May 2022 (UTC)[reply]

@King of Hearts: Probably this is the reason why I tried to solve the problem for a long time yesterday: Revision of 628829593. --XRay 💬 05:07, 17 May 2022 (UTC)[reply]
@Alexis Jazz: Are you able to reproduce this? -- King of ♥ 07:23, 17 May 2022 (UTC)[reply]
If you are not able to reproduce it, I can make Screenshots and send it. But I won't upload Screenshots (seen by public) here. --XRay 💬 08:00, 17 May 2022 (UTC)[reply]
Easier. Here are 2 screenshots: [1] I'll remove the access to the screenshots if you've seen them. --XRay 💬 08:19, 17 May 2022 (UTC)[reply]
@XRay, King of Hearts any updates? —MdsShakil (talk) 16:04, 24 May 2022 (UTC)[reply]
I've got access to a modified version. This version is working fine. --XRay 💬 17:10, 24 May 2022 (UTC)[reply]
I too can't use it any more on Android. Can't select a category that I've typed in. Android WebView 101 on Android 11 to be precise.--Vera (talk) 18:43, 25 May 2022 (UTC)[reply]
I'm now getting this error:
Uncaught TypeError: $searchInput.autocomplete is not a function from https://commons.wikimedia.org/w/load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%7Coojs-ui.styles.icons-editing-advanced&skin=vector&version=ve7ok at line 52:838 TypeError: $searchInput.autocomplete is not a function at initAutocomplete (https://commons.wikimedia.beta.wmflabs.org/w/index.php?title=MediaWiki:Gadget-Cat-a-lot.js&action=raw&ctype=text/javascript:254:17) at fire (https://commons.wikimedia.org/w/load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%7Coojs-ui.styles.icons-editing-advanced&skin=vector&version=ve7ok:46:934) at Object.fireWith [as resolveWith] (https://commons.wikimedia.org/w/load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%7Coojs-ui.styles.icons-editing-advanced&skin=vector&version=ve7ok:48:135) at deferred.<computed> [as resolve] (https://commons.wikimedia.org/w/load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%7Coojs-ui.styles.icons-editing-advanced&skin=vector&version=ve7ok:51:632) at <anonymous>:769:951 at Object.enqueue (https://commons.wikimedia.org/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector:10:831) at mw.loader.using (<anonymous>:769:910) at HTMLAnchorElement.<anonymous> (https://commons.wikimedia.beta.wmflabs.org/w/index.php?title=MediaWiki:Gadget-Cat-a-lot.js&action=raw&ctype=text/javascript:328:15) at HTMLAnchorElement.dispatch (https://commons.wikimedia.org/w/load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%7Coojs-ui.styles.icons-editing-advanced&skin=vector&version=ve7ok:70:260) at elemData.handle (https://commons.wikimedia.org/w/load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%7Coojs-ui.styles.icons-editing-advanced&skin=vector&versionVera (talk) 19:46, 11 September 2022 (UTC)[reply]
This arises when I try to use cat-a-lot on Special:Search Vera (talk) 20:13, 11 September 2022 (UTC)[reply]
[edit]

Hello, I'm from ckbwiki. It's a RTL language. I just wanted to say that the Cat-a-lot gadget covers "Add links" link for non-linked pages. I think it should be fixed to the left. Thanks! Aram (talk) 15:46, 30 July 2022 (UTC)[reply]

MediaWiki “flips” the CSS rules automatically when it detects that the user interface language is different from the site language. This works well on Commons; on ckbwiki, however, MediaWiki expects the CSS rules to be aligned for right-to-left languages. This also means that left-to-right languages like English get rules that are aligned for right-to-left languages, so you can just take the CSS for English (which is flipped) and copy it to the local stylesheet. —Tacsipacsi (talk) 13:09, 31 July 2022 (UTC)[reply]
@Tacsipacsi: Thanks for the reply! I have another question. Why the preferences link are not available on Wikipedia project? I can see it just on Commons. Additionally, I think the source of L-20 in the CSS page is broken. Thanks! Aram (talk) 13:22, 1 August 2022 (UTC)[reply]

Cat-a-lot not working for on-screen keyboards

[edit]

With cat-a-lot, if I have an on-screen keyboard on android I can't OK my input when I hit enter. Instead the cursor switches to the "custom edit comment" field. This makes this gadget unusuable. Vera (talk) 19:31, 23 December 2022 (UTC)[reply]

I looked into this further. It seems that my on-screen keyboard tries to be helpful and replace the "enter" key with a "next field" key if the form has multiple input fields. I've for now added the code of cat-a-lot to a user page and made the comment field hidden. This fixes it for me for now. I found this StackOverflow comment that says the "next input field" key produces key event nr. 229. It wasn't as simple as adding that as an OR to the Enter key's 13. The StackOverflow comment also says it produces an "Unidentified" key event. Adding another event listener that has "Unidentified" as its event and key 229 didn't work for me. This is probably too obscure a bug to fix. Another fix would be to have an actual button that triggers the same event as hitting enter now does.
On a side note, I'm not a fan of using the placeholder value as a label. You shouldn't use placeholder value as a label. --Vera (talk) 11:50, 23 January 2023 (UTC)[reply]
Hi, could you give me ELI5, step-by-step instructions on how to implement your work around for this issue? I also struggle with it, but I think it used to work properly until 1-2 months or so ago, so that's a rather new bug to me. Nakonana (talk) 15:33, 2 March 2024 (UTC)[reply]

Stub tag spacing issue on Enwiki

[edit]

Hi,

If it is the bottom category being changed, any lines of spacing below the category will be removed which causes an issue when it comes to stub tags. The MOS requires two lines of spacing between the categories and stub tag. Example. Not sure if anything can be done about this? Thanks! Jevansen (talk) Jevansen (talk) 02:58, 6 June 2023 (UTC)[reply]

For reference, the spacing requirement is en:WP:STUBSPACING. —⁠andrybak (talk) 22:26, 4 June 2024 (UTC)[reply]

Getting unexpected results with "Check over-categorization"

[edit]

When I go to Category Landschaftsschutzgebiet innerhalb des Naturparks Hassberge (ehemals_Schutzzone), select files An der Hohen Straße westlich von Kottenbrunn 4.jpg and Aufgang zum Streifberg bei Ostheim.jpg and "Check over-categorization", the first file is marked over-categorized while the second is not. However, both are in same categories (and both are not over-categorized). Why is the first file marked? Plozessor (talk) 11:51, 9 June 2023 (UTC)[reply]

i dont know. it's weird. here're the lists of cats on each file right now.
Extended content
[[:File:An der Hohen Straße westlich von Kottenbrunn 4.jpg]]
CC-BY-SA-4.0
Files with coordinates missing SDC location of creation (50° N, 10°E)

Images from Wiki Loves Earth 2023
Images from Wiki Loves Earth 2023 in Germany
Images from Wiki Loves Earth 2023, DE landscape

Images from Wiki Loves Earth missing SDC depicts
Images from Wiki Loves Earth missing SDC location of creation
Images from Wiki Loves Earth missing SDC participant in
Landschaftsschutzgebiet innerhalb des Naturparks Hassberge (ehemals Schutzzone)
Pages with maps
Photos of protected areas by Stephan van Helden
Self-published work
Uploaded via Campaign:wle-de
[[:File:Aufgang zum Streifberg bei Ostheim.jpg]]
CC-BY-SA-4.0
Files with coordinates missing SDC location of creation (50° N, 10°E)
Germany photographs taken on 2017-03-26
Images from Wiki Loves Earth 2021
Images from Wiki Loves Earth 2021 in Germany
Images from Wiki Loves Earth 2021, DE landscape
Images from Wiki Loves Earth 2021, DE-BY
Images from Wiki Loves Earth missing SDC depicts
Images from Wiki Loves Earth missing SDC location of creation

Landschaftsschutzgebiet innerhalb des Naturparks Hassberge (ehemals Schutzzone)
Pages with maps
Photos of protected areas by Stephan van Helden
Self-published work
Uploaded via Campaign:wle-de-by
--RZuo (talk) 19:56, 22 July 2023 (UTC)[reply]
@RZuo I really can't get any meaningful results from this function. When I open Category 'Ermershausen', select all files and run "Check over-categorization", it highlights three files:
But none of these images is over-categorized. None is in a child or parent category of "Ermershausen". Plozessor (talk) 16:44, 7 September 2023 (UTC)[reply]
Is it possible that the script fails to parse certain files (due non-English characters, uncommon formatting, etc.)? Plozessor (talk) 16:47, 7 September 2023 (UTC)[reply]
it's really weird. for File:广州南尽头 - Southmost Land of Guangzhou - 2012.03 - panoramio.jpg, before my edit, when i tested it in Category:Guangzhou, it was considered overcat. after my edit (which i only moved it down Category:Guangzhou, added a newly created cat, and removed "check categories" template), and when i tested it in Category:Ji Sap Cung, it's not overcat. RZuo (talk) 17:12, 7 September 2023 (UTC)[reply]

Adding the first category to an article at enwiki

[edit]

At enwiki, Cat-a-lot does not remove the uncategorized tag when adding the first category to an uncategorized article (example). –LaundryPizza03 (d) 07:42, 6 August 2023 (UTC)[reply]

@LaundryPizza03: Help:Gadget-Cat-a-lot#Preferences.--RZuo (talk) 08:35, 6 August 2023 (UTC)[reply]
The button in the Cat-a-lot popup does nothing. –LaundryPizza03 (d) 16:30, 6 August 2023 (UTC)[reply]
[edit]
A proposed logo for the cat-a-lot gadget.

This is somewhat frivolous, but, after using this script for the first time (which took ten seconds), I proceeded to design a logo for it in Inkscape (which took half an hour). What do you think (you can see my weak explanation at the file description)? Edward-Woodrow (talk) 22:29, 19 August 2023 (UTC)[reply]

Cross cat mergers?

[edit]

Is this a good tool for generating the common entries in Category:Purple things and Category:People Eaters and moving them to Category:Purple People Eaters? Thank you.Naraht (talk) 13:59, 10 October 2023 (UTC)[reply]

@Naraht: i think the short answer is no.
theoretically, to accomplish what you describe, you can do a search of deepcat:"A" deepcat:"B", then use catalot to move all search results from A to the target new cat C, then use catalot again to remove all from B.
it's easier to do this with com:vfc and do a "custom replace".--RZuo (talk) 08:37, 10 November 2023 (UTC)[reply]
RZuoThank you, I'll take a look.Naraht (talk) 15:32, 10 November 2023 (UTC)[reply]

Check over-categorization

[edit]

What does the option "Check over-categorization" do? This is not explained anywhere. –LaundryPizza03 (d) 16:13, 17 December 2023 (UTC)[reply]

@LaundryPizza03 It ensures that pages are not overcategorized (qv).   — 🇺🇦Jeff G. please ping or talk to me🇺🇦 00:06, 18 December 2023 (UTC)[reply]
There seem to be lots of false negatives where an article is more than one level down from the current category; can you confirm this? –LaundryPizza03 (d) 00:11, 18 December 2023 (UTC)[reply]
@LaundryPizza03: Do you have any particular pages that are overcategorized but undetected by the gadget when checking on a particular category? Specifics, please.   — 🇺🇦Jeff G. please ping or talk to me🇺🇦 01:27, 18 December 2023 (UTC)[reply]
en:Goop (company) is in both en:Category:Pseudoscience and en:Category:Alternative medicine organizations two levels down, and a Cat-a-lot run on the higher category fails to identify "Goop (company)" as an overcategorized page. –LaundryPizza03 (d) 01:46, 18 December 2023 (UTC)[reply]
(ec)@LaundryPizza03: When I selected all in the latter cat and clicked "Check over-categorization", the gadget found (and highlighted with a dotted border) seven overcategorized pages (but not en:Goop (company)). I see now that the two cats are connected by en:Category:Alternative medicine. Perhaps the overcategorization check only works on pages that are in two cats that are directly in a parent-child relationship, rather than grandparent-grandchild.   — 🇺🇦Jeff G. please ping or talk to me🇺🇦 02:11, 18 December 2023 (UTC)[reply]
I also encountered a false positive in the flagging of en:Category:Advocates of pseudoscience, a first-level subcategory of "Category:Pseudoscience" that is not elsewhere in the tree. –LaundryPizza03 (d) 02:08, 18 December 2023 (UTC)[reply]
@LaundryPizza03: Strange.   — 🇺🇦Jeff G. please ping or talk to me🇺🇦 02:15, 18 December 2023 (UTC)[reply]

Force cat a lot to appear on certain pages?

[edit]

can i force it to appear on https://commons.wikimedia.org/w/index.php?title=Special:AllPages&from=%E5%BA%B6&namespace=14 for example? it would be good if it can be used on such pages too. RZuo (talk) 12:37, 2 February 2024 (UTC)[reply]

@RZuo: No, but it does appear on Special:PrefixIndex/Category:庶. Please note that the character is used in a bunch of languages per wikt:庶.   — 🇺🇦Jeff G. please ping or talk to me🇺🇦 13:40, 2 February 2024 (UTC)[reply]

Buggy category search in cat-a-lot via mobile browser

[edit]

When searching for categories via cat-a-lot that are not already in immediate parent-child "vicinity" (like in cases of uncategorized media), one needs to "confirm" one's search result either via kicking "enter" on mobile keyboard or by tapping on the search result to "add" the found category to the cat-a-lot list of categories to choose from. However, neither of the two ways of "confirming" the search result is currently working in (my chromium-based) mobile browser, which means that I need to open every single file individually and add the categories manually. Example: there's media on Skopje in "All media needing categories as of 2019" (let's shorten that here to "All2019"). When opening cat-a-lot on "All2019", cat-a-lot only offers options like "Uncategorized files", "Hidden categories", and "Files needing categories by year". If I enter "Skopje" in the "Enter category name" search box, there's no way for me to actually select or add "Skopje" to the list of categories to choose from. That's the bug. I'm stuck with the options "Uncategorized files", "Hidden categories", and "Files needing categories by year". The only way to get to the Category:Skopje is to manually click through the whole category tree, first moving to some parent of All2019, and from there to a child category that hopefully has Skopje somewhere down the line of the category tree. This is obviously not very feasible, so every file needs to be categorized manually in the end. Nakonana (talk) 15:25, 2 March 2024 (UTC)[reply]

Actually, it's sounds like the same issue as described in "Cat-a-lot not working for on-screen keyboards", except, it used to work for up until 1-2 months or so ago. Nakonana (talk) 15:29, 2 March 2024 (UTC)[reply]
I just had the same problem. Somehow I miraculously could select my target destination once, but when I tried to do it again I couldn't get it. How do I do the equivalent of "pressing enter key on PC" on mobile web browser? (Using brave browser.) RZuo (talk) 16:52, 13 August 2024 (UTC)[reply]

@Nakonana I just realised how it might work.

  1. select files/pages
  2. type your target category
  3. click the first clickable category underneath the search bar
  4. now go back to search bar. When you press the -> button on your onscreen keyboard, it probably behaves like the enter key.

If it doesn't, then keep clicking any clickable item, then first clickable item, then try enter key in search bar, until you get the target category selected.--RZuo (talk) 17:32, 13 August 2024 (UTC)[reply]

It seems it works more likely if you click something that needs to "load", that is, a category that has lots of subcategories. Then after "loading" you will be able to press the enter key. RZuo (talk) 17:40, 13 August 2024 (UTC)[reply]
@RZuo Thanks for the tip. I'll try it next time I get to categorizing stuff :) Nakonana (talk) 12:16, 14 August 2024 (UTC)[reply]

taking up space

[edit]

Can we fix cat-a-lot to NOT take up the bottom corner all the time ? It's annoying and gets in the way with the fullscreen view of videos (esp on mobile this is very annoying), sometimes the wide layout button of vector-2022, several of the fullscreen gallery options etc. I understand that if you use this tool every day it's handy, but everytime i try it, i have to disable it again because of this. Almost every other tools is launched from the Tools section, why can't this one be ? —TheDJ (talkcontribs) 17:42, 26 April 2024 (UTC)[reply]

@TheDJ: For the why: probably because there was no other option at the time. This script was written in May 2007; according to mw:RL/MGU#MediaWiki 1.16 and before, addPortletLink() appeared in 2008.
For the why not: muscle memory. Maybe there could be a preference for that (Cat-a-lot already has preferences), defaulting to the legacy placement.
(By the way, I also use it very rarely, but it doesn’t annoy me. I use Vector 2010, though, maybe it’s more annoying on Vector 2022.) —Tacsipacsi (talk) 07:55, 27 April 2024 (UTC)[reply]
the wide layout button of vector-2022 – this one should be going away per mw:Reading/Web/Accessibility for reading/Updates (it's being replaced with an "Appearance" menu), so at least Cat-a-lot's button in the corner won't be affected anymore. You can check out the new menu by enabling checkbox "Accessibility for Reading (Vector 2022)" in beta features. —⁠andrybak (talk) 21:40, 16 June 2024 (UTC)[reply]

User Categories with Cat-a-lot?

[edit]

Is it possible to use user categories with Cat-a-lot?

Any advice/guidance, suggestions, or best practices?

--CmdrDan (talk) 20:34, 15 June 2024 (UTC)[reply]

Categorizing user pages using Cat-a-lot is possible – just turn on categorization of pages in "Preferences" (checkbox "Allow categorising pages (including categories) that are not files" – it's disabled on Commons by default). I don't think Commons has specific guidelines for editing of other editors' user pages. Check out enwiki's guideline, which doesn't apply to Commons (it's for a different project), but it may give you an idea of what kind of editing is acceptable.
Categorizing user categories should also be possible. However, there are currently two discussions about bugs in editing category pages: MediaWiki talk:Gadget-Cat-a-lot.js#Cat-a-lot failing 202402 and MediaWiki talk:Gadget-Cat-a-lot.js#Problem with moving categories. —⁠andrybak (talk) 21:36, 16 June 2024 (UTC)[reply]
Hello @Andrybak, I'm really interested in categorizing categories with Cat-a-lot on Commons, but I cannot find "Allow categorizing pages etc." in Preferences, in which tab is it exactly? Una tantum (talk) 08:24, 12 August 2024 (UTC)[reply]
Una tantum, it is in preferences of Cat-a-lot itself. See red rectangle on the screenshot at Help:Gadget-Cat-a-lot#Preferences. —⁠andrybak (talk) 08:28, 12 August 2024 (UTC)[reply]

Select all on Special:Search

[edit]

Somehow this doesn't work correctly.

The number of files is doubled.

  • If you add all pages, this isn't a problem, as the category gets added only once.
  • However, if you try to de-select one file, you can do that, and total goes down by one, but the file still gets added.

Somehow the filename and the description get selected separately, but only one can be de-selected. Enhancing999 (talk) 19:47, 23 June 2024 (UTC)[reply]

Misleading tooltip on the "+" button

[edit]

I just made a mess because the "+" button in the interface does say "Copy" in the tooltip. Like it would copy the category to the clipboard. But I don't want to create a copy of anything. Not a copy of a file. Not a copy of a category. All I want to do is to add the files I selected to the category. The only other button I could find was the "→" arrow that says "Move", but that actually deleted something completely unrelated without giving me a chance to review or even understand how it's going to decide what will be deleted and what not. For a start, can you please fix the tooltip to say "Add this category to the selected files"? Thank you. --Thiemo Kreuz (WMDE) (talk) 07:59, 27 June 2024 (UTC)[reply]

@Thiemo Kreuz (WMDE): The "+" button copies the selected items into the category next to that button. The "→" arrow copies the selected items into the category next to that button and removes them from the currently viewed category (that is, moves them to the new category from the currently viewed category).   — 🇺🇦Jeff G. please ping or talk to me🇺🇦 15:17, 19 July 2024 (UTC)[reply]
Files aren't "copied". There aren't two files after any of these actions. That terminology is incredibly confusing and doesn't align with user's expectations. What happens is that the category is added to the files, and as a consequence of that the files are also added to the category (in other words: they are now linked). I made a suggestion how this can be significantly improved without any actual change to the UI. It's just a tooltip. Expert users that know what the "+" button does can easily ignore the tooltip. Thiemo Kreuz (WMDE) (talk) 16:18, 19 July 2024 (UTC)[reply]

Highlight files already in category (2024-07)

[edit]

When selecting files to be add to a category, these are highlighted in yellow.

They get grayed out once the addition takes place, except if the file is already in the category.

In this case, the file just gets white again. I think it would be better to give them a different color, e.g. a lighter gray. This should make it easier to work on longer list that are to be added to different categories. Possibly #Select all on Special:Search needs to be fixed first. Enhancing999 (talk) 10:28, 1 July 2024 (UTC)[reply]

Feature request: Rate-limiting pause

[edit]

In depopulating a large category, I noticed that Cat-a-lot ignores edit rate limits, leading to annoyingly waiting one minute after every 45 pages. I think this should be changed so that it waits 60 seconds every time the rate limit is hit, and tries again once the limit is up. Proof of concept is the rate-limiting code in en:User:Qwerfjkl/scripts/massXFD. –LaundryPizza03 (d) 23:21, 7 July 2024 (UTC)[reply]

[Feature request] max height

[edit]

it'd be nice if the gadget can be a bit smarter by limiting its max height so that the input bar doesnt get pushed above the visible window.

or maybe the input bar can be fixed at the bottom. RZuo (talk) 14:11, 22 July 2024 (UTC)[reply]

Is there a way to remove items from one's watchlist after moving files with CAL?

[edit]

Maybe other users of this tool have found a way for that. Sometimes I forgot to first uncheck the watchlisting of files I move with cat-a-lot but didn't intend to watch or I only did so for the first page of files.

Is there a way to unwatch all files in a category (either directly or also including files in their subcategories)? Prototyperspective (talk) 22:12, 17 August 2024 (UTC)[reply]

It’s possible using the API: go to Special:ApiSandbox#action=watch&format=json&unwatch=1&generator=categorymembers&formatversion=2, click generator=categorymembers on the left, fill in gcmtitle as instructed, and click Make request. If an error popup appears, let it fill in the token automatically. (While it’s called “API sandbox”, it actually modifies your watchlist.) I don’t know about any more user-friendly solution. —Tacsipacsi (talk) 09:51, 19 August 2024 (UTC)[reply]

The control interface has disappeared

[edit]

The Cat-a-lot control interface has stopped displaying, so the tool cannot be used. Three hours ago it was working normally. ŠJů (talk) 23:23, 18 August 2024 (UTC)[reply]

Now it is showing normally. The outage lasted at least half an hour. --ŠJů (talk) 23:57, 18 August 2024 (UTC)[reply]

Is it just me or did the pop-up stop displaying the counter (see the screenshot)?
bug?
Prototyperspective (talk) 10:16, 22 August 2024 (UTC)[reply]

Very slow performance

[edit]

When I perform an action with Cat-a-lot in the Special:Search mode, the performance is very slow: copying and removing 500 files takes each more than 5 minutes, while earlier it was only some seconds. What happened? Can it be fixed? JopkeB (talk) 09:21, 19 August 2024 (UTC)[reply]

And for working in a category: it is just as slow. JopkeB (talk) 09:50, 19 August 2024 (UTC)[reply]
The code was changed to make actions sequentially and with a small pause in between (in order to comply with the API usage requirements). Hopefully that pause can be refined at a later time, but due to problems this gadget was causing, this restriction had to be put in place for now. —TheDJ (talkcontribs) 11:13, 19 August 2024 (UTC)[reply]
It's too slow now.
Maybe one could fix the script so the server doesn't get hammered twice for every edit: MediaWiki_talk:Gadget-Cat-a-lot.js#Select_all_on_Special:Search Enhancing999 (talk) 11:54, 19 August 2024 (UTC)[reply]
"It's too slow now." I'd say it was too fast before, as it wasn't complying with the API requirements for tools. Its one of those 'with great power comes great responsibility' things... —TheDJ (talkcontribs) 14:11, 19 August 2024 (UTC)[reply]
I think it broken when someone changed Special:Search. One of those, "tools are not our responsibility"-things. Enhancing999 (talk) 14:20, 19 August 2024 (UTC)[reply]
I hope there is a solution to this! Sinigh (talk) 13:54, 19 August 2024 (UTC)[reply]
Thanks TheDJ, for looking after it. So it might get a little bit faster, but it will "never" get as fast as before. That is something we have to learn to live with. JopkeB (talk) 15:19, 19 August 2024 (UTC)[reply]
If I may suggest an alternative: QuickCategories also lets you edit categories in bulk, but should play more nicely with the server, and can also automatically retry edits that failed if the wiki was temporarily too busy. Maybe some Cat-a-lot power users will find it useful? (Disclaimer: I made the tool, so I’m naturally biased towards it ^^) Lucas Werkmeister (talk) 18:45, 19 August 2024 (UTC)[reply]
looks like a better tool. thx. RZuo (talk) 05:41, 20 August 2024 (UTC)[reply]
But it can't be used to recategorize files in bulk, or? Sinigh (talk) 14:02, 20 August 2024 (UTC)[reply]
VisualFileChange could be another alternative. Use "append any text" as option to add categories. Enhancing999 (talk) 18:08, 20 August 2024 (UTC)[reply]
@TheDJ, please provide the link where, "The code was changed to make actions sequentially and with a small pause in between (in order to comply with the API usage requirements)." Thank you, -- Ooligan (talk) 04:11, 20 August 2024 (UTC)[reply]
https://commons.m.wikimedia.org/w/index.php?title=MediaWiki%3AGadget-Cat-a-lot.js&diff=912145148&oldid=907459999TheDJ (talkcontribs) 07:01, 20 August 2024 (UTC)[reply]
The new "Tech News" praises Cat-a-lot as recipient of the Coolest Tool Award 2024 at https://meta.wikimedia.org/wiki/Tech/News/2024/34 [2].
Agree – there shouldn't be a focus on finding alternatives for this extremely useful tool: instead, please actively try to have these rate-limits changed or make cat-a-lot become an exception in the API usage requirements (in general or when used by e.g. established users and/or specifically on Wikimedia Commons). And please link such efforts here such as a phab issue about it. Prototyperspective (talk) 18:16, 20 August 2024 (UTC)[reply]
 Agree! Sinigh (talk) 19:01, 20 August 2024 (UTC)[reply]


Hi, my name is Amir Sarabadani and I work at SRE team at the foundation. Our job is to make sure the site is available to everyone at all time. We had to introduce sleep between each edit because it was making edits at such rate that it brought down all Wikis more than ten times. This phabricator ticket has more technical details. The way it operated was a clear violation of our API policy and as such can't be changed back to the previous state. Similarly, no forking shall be done as it will endanger reliability of the site. I understand this is frustrating but the options here are between a slower gadget or sites being down. If a volunteer is willing to, they can refactor the gadget to make sure the edits are done in serial and then reduce the sleep time to 0.5s which would make it slightly faster but it won't be as fast as it used to be (and it shouldn't as I explained above why). I hope this makes it clearer why such change was done. Apologies for the inconvenience but we have no other choice. Thank you ASarabadani (WMF) (talk) 11:54, 23 August 2024 (UTC)[reply]

Thanks ASarabadani (WMF), for the explanation. It's sad, but I understand. JopkeB (talk) 12:22, 23 August 2024 (UTC)[reply]
because it was making edits at such rate that it brought down all Wikis more than ten times Wouldn't the next step after some adhoc temporary measure like limiting the tool edit rate be to change cat-a-lot so all users using it can't exceed some edit rate limit so it only becomes slow once its overall rate is too high? It also seems needed to also look into why it had the effect and which activities caused it. I think this is a rare case of a tool where it is very reasonable and somewhat needed to make it an exception allowed to make edits at rates above the API policy once the aforementioned solution is implemented albeit the sites shouldn't crash but e.g. automatically throttle all automated-tool-tagged edits like those being made with CAL. Prototyperspective (talk) 15:27, 26 August 2024 (UTC)[reply]

I came here for the same issue. Made it very slow and difficult to move files into renamed categories, or other fixes I used to do after uploads (because adding categories through the Wizard is very slow, and need a lot of copy-paste for each single category of files). Please bring back to original speed. ASarabadani (WMF) Having the website down for a few seconds was not a big issue, as it happened really rarely and for very short time. --Sailko (talk) 14:06, 23 August 2024 (UTC)[reply]

i'd say the question is, who was using it so massively that it brought down the site, and how.
the tool has been around for more than a decade? who was using it in the past few days with no regard for edit rate?
ofc, the tool should also be rate limited, but not as much as 1 or 0.5 sec between each edit? plenty more tools edit quite rapidly too. do they cause similar problems? RZuo (talk) 14:17, 23 August 2024 (UTC)[reply]
Other tools limit the maximum number of requests they'll send at one time.
The expected standard and documented policy for users of the API is that they'll send a request, wait for it to finish, and then send another request.
Before @ASarabadani (WMF)'s patch, Cat-A-Lot would send all of its edits simultaneously, without waiting for anything at all. Some of the time, this would result in immense load on the database server, bringing down all wikis for 10-30 minutes.
The tool could be both fast and safe if it was modified to issue requests serially, not in parallel.
But that change was not easy for us to do in unfamiliar code during an emergency situation, so we made the edit that would fix the site while unfortunately slowing down the tool.
We welcome a proper fix from the community.
CDanis (WMF) (talk) 16:01, 23 August 2024 (UTC)[reply]
With the current performance it is not possible to make bigger changes in the categories. And sorry, you didn't answer the question why it was OK all the years but now it that bad, that you practically shut it down.Avron (talk) 20:06, 27 August 2024 (UTC)[reply]
@CDanis (WMF): Is there any way to announce or publicize the need for a parallel→serial fix? Sinigh (talk) 20:20, 27 August 2024 (UTC)[reply]
Same for me. I used to mass-move hundreds of files under few seconds. It is taking minutes now and the tool is useless now. Quick Categories isn't a visual tool and VFC doesn't help with category tree. WMF is digging another trench between themselves and the community. --— Draceane talkcontrib. 07:18, 30 August 2024 (UTC)[reply]
If there were any replacement solution (per Commons:Requests for comment/Technical needs survey, Commons:Requests for comment/Technical needs survey/"Building block" tool to select files), I would say nothing. — Draceane talkcontrib. 07:42, 30 August 2024 (UTC)[reply]
@ASarabadani (WMF)@CDanis (WMF): As you can see from the comments in this thread, this is a critical tool that needs to be usable for high-volume edits. It is clear that the community is unhappy about the way this has taken place. I believe it would be appreciated by many if you could answer the following:
  • This tool has been in use for 17 years. Are these issues new? If so, why; if not, why was nothing done before?
  • Why was there no notification to the Commons community that a widely-used tool was being limited? Is there any policy for your team about when to notify communities about changes like this?
  • What is the timeline/path forward to refactor the tool to restore its former level of functionality? Will WMF developer time be allocated to do so, or will it have to be a volunteer?
Pi.1415926535 (talk) 02:36, 2 September 2024 (UTC)[reply]
I would also ask about the guideline. I think the API guideline is for somehow external or additional tools and not for MediaWiki functionalities itself. Of course technically it is an external tool but practically it is like a core MediaWiki feature. And then a question to the rate limiting that already exists. Why does this not prevent the problems? Or are users with ratelimit exception the problem? Generally this needs a server side solution to not impact user experience. GPSLeo (talk) 05:59, 2 September 2024 (UTC)[reply]

Regarding policy, the policy this gadget was violating is mw:API:Etiquette that is explicitly refereed to in our terms of use and must be respected. On why it hasn't caused issues before, it can be many reasons, more people are using the gadget, more people are editing Wikimedia Commons, edits are more expensive due to having more features, it can be that because of HTTP/2 more requests are being sent via browsers at the same time (I wrote in more details in phab:T370304#10072844). At the end day, it doesn't matter. The API policy is there to protect the infrastructure from harm. If it was violated and no issues were seen, it doesn't mean such violations are okay. With regards to responsibility, maintaining gadgets is the responsibility of volunteers. If you want engineering time to be allocated to this, I recommend using m:Community Wishlist. I say it again, it can be made much faster with proper rewrite of its internals but it can never be turned to its previous speed. Thank you ASarabadani (WMF) (talk) 16:07, 2 September 2024 (UTC)[reply]

Wasn't the tool reviewed by WMF and given an award? Also, edit rates at Commons were increased specifically to make this tool possible? Wouldn't one expect WMF to fix the bug identified months ago rather than deactivating it.
 ∞∞ Enhancing999 (talk) 16:11, 2 September 2024 (UTC)[reply]
Additionally, rules and terms of use are not an end in themselves...when a tool would greatly benefit to be exempt from these or when it would be good to change them, then I don't see why it wouldn't make sense to think about some changes that prevent issues from occurring without the speed limitation which probably needs to be done anyway sooner or later and would improve stability & performance: namely making the tool create one batch-command where the server then executes all tasks in the batch as fast as it can but not faster or slower than that (e.g. at max 5 users' queues in parallel with 0.05 sec per task at any point in time). Probably somebody else can explain it better and that wouldn't just be a very useful to get CAL up to speed again but also for various other purposes where I'm somewhat surprised that's not how such API requests are handled. Asking about this in the context of CAL me be inappropriate so one would need to look also into other advantages and needs and prior issues/discussions about something like that if that's indeed missing. Prototyperspective (talk) 16:26, 2 September 2024 (UTC)[reply]
"Wasn't the tool reviewed by WMF and given an award" No it was not. Coolest tool is an event that is facilitated by the foundation, and the committee are volunteers both from within and outside of the foundation, and often winners from previous years. They do not do code review, they just evaluate the 'coolness' of a project. —TheDJ (talkcontribs) 21:29, 3 September 2024 (UTC)[reply]
Including WMF staff on a paid WMF staff trip?
 ∞∞ Enhancing999 (talk) 21:35, 3 September 2024 (UTC)[reply]
What trip ? The committee uses online communication, and the awards are handed out at events that are already being organized (either the hackathon or wikimania), by people already attending that event for other reasons. I'm not even sure if there is budget for this entire thing. I really don't appreciate this disingenuous take. Talk is easy, but you could use that same energy to do something useful or fun for other people. Like the Coolest Tool Award committee. —TheDJ (talkcontribs) 21:47, 3 September 2024 (UTC)[reply]
You know.. it is comments like these, that make it REALLY freaking difficult for me as a volunteer, to fight for attention for Commons among the foundation. Maybe it is time this community forks off. let them solve their own problems. —TheDJ (talkcontribs) 21:50, 3 September 2024 (UTC)[reply]
You are free to praise the foundation development staff for their handling of needed functionality and the message that accompanied it.
 ∞∞ Enhancing999 (talk) 21:55, 3 September 2024 (UTC)[reply]
@ASarabadani (WMF): Please don't take this as a personal insult - this is a cultural problem with the WMF as a whole and not you/your team - but this is a perfect example of why users distrust the WMF. This is a tool that has been in use for 90% of Commons' lifespan (5 years longer than the API policy has even existed) and probably represents >10% of total edits on one of the busiest wikis. (That's likely 100M+ total edits with the tool - more total edits than all but a handful of wikis.) By any definition, that should be considered a core piece of MediaWiki functionality. Yet now it is near-useless with no guarantee it will ever be fixed.
There were multiple chances to avoid this problem. The volunteer developer (who is no longer active) should have been notified as soon as the issue was identified - which should have been 6 years ago when the code was refactored. The Commons community should have been notified when the problem was first identified to maximize the chance that another developer would step in. And the community should have been notified when the tool was limited, rather than having to ask for answers.
Given that failure by the WMF to communicate, it is insulting to the Commons community to say that the WMF can break this essential tool without any warning, yet will not but any effort into fixing it. It is equally insulting to say we should go through the Community Wishlist process, which is excruciatingly slow and has no guarantee that a request will be chosen, just to get back to the level of functionality that we had. Widely-used tools like Cat-a-lot are just as essential infrastructure to editors as the servers are. It doesn't matter to us if the servers are working perfectly if we can't properly categorize files. This problem was created by the WMF, and your team needs to be working with the Commons community to fix this gadget as quickly as possible. Pi.1415926535 (talk) 03:00, 3 September 2024 (UTC)[reply]
From the comments of @ASarabadani (WMF) we learn that there was no real problem with the tool. But then someone from WMF came and and felt a personal mission to enforce a API policy immediatly. This is not what WMF should akt like, but unfortunately it does.Avron (talk) 11:29, 6 September 2024 (UTC)[reply]
Weirdly some of the edits listed in the ticket are of Schlurcherbot, who doesn't use it and is generally known as a well-working bot.
 ∞∞ Enhancing999 (talk) 11:34, 6 September 2024 (UTC)[reply]
@Avron I'm not sure how you came to that conclusion, It's documented that the gadget took down commons multiple times until users from SRE brought the site back on-line. P858snake (talk) 11:58, 6 September 2024 (UTC)[reply]
OK, sorry I overreacted. You are right, there was an incident. But the gadget was used for years without known problems. If only the gadget was the cause, the problem should have happen much earlier.Avron (talk) 12:55, 6 September 2024 (UTC)[reply]
[edit]

It is not possible again to use Cat-a-lot in the Special:Search mode for categories and gallery pages (after clicking on "Preferences", and "Allow categorising pages (including categories) that are not files"). Can this please be solved soon? JopkeB (talk) 10:33, 26 August 2024 (UTC)[reply]

And now Cat-a-lot does not work for files either in Special:Search mode. This is very sad. JopkeB (talk) 09:53, 31 August 2024 (UTC)[reply]
If I understood the bug report about the outage a while ago, it was cat-a-lot issue mentioned at #Select_all_on_Special:Search that lead to the issue when a user tried to add "photographs by .." to thousands of files, each being hammered twice. It would be good if the bug were fixed so this can get back to normal.
 ∞∞ Enhancing999 (talk) 10:10, 31 August 2024 (UTC)[reply]
That is certainly not what I did. I just selected less than a dozen photos from perhaps 40 hits and tried to copy them to another category. One time 8 out of 10 were copied, another times none out of four. JopkeB (talk) 15:50, 31 August 2024 (UTC)[reply]
No, it was somebody else.
 ∞∞ Enhancing999 (talk) 16:00, 31 August 2024 (UTC)[reply]