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]

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]

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]

Enabling it on Special:MediaSearch

[edit]

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

Problems categorizing category pages

[edit]

Cat-a-lot failing 202402

[edit]

I'm experiencing a lot of failed categorisation with Cat-a-lot this week - it's failing every day. After selecting items to recategorise, it sticks permanently on the "updating page" dialog box. Is there a known issue at the moment? Cnbrb (talk) 12:39, 24 February 2024 (UTC)[reply]

same problem. Miikul (talk) 20:16, 27 February 2024 (UTC)[reply]
Me too. Win7, Firefox. PeterWD (talk) 20:33, 27 February 2024 (UTC)[reply]
Same on chromium-based mobile browser. It looks like it's particularly struggling with moving categories that have sub-categories. As long as there are no sub-categories it seems to work. Nakonana (talk) 15:04, 2 March 2024 (UTC)[reply]
i think, all these sections are related to the bug introduced in https://phabricator.wikimedia.org/T355636 .
i guess, until https://phabricator.wikimedia.org/T355636#9553616 is addressed, cat-a-lot will fail for category pages.
see also https://commons.wikimedia.org/w/index.php?title=Commons:Village_pump/Technical&oldid=863394209#Cat-a-lot_does_not_work_for_categories .--RZuo (talk) 16:59, 25 March 2024 (UTC)[reply]

{{Edit request}} Change

CAL.getTitleFromLink( label.find( 'a' ) ) ||
CAL.getTitleFromLink( label.parent().find( 'a' ) ); // TODO needs optimization

to

CAL.getTitleFromLink( label.find( 'a:not([role])' ) ) ||
CAL.getTitleFromLink( label.parent().find( 'a:not([role])' ) ); // TODO needs optimization

This should fix it for the time being. Nardog (talk) 16:01, 23 April 2024 (UTC)[reply]

Editing "Expand" on English Wikipedia

[edit]

Could cat-a-lot please be fixed not to cause this mess? Thanks. * Pppery * it has begun... 02:20, 18 February 2024 (UTC)[reply]

See Commons:Village pump/Technical#Cat-a-lot does not work for categories. The only difference is that there is no Expand page on Commons, so it just hangs here, while it happily edits the article on enwiki. —Tacsipacsi (talk) 22:07, 18 February 2024 (UTC)[reply]
@Mike Peel and Jarekt: I think this needs an interface admin to implement, would one of you kindly do so? Enhancing999 (talk) 16:21, 23 April 2024 (UTC)[reply]
Sorry I do not speak JS, so I don't have a clue what is going on and how to fix it. --Jarekt (talk) 17:16, 23 April 2024 (UTC)[reply]
It's right there above... Nardog (talk) 20:39, 24 April 2024 (UTC)[reply]
✓ Done MusikAnimal talk 17:42, 16 May 2024 (UTC)[reply]

For Commons the problem has not yet been solved: for me the problem is still the same: it still does not work for subcategories with at least one subcategory. You can test it by trying to copy subcategories in Category:Energy by type of energy to Category:Energy by topic‎, but please leave out the 'by' categories. --JopkeB (talk) 03:53, 6 June 2024 (UTC)[reply]

Same problem at enwiki, found at en:Category:Caliphs while moving the century subcategories to en:Category:Caliphs by century. Cat-a-lot still tries to edit en:Expand, but the page is unaffected. –LaundryPizza03 (d) 22:41, 22 June 2024 (UTC)[reply]

Cat-a-lot fails on pipe-sorted categories

[edit]

On Commons, where a category is sorted with a pipe eg. [[Category:Fighter Squadrons of the United States Air Force|027]] the move fails to occur. The move splash screen just shows where it is up to, and then needs to be cancelled. Working fine where there is not a pipe sort in the category. Not tested elsewhere to see if it is an issue.  — billinghurst sDrewth 11:48, 29 March 2024 (UTC)[reply]

+1. Also an issue on bs.wiki. – Srđan (talk) 09:41, 14 May 2024 (UTC)[reply]
+1, I am having the same behavior and it has impacted category maintenance efficiency for me. Josh (talk) 17:51, 24 May 2024 (UTC)[reply]

Problem with moving categories

[edit]

The tool worked for me for a long time without any problems. Lately, however, the tool keeps hanging, mostly when moving categories (not images). Example: In the Category:Electricity in Baden-Württemberg I wanted to mark the 44 districts of Baden-Württemberg and move them to Category:Electricity in Baden-Württemberg by district. ... It loads and loads, but nothing happens. Is this a general problem at the moment or is it just a problem with my tool/settings? Best regards -- Triple C 85 | User talk | 01:50, 2 April 2024 (UTC)[reply]

@Triplec85: that is not a cat-a-lot issue, that is due to the categories being hard coded within templates. The templates will need to be adjusted and they will automatically be realigned once done.  — billinghurst sDrewth 02:46, 2 April 2024 (UTC)[reply]
@Billinghurst: Thanks for the reply. in this case, it is due to the Template:Districts of Baden-Württemberg? I don't know what I would have to do to make it work in the case I described. Greets -- Triple C 85 | User talk | 03:08, 2 April 2024 (UTC)[reply]
Category:Electricity in Landkreis Ludwigsburg for example, [[Category:Electricity in Baden-Württemberg|Ludwigsburg]] is not hardcoded into templates.
@Triplec85 your problem should be the same as #Cat-a-lot failing 202402. RZuo (talk) 08:52, 2 April 2024 (UTC)[reply]

 Comment See my post prior #Cat-a-lot fails on pipe-sorted categories  — billinghurst sDrewth 11:33, 2 April 2024 (UTC)[reply]

I'm having the same problem, and I don't know what "hardcoded within/into templates" means. Sinigh (talk) 21:00, 13 June 2024 (UTC)[reply]

@Sinigh where (which category) do you have this problem? what were you trying to do? RZuo (talk) 12:08, 14 June 2024 (UTC)[reply]
Sorry, I should have provided that information. I was trying to move the remaining people in Category:Photographers from Sweden to Category:Male photographers from Sweden. I was able to do move quite a few with only a few hiccups, but now it does nothing, regardless of whether I select all or make an arbitrary smaller selection. Sinigh (talk) 12:54, 14 June 2024 (UTC)[reply]
thx for the report. yes, i tried it and catalot fails. those cats are not "pipe sorted" either. it seems catalot is now failing for any subcats. RZuo (talk) 14:33, 14 June 2024 (UTC)[reply]
Thank you for taking a look. I'll just focus on categories with few subcats for now. :) Sinigh (talk) 14:42, 14 June 2024 (UTC)[reply]
I think it fails on subcats that have subcats (sample: the ones with "(1 C)" after the name). Enhancing999 (talk) 08:05, 15 June 2024 (UTC)[reply]
Possibly! I tried Cat-a-lot after removing the subcats of two random categories and it still didn't work, but perhaps the cache needs to be cleared first, or something. Sinigh (talk) 11:05, 15 June 2024 (UTC)[reply]

It had worked for me for a very long time without any problems. But unfortunately not for quite some time. More and more often, categories can no longer be moved. e.g. federal state categories that I would like to move to a new category in a country "by state". Or district categories in state "by district". If you then have to process 50 districts individually in some federal states instead of moving 50 at once to a "by district" category, this costs a lot of time, especially if you would like to work on many such categories in one day, and the actual benefit of cat-a-lot is lost. -- Triple C 85 | User talk | 11:49, 15 June 2024 (UTC)[reply]

@Billinghurst, RZuo, Sinigh, and Enhancing999: Several times a week, sometimes almost every day, I sort pictures by "states" or "cities" or "districts".
Can you take a look at:
Greets -- Triple C 85 | User talk | 09:39, 16 June 2024 (UTC)[reply]
Actually I could move
which only contain files, but not categories. The other three with subcategories couldn't be moved. Somehow this confirms my hypothesis above. (I think the move can be reverted as it's not a particularly helpful one, making the category tree more difficult to navigate). Enhancing999 (talk) 09:58, 16 June 2024 (UTC)[reply]
These category structures exist worldwide. Category:Categories by city by country, Category:Categories by state by country, Category:Categories by district by country. This is common. They create cross-connections and improve the structure. They're useful, of course, and if you don't see that, it doesn't warrant a revert. It is helpful! You find this all over the world: Category:Categories of the United States by state, and hundrets of other countries ...
Greets -- Triple C 85 | User talk | 10:04, 16 June 2024 (UTC)[reply]
Huh. The categorization of categories using Cat-a-lot used to work for me on English Wikipedia, but not anymore. Examples of it working: en:Special:Diff/1223284023, en:Special:Diff/1225655473, en:Special:Diff/1225655473. Now I just get the "expand" error, same as in #Editing "Expand" on English Wikipedia. —⁠andrybak (talk) 10:34, 16 June 2024 (UTC)[reply]

Random unexpected failures at enwiki

[edit]

I can no longer reliably use Cat-a-lot at enwiki to move large numbers of pages to a new category, as it will randomly fail to move most of them. This recently happened while trying to move the century subcategories of en:Category:Caliphs, all of which manually added to the category, into a new by-century container category.

The following [NUMBER] pages were skipped, because the old category could not be found:
expand
...

LaundryPizza03 (d) 22:09, 22 June 2024 (UTC)[reply]

@LaundryPizza03: this is typically a sign that a template is adding the category. Once that is corrected, you can probably proceed.   — 🇺🇦Jeff G. please ping or talk to me🇺🇦 00:41, 23 June 2024 (UTC)[reply]
I have checked that this is not the case. I believe this is the same bug reported higher on this page about editing en:Expand. –LaundryPizza03 (d) 00:57, 23 June 2024 (UTC)[reply]
It is requested that an edit or modification be made to this protected page.
Administrators: Please apply <nowiki> or {{Tl}} to the tag after the request is fulfilled.

LaundryPizza03

Maybe the patch wasn't enough. Try

			var label = $( this ), file = label.find( 'a[title][class$="title"]' );
			file = file.length ? file : label.find( 'a[title]' );
			var title = file.attr( 'title' ) ||
CAL.getTitleFromLink( file ) ||
CAL.getTitleFromLink( label.find( 'a:not([role])' ) ) ||
CAL.getTitleFromLink( label.parent().find( 'a:not([role])' ) ); // TODO needs optimization

to

			var label = $( this ), file = label.find( 'a:not([role])[title][class$="title"]' );
			file = file.length ? file : label.find( 'a:not([role])[title]' );
			var title = file.attr( 'title' ) ||
				CAL.getTitleFromLink( file ) ||
				CAL.getTitleFromLink( label.find( 'a:not([role])' ) ) ||
				CAL.getTitleFromLink( label.parent().find( 'a:not([role])' ) ); // TODO needs optimization

Nardog (talk) 09:28, 23 June 2024 (UTC)[reply]

I tried it in my sandbox: Special:Diff/889809858. It works! Example edits: Special:Diff/889811285, Special:Diff/889810363. Thank you, Nardog. —⁠andrybak (talk) 00:22, 29 June 2024 (UTC)[reply]
This still doesn't work on enwiki. –LaundryPizza03 (d) 00:38, 29 June 2024 (UTC)[reply]
As the banner above says, it has to be deployed by an interface admin. Nardog (talk) 00:47, 29 June 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]

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]