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

From Wikimedia Commons, the free media repository
(Redirected from Help talk:Gadget-Cat-a-lot)
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]


Categorizing uncategorized content with Cat-a-lot[edit]

Hello, is somebody able to change the script so it also allows to categorize uncategorized content? That would be really helpful! --WikipediaMaster (talk) 18:54, 15 December 2008 (UTC)

Yes e.g. Search results --Kolossos (talk) 22:27, 24 December 2008 (UTC)

Is it possible to remove by copy or move to a category like by hotcat [1]. Thx, great tool, Conny (talk) 19:37, 8 April 2009 (UTC).

As previous comments, it would be very helpful to include in this very good script the categories handling. --Djiboun (talk) 19:42, 16 April 2009 (UTC)

Greetings to you hard working guys. This problem has now come up in a very big way. The geograph project is in the process of uploading 1.5 million files, most of them tagged . These are then placed in pseudo-categories based on the gridref parameter. The files are easily displayed by the normal means- the cat-a-lot button operates, cat-a-lot allows you to select all, and attempts to move them- then thows the error message that they have not been copy/moved due to the source category being unfound. If you cannot provide a fix- could you gives us a few pointers to where we need to look in the code so someone could write a fork. If the code would slow the performance of the tool, could I suggest that a simple override N/Y button could be incorporated int the UI so those of us who are trying to tackle the geograph surge could opt for some performance rather than none.
If there is a work around could someone spell it out for me and others.--ClemRutter (talk) 14:50, 24 February 2011 (UTC)
Easy. Do you want {{Uncategorized-Geograph}} removed as well? --DieBuche (talk) 19:05, 24 February 2011 (UTC)
I think retaining the {{Uncategorized-Geograph}} template would be beneficial, as it allows tracking of the files that haven't been properly checked (so bots can find them for other categorisation runs). Dropping the gridref= parameter would be helpful, as it sorts out the issue with Special:WantedCategories being overwhelmed. Commons:Bots/Requests/NilfaBot is of relevance here, I'd say this is the sort of edit to aim for. (It suggests a slight fork from the main Cat-a-Lot project to me). (On second thoughts that's a bad idea - a single purpose fork doing that is one thing, but in general it could lead to the grid ref info being lost without being utilised effectively.--Nilfanion (talk) 21:59, 25 February 2011 (UTC))
@ClemRutter if you do massive script runs with this, please so do on a bot account.--Nilfanion (talk) 22:01, 24 February 2011 (UTC)
How about a fork where: When you click "add", the uncat template is left untouched; when you do "move", the gridref= is dropped and the cat added.--DieBuche (talk) 11:11, 26 February 2011 (UTC)
That would work, after all using the gridref to put it into a location cat is "moving" the category from the temp location cat to a real one. Cat-a-Lot would be a more time-effective solution for categories with a few pics like this one than what I have been doing with the ones with 200+ images.--Nilfanion (talk) 01:20, 3 March 2011 (UTC)
Apologies for dropping out of the conversation- I forgot to check the watch button! @Nilfanion- sure I'll check it out. --ClemRutter (talk) 01:08, 6 March 2011 (UTC)
I think we still have a problem, I've just tried to move 4 images from Category:Images from the Geograph British Isles project needing categories in grid TQ2878 to a more meaningful category and got "Done. The following pages were skipped, because the old category could not be found: all the images were listed and none were actually categorised. Jonathan Cardy (talk) 22:57, 31 May 2011 (UTC)
The same for me when I wanted to move some from Category:Media needing categories as of 7 September 2008 --Avron (talk) 19:08, 1 June 2011 (UTC)

See also Commons:Administrators'_noticeboard#Patrolling_Category:Media_needing_categories. --  Docu  at 08:31, 24 July 2011 (UTC)


I've used Catalot to declutter some of our categories that contain excess images by creating subcategories for various individual churches and pubs in London. But it is still quite fiddly going through 42 images in a category such as Category:St Margaret's, King's Lynn (interior) and removing the Geograph category. It would be really helpful to have a tool that looked at the images in a subcategory, identified the various categories those images were now in and gave you a set of choices. So in a hypothetical example:

St Ethel, Pinner is in the categories Pinner and Churches in Ruislip. There are 42 images in the category of which:
6 are in the category Anglican churches in London, 7 in the category Anglican churches in England and 2 are in the category Anglican churches in the UK
similarly some are in various Saint Ethel categories, a dozen or so are in the category stone built churches in ... a couple have categories for the year the building was built and one even has a category for the architect who designed it. It would be very useful to be able to tag the categories Anglican churches in London, built in London in 1842, Saint Ethel churches in England, and buildings designed by Quinlan Rogers so that they all moved to the category for the church and tag the redundant ones such as Anglican churches in UK for removal. Whilst still of course being able to leave unaltered categories about rood screens and baptismal fonts that would actually apply to some of the 42 images but not the whole category. Another nice touch would be if one were able to drill down and identify the one anomalous image in the category that was also categorised as churches in West Sussex. Jonathan Cardy (talk) 07:31, 1 June 2011 (UTC)

Hidden categories and GLAM[edit]

Hi everyone,
I am working on the cultural partners list and involved in the GLAM movement. We focus on cooperations with instituational parnters such as galleries, libraries, archives and museums. When looking on large cooperations like that with NARA.
One issue we have noticed as problematic when handling large collections of uncategorised media is using cat-a-lot for hidden categories. Especially for the collections of NARA.
If possible from a technical POV we'd appreciate if cat-a-lot could work for hidden categories. If not possible due to technical issues, human resources or the like feel free to leave a note.
Regards, PETER WEIS TALK 13:00, 21 September 2011 (UTC)

Same issue was reported here. --Jarekt (talk) 14:50, 21 September 2011 (UTC)
OK, found the reason. Not an easy fix.
The reason Cat-a-lot cannot move the image to another category from:
[[Category:Category:Media from the National Archives and Records Administration needing categories as of 17 September 2011]]
is that the "source" category is not written in the image description.
Instead, there is:
Cat-a-lot has no means of determining that it needs to remove the template to remove the category.
As a safety function, if it cannot remove the "source" category, it will not do the edit at all. This also applies for "copying". --Magnus Manske (talk) 14:51, 21 September 2011 (UTC)
I understand that one cannot move a file if category is added by a template, but I do not see any reason why copying should not work. Just yesterday, I run again again into this issue (I obviously have short memory since I wrote about it few months ago, last time I run into it). I was trying to categorize some files from user:Dominic's NARA upload by adding temporary by author categories in Template:NARA-Author and then trying to copy the files using Cat-a-lot. Cat-a-lot did not work, so I guess I will have to use AWB bot or some other more complicated means. --Jarekt (talk) 15:16, 21 September 2011 (UTC)
I've run into the same problem when trying to put problematic images uploaded as part of the Wiki Loves Monuments campaign into a maintanance category. Since the original category was added by a template it's preventing me from copying them into a second category. Would it be possible to put the "in current category test" after the move/copy selection so that it only affects moves? /Lokal_Profil 14:40, 26 September 2011 (UTC)
This is a big, old and troubling issue to those of us trying to tackle the hundreds of thousands of uncategorised or poorly categorised images from the geograph loads. It is deeply depressing to go through a couple of hundred images, tag the ones that can be move into a particular category and then realise that Cat a Lot will let you spend your time tagging that category, it just won't action those edits. Aside from the harmless change of just allowing Catalot to copy in categories and leave such templates in place; Would it be possible for catalot to check before it lets you tag the images in a category and instead just give you the message "Cat A Lot can't be used on this category as it is in a template"? Better still, why not give Catalot the power to move consenting templates, and then amend the Geograph, NARA and similar uncategorised templates to give Catalot permission to remove them. WereSpielChequers (talk) 08:55, 30 October 2011 (UTC)
See also: MediaWiki_talk:Gadget-Cat-a-lot.js#Copying_images_from_categories_added_through_templates --  Docu  at 09:02, 30 October 2011 (UTC)

A simple fix is desperately needed- and the workaround really is not going to encourage mass participation in catting. Is there any mileage - in providing a template hunters switch that causes the selected files templates to be expanded out into a temp file before the determining the cats present- a loss of speed would be acceptable if it allowed us to get the job done?--ClemRutter (talk) 00:11, 31 October 2011 (UTC)

Alternatively perhaps we could just a bot to go through and remove the uncategorised geograph template from images that have been categorised using Catalot? Catalot now allows you to add categories using the copy images option even if you can't move them (I think this is a recent change). So it is now possible to use Catalot on the Geograph backlog, but if we start to make progress we will soon find ourselves wasting time because we can't differentiate between images already categorised via Catalot and the uncategorised. WereSpielChequers (talk) 01:06, 9 November 2011 (UTC)

I understand that cat-a-lot is working. For the backlog of images that include the Uncategorized-Geograph template but also have categories, I have written a bit of Python to identify them and can remove the template. See User:Fæ/Sandbox2 for an example sub-list of images. If this looks okay, I'd like to let it run through the backlog, it would probably finish with an overnight run. -- (talk) 16:23, 26 January 2012 (UTC)

Truncated texts when using cat-a-lot and other oddities[edit]

Please, see [2]. Thanks --JMCC1 (talk) 05:12, 2 April 2012 (UTC)

clarifying: just before that post was made, JMCC1 had half a dozen edit summaries from Cat-a-lot saying just rev ??? !!!. Rd232 (talk) 07:42, 2 April 2012 (UTC)
I don't think so. this was actually the problem. -- RE rillke questions? 09:00, 2 April 2012 (UTC)
Oh, I see, "rev" was JMCC1's edit summary reverting those problems. Rd232 (talk) 09:17, 2 April 2012 (UTC)
we had one documented similar "accident" with cat-a-lot on hewiki (as far as i can remember, this single accident screwed up 2 or 3 articles, not just one). was waiting for more data before reporting. it'll help to hear what browser (incl. version) did JMCC1 use when this happened. also, it would help if JMCC1 can try to execute the offending operation again and see if this behavior is consistent or was a fluke. קיפודנחש (talk) 13:01, 2 April 2012 (UTC)
it seems that the last change by cat-a-lot, just before the screwup began is this. note that it seems to be a part of large "move" operation, but for this one file, the target category already exists, and instead of "move" we get a "remove". after that, the fecal missile hits the rotating blades. peace - קיפודנחש (talk) 13:13, 2 April 2012 (UTC)

Example (File:Egyptian - Scarab Ring - Walters 542463 - Impression.): 23:45 25 mar 2012 23:48 25 mar 2012 23:48 25 mar 2012 23:50 25 mar 2012 20:35 29 mar 2012 14:32 1 abr 2012 14:36 1 abr 2012 14:37 1 abr 2012 14:48 1 abr 2012 JMCC1 (talk)

it's a nasty bug. tried to look into it a bit, and there are really 3 possibilities: either we get partial page when reading, or we truncate it wrongly when trying to do the replacement, or maybe the problem is when writing the page back to the server. the first and last hint to a bug in the media-wiki code, while the second implies the problem is in cat-a-lot. for now i go with "bug in cat-a-lot", and my hunch is JS/browser interaction. you still did not answer my question regarding browser and version you used when these mishaps occured. peace - קיפודנחש (talk) 21:54, 2 April 2012 (UTC)
Thanks for your help. My browser: Firefox 11.0 --JMCC1 (talk)

(I've reinstalled Firefox 11.0) Possibly solved. Thank you. --JMCC1 (talk) 11:00, 3 April 2012 (UTC)

Very good, except: Egyptian - Statuette of a Male Dwarf - Walters 71504.jpg [3] Egyptian - Statuette of a Male Dwarf - Walters 71504 - Left.jpg [4] Egyptian - Statuette of a Male Dwarf - Walters 71504 - Top.jpg [5] ... etc.
yes - i ran some inquiries on hewiki, and the person that experiencd the problem was using chrome, so i doubt it can be blamed on the browser. i hope to get some downtime and learn how to recreate the problem - i assume that once i can reliably reproduce it, it should be relatively simple dbggng. peace - קיפודנחש (talk) 18:23, 3 April 2012 (UTC)

The edittoken should be sent last. Perhaps this would solve such truncates. token: this.edittoken, I have the feeling that the POST-message gets lost in parts sometimes. -- RE rillke questions? 18:23, 3 April 2012 (UTC)

i am not aware of any constraints on the order of parameters - not even when using "get", and definitely not when using "post". in theory, we pass to $.ajax an object, and the order is not even well defined (even though practically, all javascript implementations that i know of will preserve the order the fields were set). are you sure that the "text" we pass to the "action=edit" actually contains everything it's supposed to?
peace - קיפודנחש (talk) 18:27, 3 April 2012 (UTC)
No, I am not -- after seeing that the problem is reproducible. And yes, almost each browser I tested, compiles the request in the order of the object, Fiddler unveiled. -- RE rillke questions? 19:09, 3 April 2012 (UTC)
i did not understand your last response. does this mean you are on it? or do you want me to look at it? i did not test vigorously, but in the one feeble attempt i made, the problem actually was *not* reproduced. if you have a recipe to make this issue appear, and if you do not have time to dig into it, please post the recipe here. peace - קיפודנחש (talk) 22:51, 3 April 2012 (UTC)
Ah, I saw the user's edits and thought JMCC1 could reproduce it. And I am not at it; I am simply too busy with my own scripts. You would be a great maintainer but the community decided to reject this proposal. So the community will suffer from its own decision. I would simply nominate you for adminship given the comments by the voters, though it wouldn't be very likely that it would fail. Perhaps you could get a global editinterface. -- RE rillke questions? 20:48, 10 April 2012 (UTC)
We could actually try again with a maintainer type idea; I think it suffered from being mixed in with other "group" proposals. Focussing on just that, it might have more chance to succeed. Rd232 (talk) 21:23, 10 April 2012 (UTC)
this is a very interesting discussion, but maybe it really belongs somewhere else...
returning to cat-a-lot woes: i volunteer to debug and try to solve it, if someone can provide a reproduction recipe. once i have a "patch" (presuming i'll have one), i am sure it won't be all that hard to find a sysop that will actually update the protected page. peace - קיפודנחש (talk) 15:34, 11 April 2012 (UTC)

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)

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)

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)

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

working on template /doc[edit]

Hi, we use this great tool in 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)

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)

IMO Visual File Change will do. --Zhuyifei1999 (talk) 10:12, 12 October 2013 (UTC)
  • What is Visual File Change? -- P 1 9 9   18:00, 13 October 2013 (UTC)
    Help:VisualFileChange.js, you can use some regexes (a.k.a RegExpr, which can match any category except one or more specific categories) to do a replacement (to empty). --Zhuyifei1999 (talk) 08:43, 14 October 2013 (UTC)
  • Tried it and it is very cumbersome. Not the way to go. I strongly suggest to increase the functionality of Cat-a-lot. -- P 1 9 9   18:21, 17 October 2013 (UTC)
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)
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)
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)
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)
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)
  • 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)
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)
  • We're open to suggestions. I offered one, thinking it might be the way to go, but if you don't think so, maybe you can suggest something else then... --P 1 9 9   22:51, 23 October 2013 (UTC)
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)

Uncategorizing; redirects[edit]

(Copied from Commons:Village Pump/Proposals#Cat-a-lot)

When you remove images from a category, they may end up uncategorized without your noticing it, and that may be worse than if the have a catgeory with limited relevance. If Cat-a-lot could warn the user when removing a category makes the image uncategorized, we could avoid some problems.

It would also be comfortable if Cat-a-lot automatically could change to the correct category when you move an image into a category redirect. It takes some time to figure out the correct categories. Actually, it sould not display redirects at all in the suggestions, that just leads you astray. --Jonund (talk) 17:57, 2 March 2014 (UTC)

Request: Change white area to gray even on error[edit]

I routinely use cat-a-lot to go through an entire category page of images and process them all. Normally, after selecting and then processing an image, the white field used to select the image turns gray and a description of what was done is added to it. However, when trying to add a category to an image that already has it, this does not happen, and the whitespace is turned white again. This can cause me to try to process it again, since I don't process them in the order shown on the page.

Please change the whitespace to gray and report the failure in it the same way that successful actions are reported.

On a related note, if you accidentally leave the page (e.g. by clicking a link instead of the whitespace just after it), you lose all that valuable information about which files you have processed already (i.e. all the gray turns white again). There is a message that appears when you edit a wiki page and try to leave it without saving. It would be nice if, when you attempt to leave a page on which cat-a-lot is active, it would give that message if there are images on the page that have not been processed (i.e. still have whitespace, selected or not, instead of gray) so you can choose to stay on the page instead of navigating away and losing that information. —[AlanM1(talk)]— 03:19, 6 March 2014 (UTC)

Listbox of categories doesn't show some[edit]

When I start typing in the category text field in cat-a-lot "Blue, red, white" (without the quotes), I get a drop-down list of 10 categories, including:

Blue, red, white packaging
Blue, red, white road signs

Blue, red, white ribbon bars should be between these two, but does not appear until I additionally type SPACEr, which then gives just:

Blue, red, white road signs
Blue, red, white ribbon bars

(the only two that match the pattern "Blue, red, white r"). Why doesn't Blue, red, white ribbon bars appear at first? —[AlanM1(talk)]— 02:32, 7 March 2014 (UTC)

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)

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)
In theory a combined search with, for example incategory:"Foo" incategory:"Bar", should return the intersection. -- Rillke(q?) 10:15, 8 August 2014 (UTC)
How does that work in Cat-a-lot? (talk) 14:14, 8 August 2014 (UTC)
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)
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)
Yes, that is exactly the problem, you said it better than I. Pi.1415926535 (talk) 20:53, 10 August 2014 (UTC)

Possible select-all bug: double-counting?[edit]

When most of the files in a category are to be copied or moved to the same place, it‘s easier to select all of them, then deselect the exceptions, than to select those wanted one by one. This evening I accidentally misdirected a group of files that I‘d deselected but were moved anyway. Investigating the problem I noticed that after clicking “Select all” in the Cat-a-lot panel, the displayed count was double the number of files actually shown on the page, while deselecting a file would decrement the count by only one. So I’d apparently deselected the files but not their ‘ghosts’, so to speak, and these invisible duplicate selections caused the files to be included in the batch. In case it’s relevant, the page in question was a disambiguation category (that I was trying to empty).—Odysseus1479 (talk) 09:22, 3 April 2015 (UTC)

@Odysseus1479: Are you still be able to select ghosts somewhere through the select all link? -- Rillke(q?) 09:48, 3 April 2015 (UTC)
Now that I‘m actually looking for somewhere it will happen again … of course not! I’ll keep looking, though, and if it comes up I’ll report it right away without moving anything. BTW I’ve seen the double count before, but since I didn’t try to deselect anything on those occasions it had no apparent effect on the operation.—Odysseus1479 (talk) 10:40, 3 April 2015 (UTC)
I’m back to report that when I selected-all in Playa, where there were 23 files, Cat-a-lot said 46 were selected. I had Gallery Details active at the time; guessing it might be involved, I reloaded the page and this time the select-all count was correct. I also noticed that if I activated GD with Cat-a-lot already open, clicking near the filenames had no effect on the selected or deselected status; clicking “Select none” returned the count to 0 but left the highlighting in place. In short, there seems to be a conflict or incompatibility between these gadgets, in my ‘environment’ at least. With GD already activated, selecting or deselecting one item at a time works normally. Let me know if there’s anything else I can do in the way of testing.—Odysseus1479 (talk) 06:04, 24 May 2015 (UTC)

Cat-a-lot in gallery pages bug?[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)

@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)
@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)
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)
@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)
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)
@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)
That's such a great news, thanks! :) -- Fructibus (talk) 19:36, 25 November 2017 (UTC)
@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)
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)
Btw: As I see right now, this could be useful too. -- User: Perhelion 16:12, 13 December 2017 (UTC)

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)

Cannot save preferences[edit]

Hello Cat-a-lot maintainers - It's been brought up on the Cantonese Wikipedia that Cat-a-lot is unable to save preferences there. We've updated to the newest version of the script this month but that didn't help. Can a maintainer of this script go and have a look? Deryck Chan (talk) 10:44, 8 October 2018 (UTC)

notice that this gadget requires 2 other gadgets: MediaWiki:Gadget-SettingsManager.js, and MediaWiki:Gadget-SettingsUI.js. these files on cantinese wikipedia seems to be out of date. i can't guarantee that getting an updated version will fix the problem, but this is the first thing i would try. peace - קיפודנחש (talk) 06:11, 11 October 2018 (UTC)
I've updated MediaWiki:Gadget-SettingsManager.js - one line has been updated which concerns some deprecation of a regex-related function. The other gadget is up to date. User:Roy17 - Can you check whether you can save preferences now? Deryck Chan (talk) 12:58, 11 October 2018 (UTC)
Yes it's working now. Thanks a lot! --Roy17 (talk) 13:08, 11 October 2018 (UTC)

How to force cat-a-lot to "turn on"[edit]

So if I make a table using PetScan, say, one that looks like this, is there like a magic word or something that I can insert into the page to make cat-a-lot treat that page as if it is a category?…to make it "turn on"? Because I need to make three changes to every page in that list (remove two parent cats, add one child), and if I could just get the dang thing to turn on, I can do it in about 30 seconds. I then need to repeat that process…I dunno…a few hundred times. GMGtalk 15:20, 6 November 2018 (UTC)

Hey GreenMeansGo, currently not (as the starting config is namespace depending). Is there a way you can move the talk pages to the (foreground) subject-pagename⁉ On the other hand we could add an user-config-option for talk-namespace⁉ But you could try mw.libs.catALot.init() in the browser console (or as bookmarklet). But as I see now we need more as a "turn on" here. Currently a list is not supported, but is already a top feature requested. -- User: Perhelion 22:37, 6 November 2018 (UTC)
Would be super duper if we could get worked out. Just be able to insert like _CATALOTPLZ_ or something in the page and have it click on for a custom table. GMGtalk 23:13, 6 November 2018 (UTC)
i think this can be done today, with no change to the gadget itself, which is complicated enough as it is (did not test or verified this!!!), by moving the list to a page in category namespace (not such a huge sacrifice - you can appropriate one page in cat namespace for this exercise).
all you have to do, i think, is organize the links in a list, instead of the table they currently reside in. you'll prablably have to wrap this list in some divs with appropriate classes (to mimic normal structure of category page), an trick catalot to think these are legit category page, with list of pages (or files) in the category.
ttbomk, catalot does not execute any API call to find if the pages are indeed in some cat, and instead uses the cat html content, so if you mimic it close enough (should be easy - maybe nest 2 or 3 divs), i believe catalot will work for you.
note that if this works, you have to remember that there no actual category to remove, so only use "add", never "remove" or "move". peace - קיפודנחש (talk) 19:30, 9 November 2018 (UTC)
Well if there's a way to figure out how to make it work like that, it's beyond me. I don't really have any frame of reference for how nesting divs would make it work. Just seems to recognize the wikilinks as wikilinks regardless. GMGtalk 20:32, 9 November 2018 (UTC)
sorry for the over-tech-talk. using "edit source", add to a page in category namespace, something like that:
<div id="mw-pages">
* [[first page you want to convert]]
* [[second page you want to convert]]
* [[third page you want to convert]]
* etc. etc. etc.
again, i did not test it myself, and i can't guarantee it will work, so you probably want to try it with a short list of pages before going the whole nine yards. you can probably find a way to use search/replace with some text editor, to convert the table you have now, to list, which cat-a-lot expect (i.e., lines beginning with "*"). also, in your cat-a-lot preferences, make sure to allow non-media pages. ("Allow categorising pages (including categories) that are not files"). hope this helps - קיפודנחש (talk)

how to use this on Wikipedia[edit]

The instructions state "you can install it [cat-a-lot] manually in your user JavaScript settings with following code:...". Question: how/where exactly are the "user JavaScript settings" in en Wikipedia/my PC where I am supposed to do this work? Hmains (talk) 22:49, 24 March 2019 (UTC)

@Hmains: assuming you use the default “Vector” skin, that would be en:User:Hmains/vector.js. At any rate, there should be a link to the right place beside the skin you use in the Appearance pane of your Preferences.—Odysseus1479 (talk) 23:18, 24 March 2019 (UTC)
found ok. I will check it out. Thanks Hmains (talk) 23:26, 24 March 2019 (UTC)
  • Cat-a-lot is working ok in en-Wikipedia, but the instructions here say this: "The semi-automatic preferences are not loaded with this example, so you need to set this also manually (because it supports only Commons, although it is theoretically possible, if you load all the local needed extra modules)". How exactly do it do this? Currently, I cannot, say, 'select all categories' to work with. Also cannot bring up the 'preferences panel' Thanks Hmains (talk) 17:57, 1 April 2019 (UTC)

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)

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)

Check over-categorization[edit]

What does "Check over-categorization" do? I couldn't find an explanation anywhere. Is there a way to keep only the most specific categories to affected files? The RedBurn (talk) 21:49, 7 August 2019 (UTC)

Hello RedBurn, this is indeed one of the last undocumented features of the gadget, but it should match with COM:OVERCAT. Maybe it should be described with a warning of use, as it is not always applicable. So it can't work automatically (if you want this). So you need the exact way it works? Technically it simply checks if the file is already in the parent-cat or sub-cat. -- User: Perhelion 13:46, 10 August 2019 (UTC)
I think he was asking for user instructions. As far as I understand it, you need to:
  • Click Select "all", "Files", or "Categories".
  • Click "Check over-categorization"
  • Cat-a-lot will mark affected files with a green dotted frame. That's all.
Is this correct? --Sitacuisses (talk) 15:55, 10 August 2019 (UTC)
Thanks Perhelion and Sitacuisses, I think that answers it perfectly! And what I was expecting it to do then is the third feature asked by Jeff G. below. The RedBurn (talk) 17:16, 10 August 2019 (UTC)

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)

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)

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)

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)