MediaWiki talk:Gadget-HotCat.js/Archive02

From Wikimedia Commons, the free media repository
Jump to: navigation, search
Archive This is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page.


How to include wikibits.js on all pages?

It says "Make sure your wiki includes wikibits.js on all pages." How do I do that? Tisane (talk) 14:09, 30 March 2010 (UTC)

If you have a plain vanilla MediaWiki installation, you don't have to do anything. The server already sends that file. You can check by viewing the source of any page served by your server. If it contains a line that starts with "<script" and that contain "/wikibits.js", you're all set. If not, well, then make sure that your wiki does send that file. Lupo 20:46, 30 March 2010 (UTC)

Problem changing categories

I'm using Firefox 3.6.2. When trying to change a category, as soon as the selection list appears, the input field contents are filled with the first element of the list. Therefore for me HotCat does not work. Thought you might want to know. --WolfgangRieger (talk) 12:14, 28 March 2010 (UTC)

It's meant to be that way. If you continue to type, the selection changes. You can even type something that is not in the list and hit enter. -- User:Docu at 12:19, 28 March 2010 (UTC)
Well, I'll have to re-check with FF 3.6.2, which I don't have right now. If the automatically added text is not selected in that FF version, that may indeed be a problem, because then it won't be overwritten by the next keypress. Lupo 20:36, 28 March 2010 (UTC)
No, looks good in FF 3.6.2, too. Working like it should. Lupo 16:08, 29 March 2010 (UTC)
It may not be FF. I tried it here (on Commons, also on en-WP) and it worked fine. However, on de-WP as described: The first list entry replaces my input, nothing is selected and the cursor is positioned at the end of the text. :-( --WolfgangRieger (talk) 17:07, 31 March 2010 (UTC)
Since you might want to know: My monobook.js contains only:
However, I commented it out and still have the problem. Can you reproduce the problem on de-WP? --WolfgangRieger (talk) 17:17, 31 March 2010 (UTC)
Confirmed. Paradoctor (talk) 19:59, 31 March 2010 (UTC)
Sorry, but on de-WP, you're on your own. They're running a very old version of this gadget. Maybe they should update. Either to our version, or to that at en-WP. If they do, they should adapt the resolution of redirects and disambiguation categories; they probably have other maintenance categories that can serve to identify these cases. Who maintains the gadget at de-WP? (I cannot do so; I'm not an admin over there.) Lupo 21:50, 31 March 2010 (UTC)
I left a notice on the DE tool disk ([1]). --WolfgangRieger (talk) 14:05, 1 April 2010 (UTC)
Yes check.svg ResolvedWorks -- User:Docu at 14:23, 1 April 2010 (UTC)

Upcoming Changes

As some of you may know, the Usability Initiative has been running a beta over the past several months. Over 570,000 users across all the Wikimedia projects have tried the beta, with about 80% of users keeping the beta after trying. Approximately 7,500 Commons users have tried the beta with 86% of these users still using the beta. Some data about the beta is available here.

Given these encouraging results, we are planning on making the new usability features the default experience for Commons users during the second week of April. We wanted to make users of the most heavily used gadgets aware of this change. We appreciate that many gadgets rely on custom user scripts and site-specific JavaScript; Our changes are not especially related to multimedia usability, but we need your help to make sure the most used tools are compatible with the new interface. If you encounter issues using the beta, please share your feedback on the dedicated page.

A similar message has been placed on the Admin Noticeboard. Also, you may find more information about the Usability Initiative here.

Thanks in advance. Howief (talk) 04:52, 2 April 2010 (UTC)

Hint too fast!

When I type on HotCat, the hint appear too fast, and a lot of times it don't let me to write the right category. For example, if I write "Train interiors", appears automatically "Train interiors by country", and it don't let me to delete "by country". --Aushulz (talk) 12:18, 18 April 2010 (UTC)

Agreed please increase the time before it suggest stuff. I often have to "fight" with the script, hitting the backspace button as fast as possible--DieBuche (talk) 10:18, 18 May 2010 (UTC)
Since you signed up as beta tester for the new version: that should be fixed, too, in that version. Lupo 10:31, 18 May 2010 (UTC)

HotCat on Geograph

Feature request. As you are probably aware there is a massive upload taking place of UK images. Each is tagged with

== {{int:license}} == {{Geograph|247592|Bill Cresswell}} {{Check categories-Geograph|year=2010|month=February|day=1|lat=54.938082|lon=-2.513481|Geographcategory=Historic site}} [[Category:ATown]]....and more

which displays as

Categories: Images from Geograph needing category review as of 1 February 2010 (−) (±) | Coanwood (−) (±) | Historic sites in England (−) (±) | Featherstone Castle POW Camp (−) (±) | (+) I can add the missing cats- with HotCat but Images from Geograph needing category review as of 1 February 2010 is is a template so I can touch it. Any chance of doing a tweak so I can nuke it and its 700,000 little friends. --ClemRutter (talk) 12:08, 21 May 2010 (UTC)

Just removing that whole template like {{uncategorized}} when someone adds any category change is probably not a good idea. Who said that the person who added an additional category actually did check the existing categories? Lupo 16:08, 21 May 2010 (UTC)
Yes. It is a question of probability. But with 700,000 files to do- I would say that anyone who is going to review these cats should be able to do the whole process from HotCat. I can't see that vandalism is too much of a problem here. --ClemRutter (talk) 23:31, 21 May 2010 (UTC)

HotCat on the trail of geotags

Request for a hidden feature. Occassionally one comes across a directory of images with no geotags- but if you know the area- it is obvious where the photographer stood. (Bridges and churches for example). My fantasy is to geotag the location using a bookmarklet, and click on the [+] new HotCat cat. I would then Ctrl-V the bookmarklet into the new cat box. The only check that needs to be done is whether there was already a geotag- when the new one would not be written with an error message of Conflict!. I realise you didn't have anything planned for the summer.. --ClemRutter (talk) 12:08, 21 May 2010 (UTC)

There is already a bookmarklet to extract the coordinates of a Google map view. It opens a dialog box with a complete {{location dec}} ready for copy-pasting. Copying that, clicking edit on the Commons image page and then pasting that into the normal edit box is simple enough, isn't it?
Here's the bookmarklet code:
HTH, Lupo 16:01, 21 May 2010 (UTC)
Yes that is the one of them.
IMHO produces a more meaningful result for commons- but for a 700 precision for en|wikipedia- one should use.
The issue is to use the hotcat structure to add these bookmarklets to a files in a directory. Take the directory Category:Barjac (Gard). Nine of the images are mine- all geotagged- twelve more by a superior photographer do similar views but have no geotag. Hotcat allows me to add a new cat to 12 files in under a minute- I could geotag all twelve in under 10 mins, using the HotCat structure- but if I need to open the edit window and scroll etc it will take more than thirty. As my edit would be an estimate, I make the dangerous assumption that the original tag will be more accurate- so I don't propose to change it. If the geotag does exist then I would still go for a full edit. (However this may be wrong- geograph uploads often falsely have a location of object not camera tag or even a OSGB36- and in that case I would be more reliable).--ClemRutter (talk) 23:22, 21 May 2010 (UTC)
BTW Usability:Multimedia:Hub#Specifications mentions "Interface cleanup" and "Location editor". The later has priority 3, so it might not happen though. -- User:Docu at 23:35, 21 May 2010 (UTC)
Commons_talk:Geocoding/Archive_3#AddCoordinates.js might be of interest too. -- User:Docu at 10:47, 22 May 2010 (UTC)

HotCat updated to V 2.0

After several weeks of beta-testing I've gone ahead and updated HotCat to the version presented above. Beta-testing did not reveal any major issues, so I hope it goes well for everybody. If not, leave bug reports here. Thank you. Lupo 07:40, 26 May 2010 (UTC)

A word of warning

I am discovering an increasing number of miscategorizations, unwarranted removal of categories, removal of deleted/moved categories without replacement, etc by HotCat users. I don't know whether the users or the script are too "eager" in their alterations. In any case, there seems to be need for manual double-checking until this is resolved. Dysmorodrepanis (talk) 17:07, 26 May 2010 (UTC)

Examples? Lupo 19:03, 26 May 2010 (UTC)
The script doesn't do anything on it self. It's not a pseudo intelligent script like catscan. That are the users clicking on "remove category".--DieBuche (talk) 19:04, 26 May 2010 (UTC)
That function hasn't changed at all between the old and the new HotCat. Lupo 19:06, 26 May 2010 (UTC)
I just went through recent changes as far back as it goes (about 1000 edits), and checked all edits in which categories were removed via HotCat. I see no problem at all. Lupo 19:16, 26 May 2010 (UTC)

Check-this-category feature request

When choosing a category for an image I often find myself wanting to open one or more of the suggested categories to see what's already there. To do this, I have to open a new tab and search for the desired category. It would be nice if I could open the currently selected category simply by clicking on HotCat's "check" icon (which doesn't seem to do anything right now other than indicate that the category exists). Note that I would prefer that it not automatically open in a new window/tab but require the usual control-click or shift-click (or whatever) if the user wants it to open somewhere other than the current page — IOW, it should behave like any other "normal" link. What do you think? - dcljr (talk) 01:37, 27 May 2010 (UTC)

Hmm. I just realized I can control-click the "OK" button (which acts sort of like a "Preview") and then control-click the category name. Only a little less convenient than my suggestion above. Oh, well, you can think about my suggestion, anyway... [g] - dcljr (talk) 01:45, 27 May 2010 (UTC)
Well, crap. That's not working anymore. It only worked the first time I did it. - dcljr (talk) 01:55, 27 May 2010 (UTC)
That's actually a nice idea. The current work-around would be to switch on multi-change mode, make the category change, click OK, then click the link. To change the category again, click "(±)". Finally, to save click "save". A bit too many clicks... I'll see how I can implement your suggestion. If the category doesn't exist, should clicking the icon open it in an edit page or not? (Even non-existing categories may contain files; see Special:WantedCategories.) Lupo 05:42, 27 May 2010 (UTC)
My opinion: yes, open it anyway. Not only do some nonexistent cats contain files, sometimes the tool claims the cat doesn't exist when it really does (caching issues, I suppose). - dcljr (talk) 06:20, 28 May 2010 (UTC)
Why should it not open the category in a new window/tab? Note that in multi-mode your may lose your unsaved category changes if you load a new page over the current one. If clicking the icon opens the category in the same window/tab, a single mis-click would mean the changes were lost. Lupo 05:45, 27 May 2010 (UTC)
Just my personal preference. My attitude is, I know how to open a link in a new tab, so I can do it if I want to. I don't like sites choosing to open things in new tabs regardless of my wishes. But as you say, there's not much use in opening the cat in the same window, so if you want to force a new tab/window, that would be fine with me, as long as I don't end up with two new tabs when I accidentally control-click it. - dcljr (talk) 06:20, 28 May 2010 (UTC)

Availibility of HotCat.js in the edit form

In the upload form, there are paralelly two possibilities how to add categories: either directly into the edit window, or through the HotCat.js which is available in the "Upload options" field. Those two ways can be combined soever. I usually add categories by the first way (which allows to copy the whole description) but I use HotCat.js to search and check appropriate categories.

Edit form has very similar tools as the upload form but HotCat.js isn't available during use of edit form. Would be a problem to add similar tool? --ŠJů (talk) 23:58, 27 May 2010 (UTC)

Yes, it would, especially with the new editor that the usability initiative people are developing, and which may or may not be enabled, and which, I think, is supposed to contain wizards for all kinds of stuff, possibly including category management. I don't use that editor myself, and I'm staying as far away from interfering with it as possible. In fact, it just occurred to me that I never tested whether the changes HotCat makes still work when this editor is enabled in vector. Well, I guess given the absence of complaints, we may assume that it does work. Lupo 08:02, 28 May 2010 (UTC)
Sory, I'm not sure that you understood me and I don't understand your answer. I try to repeat it. When I'm uploading a new file, I can use HotCat.js in the upload form. But when I'm creating a new category page or the new gallery page, I cannot use HotCat.js in the edit form to search and choose categories. I want to choose a category for the new category or gallery page be as easily as choose a category for the new file. --ŠJů (talk) 13:35, 28 May 2010 (UTC)
Well, then just go to the non-existing category or gallery page, but not in edit mode. (Remove the "action=edit" in the URL.) Having HotCat active on edit pages and insert the categories in the text box might interfere with the enhanced text editor. Lupo 14:44, 28 May 2010 (UTC)
This procedure should be standard and intuitively helpful for users? I didn't request some guidance for hackers but more practically and unified standard interface. --ŠJů (talk) 03:40, 29 May 2010 (UTC)
I'm sorry that you are not happy with the suggested work-around. However, I am not going to enable HotCat on the edit form because I fear it might interfere in unpredictable ways with the enhanced editor from the usability team. The old HotCat also wasn't enabled on the edit screen, and for me, this "new feature request" is too risky to implement. (It would also necessitate a substantial testing effort before deployment.) If somebody else wants to try this and take the responsibility for it, be my guest, but I won't do it. Doing something like this is IMO the job of the usability editor team. They know best how to integrate stuff with their editor. Lupo 10:21, 29 May 2010 (UTC)

Removing of sort key

The updated HotCat allows to display sort key, to change sort key or to add sort key. But when I try to remove sort key in a similar way, such trial seems to be successful but really, the sort key remains unremoved (and this fact is hidden to the HotCat user). HotCat should display sort key either always (and removing of it should mean to remove it) or never. Mixing of both forms is disorienting. --ŠJů (talk) 23:36, 27 May 2010 (UTC)

That has historical reasons. However, I'm working on this. My suggestion:
  1. Input contains only a category ("Foo"): an existing sort key from the source is preserved when performing the edit.
  2. Input with sortkey ("Foo|key"): the edit inserts the specified key.
  3. Input with trailing bar, but no key ("Foo|"): an existing sortkey is removed when editing the page.
Note that we need to keep possibility (1) for backwards compatibility, and also because because there are cases in which HotCat cannot know the sortkey of an existing category. Possibility (3) would be new, previously, this also just preserved the key (i.e., was treated like case (1)). Lupo 10:27, 29 May 2010 (UTC)
  • ✓ Done in V2.2. You'll need to refresh your browser's cache to get the change, otherwise, it may take up to 30 days until you see it. Lupo 12:55, 31 May 2010 (UTC)

Hidden categories and subcategories

I activated the new HotCat on Commons (thanks a lot!). I can't change hidden categories nor can I move to subcategories (via arrow down), but I read here that both should be possible. Any hints? --Frank C. Müller (talk) 06:12, 28 May 2010 (UTC)

That's a brand-new extension that was implemented at the German Wikipedia. I'm in the process of porting this over to the Commons. A little patience, please! Lupo 07:52, 28 May 2010 (UTC)
Ok, dann wart' ich noch a weng. gruß, fcm. --Frank C. Müller (talk) 08:32, 28 May 2010 (UTC)
  • ✓ Done in V2.2. You'll need to refresh your browser's cache to get the change, otherwise, it may take up to 30 days until you see it. Lupo 12:55, 31 May 2010 (UTC)

HotCat updated to V2.2

Incorporates some changes that were made by User:Merlissimo at the German Wikipedia, most notably a search engine to list subcategories (plus one I added one for the parent categories), and a configurable list of category names for which the script should actually remove a template (only removal is supported; on the Commons, the list is currently empty).

Additionally, version 2.2. includes a few suggestions made above such as highlighting unsaved category changes, or having the "save" button enabled only when there are changes that need saving, or category sortkey removal. Lupo 12:58, 31 May 2010 (UTC)

Blank line between categories

In some cases, there appears a blank line between categories, see [2]. Maybe, invisible space characters aren't trimmed. --ŠJů (talk) 15:34, 31 May 2010 (UTC)

✓ Done Should be fixed now. To get the correction, reload your browser's cache. Lupo 16:10, 31 May 2010 (UTC)

Up and down arrows

Would it be possible to select within the suggestions by using the up and down arrows on the computer keyboard instead of using the mouse ? (I use the arrows in the search tool and I find it convenient). Teofilo (talk) 07:34, 11 April 2010 (UTC)

That's been done as part of HotCat V2.0. Lupo 19:11, 2 June 2010 (UTC)


Hi, thanks for yours hard work on this excelent tool. It is used on a lot of Wikipedias (and other projects) but when you update this tool, every project using it have to be updated separately. I'd like to know if is possible modify this to be possible import of tool and every project should add translation only or tranlations could be accumulate on Commons. It would be great because every project would stay updated. --Sevela.p 21:45, 1 June 2010 (UTC)

Hmm. I think this should be possible with the latest version. You'd have to do the following:
  • Create a local page "MediaWiki:Gadget-HotCat.js" with the contents
if (wgServer.indexOf ('https://') == 0) {
  importScriptURI ('');
} else {
  importScriptURI ('');
  • Set up that local "MediaWiki:Gadget-HotCat.js" as a gadget.
  • Write a local file "MediaWiki:Gadget-HotCat.js/lang", where lang is the default language of your wiki. In that file, modify the settings and messages in the HotCat object as appropriate.
That's it. When you then enable the gadget, you should have a working HotCat. In fact, I've just tried that process at the German Wikiversity, and it works like a charm. See file v:de:MediaWiki:Gadget-HotCat.js for the import and v:de:MediaWiki:Gadget-HotCat.js/de for the localizations, plus v:de:MediaWiki:Gadget-HotCat and my change here to install it as a gadget. I'll now go add this to Help:Gadget-HotCat. Lupo 06:59, 2 June 2010 (UTC)
Note that translations are always read from the local wiki. But of course, you can "redirect" that to the Commons, too, by writing a local "MediaWiki:Gadget-HotCat.js/lang" that just uses importScriptURI again to get the Commons version of the file, if it exists. Lupo 07:01, 2 June 2010 (UTC)
Thank you a lot. That's great.--Sevela.p 08:41, 2 June 2010 (UTC)
Cool. And it seems to work, too... but you should probably also update cs:MediaWiki:Gadget-HotCat to link to our Help:Gadget-HotCat. It currently links to TheDJ's version at the English Wikipedia. Lupo 09:42, 2 June 2010 (UTC)
Oh, and your previous copied version had HotCat.uncat_regexp = /\{\{\s*([Kk]ategorizovat)[^}]*\}\}/g ... Lupo 10:02, 2 June 2010 (UTC)
Thanks for notice I corrected it. And I think that there is missing semicolon after 'Ergänze [[Kategorie:$1]]'. --Sevela.p 14:59, 2 June 2010 (UTC)
Yes, that's right. Though semicolons between statements are optional in JavaScript. I prefer to write them, though. Thanks for pointing it out; it's corrected now. Lupo 18:39, 2 June 2010 (UTC)

Removing of not added categories

When the multi-change mode is active, the script should differentiate between current categories and categories prepared to add (and not saved yet). In the current version of HotCat:

  • categories prepared to add are accompanied with "x" and "-", although function of both should be identical in this case
  • categories which was prepared to add and consequently removed through the "-" are declared in the edit summary as removed (see here).

By the way, the character "x" can be conceived rather as "remove somethink" than as "restore (restitute) the current (original) stage" - wouldn't be better somethink like "←" which is more intelligible as return? --ŠJů (talk) 12:55, 3 June 2010 (UTC)

Second point is fixed. To get the correction, reload your browser's cache. Lupo 13:16, 3 June 2010 (UTC)
And the first point is fixed now, too. Newly added categories do not get the "(×)" link; instead the "(-)" link removes the whole category that was originally added. Though I'm not entirely sure that this will not create even greater confusion because now "(-)" does not behave the same for newly added or existing, but changed categories... Maybe it's better if we just don't give the newly added categories the "(-)" link? Lupo 13:58, 3 June 2010 (UTC)
Yeah, that's better. Newly added categories just don't get the "(-)" link. Lupo 14:03, 3 June 2010 (UTC)
I'm not sure that "(←)" would be better than "(×)". What do others think? Lupo 13:58, 3 June 2010 (UTC)

In the mode of editing an existing page, both problems looks succesfully resolved. But a new problem emerged. In the "upload file" mode, a proposed category can't be removed. There is neither "-" nor "x". --ŠJů (talk) 18:41, 4 June 2010 (UTC)

Oh, darn; I forgot about that. Is fixed now. Lupo 22:06, 4 June 2010 (UTC)

Cancel button

As i mentioned on 28 May 2010, the button "Save" should be supplemented with a button "Cancel". It is nonstandard that there exists a possibility to switch to multi-change mode but not to abandon it without any change. Ant it is unreasonable that induvidual changes can be canceled during dialog mode but multiple change cannot. We need be mindful that ++ is not very perspicuous sign and when somebody clicked it to test it, he should have at his disposal a simple and standard way back. --ŠJů (talk) 13:13, 3 June 2010 (UTC)

I really don't see the utility of this. There already is a way back: use the browser's reload button. Or just don't save the changes prepared in multi-mode.
I don't understand what you mean by "induvidual changes can be canceled during dialog mode but multiple change cannot". There is no "dialog mode" in this script. Single changes can be cancelled by no autosaving, then just closing the opened edit window or navigating away from it without saving. And in multi-change mode, HotCat opens an edit window in all cases, so simply not saving cancels the changes.
Lupo 13:23, 3 June 2010 (UTC)
Ah, now I understand. You mean the cancel button in the category editor. There is a slight difference there, indeed. But such a global cancel button would also be quite dangerous; imagine someone making a few changes and then accidentally clicking on that cancel button. So it'd need a dialog "Do you really want to undo all the category changes you've prepared" if there are any changes. And that dialog would need to be configurable (some users might not want it). So, all in all, I don't think implementing this is worth the effort. The user can achieve the same effect by just reloading the page, which is less likely to be done by chance and needs no programming whatsoever. Lupo 14:11, 3 June 2010 (UTC)

Unintelligible ++

Compared to signs + (add category), - (remove category) or ± (change category), which are very intuitive, the function of the symbol ++ is very more difficult to be disclossed. When I tried to click it, i didn't understand what happened and what means the button "save". When I was tried click the "save" button, I didn't discover what was saved. Until I encountered Commons:Village pump#HotCat updated, I didn't find that the updated HotCat.js makes possible to save more changes together. Some tooltip or hoverbox should be added. --ŠJů (talk) 23:22, 27 May 2010 (UTC)

Might an ellipsis (…) be more suggestive of the functionality? I agree, though, that a tooltip is the best way to explain it, regardless of the symbol used. - dcljr (talk) 06:29, 28 May 2010 (UTC)
A tooltip can be added, and by all means, continue to discuss what the best symbol for this might be. The only requirements are that it must be short (in all languages), and that it preferably be language independent. I chose "(++)" on a whim. It was meant to convey "Hey, you can do more than one (+)". Personally, I don't think an ellipsis is any clearer. Lupo 07:57, 28 May 2010 (UTC)
As a personal observation: I didn't know about the HotCat changes, and immediately realised that (++) meant I could add more than one. I think the ellipsis would have been more confusing for me. -- Deadstar (msg) 08:03, 1 June 2010 (UTC)
Thanks! That shows that I was at least not completely off with my choice. Anyway, tooltips are added now. Lupo 09:16, 7 June 2010 (UTC)

I propose to consider these adjustments:

  • the "Save" button should be inactive (grey) until some change is made or if all changes are undone --ŠJů (talk) 14:20, 28 May 2010 (UTC)
    Will see how easily that could be done. Lupo 14:41, 28 May 2010 (UTC)
    ✓ Done in V2.2. You'll need to refresh your browser's cache to get the change, otherwise, it may take up to 30 days until you see it. Lupo 12:56, 31 May 2010 (UTC)
  • some button or link to refuse all prepared changes and stop the ++ mode should be added (cancel and return to the normal mode) --ŠJů (talk) 14:20, 28 May 2010 (UTC)
    What's the benefit of that? Is IMO not worth the trouble to code. Lupo 14:41, 28 May 2010 (UTC)
  • if the user prepared some changes and try to leave the page without saving them, he should be warned that the changes are not saved (if an inexperienced user was tried to click ++, he is maybe not comprehending that he switched the mode and how are consequences) --ŠJů (talk) 14:20, 28 May 2010 (UTC)
    I won't do that. The usability team had lots of complaints about their warning, which furthermore interfered with normal caching. People will learn quickly enough. Lupo 14:41, 28 May 2010 (UTC)
  • because in the ++ mode is the functionality of identical links (+, -, ±) and buttons (OK, Cancel) different from the normal mode, the actual mode should be displayed more markedly than only by presence of the "Save" button. What about to add a whole extra explaining row (a "special mode row") during ++ mode and to move the "Save" button into it? --ŠJů (talk) 13:56, 28 May 2010 (UTC)
    Personally, I don't like that; I like HotCat's minimalistic interface. But let's hear what others might say. Lupo 14:41, 28 May 2010 (UTC)
  • prepared (and not saved yet) changes should be highlighted by colour backround, to distinguish from finished changes as well as unchanged categories. --ŠJů (talk) 14:20, 28 May 2010 (UTC)
    A different background for changes made is a good idea. Once implemented, it'll probably also obviate the need for extra explanation rows or potentially annoying "Do you really want to leave" alerts. (Sorry for answering inline. I've taken the liberty of adding your signature to your points, so that it's still clear who wrote what.) Lupo 14:41, 28 May 2010 (UTC)
    ✓ Done in V2.2. You'll need to refresh your browser's cache to get the change, otherwise, it may take up to 30 days until you see it. Lupo 12:56, 31 May 2010 (UTC)

Templates that generate categories

User:Merlissimo had incorporated in HotCat the possibility to have it remove a template instead of a category. This makes it possible to remove some transcluded categories, too, if own knows which template generates the category.

Currently, the corresponding list in our HotCat is empty.

The mechanism works by listing that category "Foo" is transcluded from a template "{{Bar}}". If the page is in category "Foo", HotCat checks whether the page contains a transclusion of "Bar", and if so, adds the "(–)"-link to the category. When clicked, HotCat removes not "[[Category:Foo]]" from the page, but "{{Bar}}" (or "{{Template:Bar}}").

For which templates and categories might we want to use this feature? Suggestions welcome! Lupo 07:48, 2 June 2010 (UTC)

None? Topical categories shouldn't be assign through templates and if a license template (and category) is removed, another one should be added instead.
Seriously, for some of the maintenance templates it could be helpful, e.g. remove {{rotate}} when rotation isn't really needed (rare though). -- User:Docu at 07:53, 2 June 2010 (UTC)
That was my impression, too, which is why I set the list to empty. But maybe we can find uses for this feature? It'd be mostly a way to quickly remove unneeded maintenance templates. Lupo 08:33, 2 June 2010 (UTC)

This utility should be accessible only for such templates which would be specially signed by some template which allows such way of removing. E. g., a template {{fast removable}} can be created and added into appropriate maintenance templates. HotCat should have be allowed to remove only templates with this labelling. --ŠJů (talk) 17:54, 5 June 2010 (UTC)

That's not necessary. This feature works only for a fixed list of categories/templates, which have to be hard-coded into HotCat. On the commons, that list is currently empty. Lupo 19:02, 6 June 2010 (UTC)


Hi, how could I translate HotCat without making a fork of the code, which will remain outdated? --→ Airon Ĉ 13:14, 3 June 2010 (UTC)

On another wiki? See Help:Gadget-HotCat#Using the Commons version of HotCat on another wiki. If you just want to localize some interface strings to a new language for use here at the Commons, write a new file "MediaWiki:Gadget-HotCat.js/lang", where lang is the desired language code, and localize the texts there. See MediaWiki:Gadget-HotCat.js/de for an example using German. Lupo 13:19, 3 June 2010 (UTC)
I don't know German. How could I find an English localization? It seems that there is not any Italian localization... --→ Airon Ĉ 16:55, 3 June 2010 (UTC)
However, I just started translating some understandable keys there. --→ Airon Ĉ 16:56, 3 June 2010 (UTC)
The English (default) strings are at the beginning of MediaWiki:Gadget-HotCat.js. Lupo 18:01, 3 June 2010 (UTC)
Translated! If there is a problem, please tell me! Thank you! --→ Airon Ĉ 10:02, 6 June 2010 (UTC)
✓ Done and replied at MediaWiki talk:Gadget-HotCat.js/eo. Note that we've since then added a few tooltips, too. Lupo 09:14, 7 June 2010 (UTC)
✓ Done, I hope :) --→ Airon Ĉ 11:31, 7 June 2010 (UTC)

One button for modify, subcategory and parentcat

The three buttons are a bit too much since they all essentially do the same thing which is modifying a certain category. How about combining them in one button maybe just modify with the scroll list instantly appearing?--Diaa abdelmoneim (talk) 19:34, 4 June 2010 (UTC)

Yes, maybe showing the suggestions right away when modifying a category is a good idea. Plus a user config to suppress the display of the up and down arrow links. Lupo 21:40, 4 June 2010 (UTC)
✓ Done. To get the change right away, refresh your browser's cache. For the configuration of the up- and dow-arrow links, see Help:Gadget-HotCat. Lupo 09:01, 7 June 2010 (UTC)

Add hover over text

Would it be possible to have text pop up when one hovers over the buttons that aren't really apparent like multi-edit mode, subcategory and parent category? Maybe just add it to all--Diaa abdelmoneim (talk) 21:52, 4 June 2010 (UTC)

✓ Done. To get the change right away, refresh your browser's cache. Lupo 09:01, 7 June 2010 (UTC)

Putting of a category in itself

When an user is adding or changing categories of a category page, HotCat should not offer to put it in itself. Name of the edited category should be omitted in the combobox whisperer-help. (As example, when I try to put category "Buses by brand" into the category "Buses", the help should not offer to put it into "Buses by brand", when I write "Buses" into the textbox.) Saving of categorization into itself should be blocked (just like putting into category redirect or disambiguation are blocked). --ŠJů (talk) 17:35, 5 June 2010 (UTC)

✓ Done. To get the change right away, refresh your browser's cache. Lupo 09:01, 7 June 2010 (UTC)

Remove notes

Hi, I was adding two categories to the image with notes and all notes was removed. See this diff.--Sevela.p 07:11, 8 June 2010 (UTC)

I cannot reproduce this. What browser, which skin? What other gadgets do you have enabled? Lupo 07:19, 8 June 2010 (UTC)
Ah, now I see what happened. Hmmm.... strange that you didn't get an edit conflict with yourself. I'm onto it. Lupo 07:29, 8 June 2010 (UTC)
✓ Done Is fixed now. Reload your browser's cache; otherwise it may take up to 30 days until you have the correction. The buggy behavior occurred if one added image notes through ImageAnnotator, and then changed categories (without any reload). HotCat does not know about the page modifications from ImageAnnotator, and the MediaWiki software does not generate an edit conflict with oneself, even though HotCat sets the edit timestamps correctly. As a result, the HotCat edit removed the newly added notes. Lupo 08:52, 8 June 2010 (UTC)

HotCat broken

My beloved HotCat is no longer operational (Win XP, IE6). The icons +, - etc are gone too. When I open MediaWiki Gadget-HotCat.js, IE freezes sometimes (or hangs for tens of minutes) and I have to kill it. --Foroa (talk) 18:45, 15 June 2010 (UTC)

Aargh! I hate IE! Sorry about that. It's fixed now. If you reload your browser's cache, it should be fine. (Though I just had problems getting IE6 to actually do the reload. Had to do it several times, manually delete the "temporary internet files", and restart IE6 a few times until it really got the corrected version. Hope you don't have such problems.) Lupo 19:30, 15 June 2010 (UTC)
Thank you very much. It worked immediatly, even without cache clearing. --Foroa (talk) 20:50, 15 June 2010 (UTC)

Just one remark (prompt)

I have been delighted to discover the new functions when I came back a few days ago (When I left there were no up/down arrows, and no summary for 2 or more category edits yet).

So everything is perfect and an enjoyment to use now.

Just one remark: would it be possible to have the typing prompt located at the end of the category name rather than at the end of sort key ?

Present situation: <category name>|<sort key>(prompt)

Proposed change: <category name>(prompt)|<sort key>

Because generally I want to change the category name and I don't need to change the sort key (or I may want to remove the sort key all together).

Changing the sort key into something longer is not something I often do. On the other hand, changing a short category into a longer one is something I often do (example: Category:Zebras into Category:Zebras in zoos).

Teofilo (talk) 09:15, 17 June 2010 (UTC)

Help link

Hi there,

I suggest putting a link to this help page (Help:Gadget-HotCat) at the right side of the Category box. I am often looking for the help page and cant easily find it. The other problem is there are both EN Wikipedia and Commons HotCat pages, these should be reducet to one single "HotCat homepage".--Kozuch (talk) 18:57, 17 June 2010 (UTC)

Well, I can't do anything about what people do over at the English Wikipedia. And anyway, the English Wikipedia is still running the old (pre-V2.0) version of the gadget as adapted by en:User:TheDJ. A help link would be possible, but it's a drag. Both the text and the URL would need to be customizable and localizable. Given that this is a gadget that people have to enable explicitly, I think they can be expected to remember or to bookmark the help page. The entry for HotCat in Special:Gadgets does link to the help page. Lupo 19:37, 17 June 2010 (UTC)

Another request (cancel button)

Sometimes just after clicking (++) I change my mind (because after some thought I find out that I need to change only one category rather than two). So I wish that non-clickable "save" would be a "cancel" button instead. Teofilo (talk) 00:39, 18 June 2010 (UTC)

That would be highly confusing. You click (++) and get a "cancel" button... if you just want to change one category, well, then change only the one you want to change, and then click "save". Lupo 07:02, 18 June 2010 (UTC)
For further thoughts about why a "cancel" button is not such a good idea IMo, see #Cancel button above. Lupo 07:03, 18 June 2010 (UTC)
It is difficult for me to figure out how newcomers would feel, as I am no longer a newcomer with this gadget. So perhaps you are right that it might be confusing. But is a non-clickable "save" very meaningful either ? Anyway I think I will learn quickly to think twice before clicking (++) or press [F5] when I want to cancel. Teofilo (talk) 07:50, 18 June 2010 (UTC)
Having both a [++on/++off] switch button and a [Save] button might be the least confusing solution, if people don't mind losing a little screen space for one more button. Teofilo (talk) 07:59, 18 June 2010 (UTC)

I have made a finding :

Clicking on (++) first and adding/removing/editing categories afterwards is perhaps not a good procedure.

At least for me, the best procedure seems to be :

1) add/edit one category box first
2) answer the question : "do you need to add/remove/edit a second category ?
If the answer is "yes" then : 3a) click (++)
If the answer is "no" then : 3b) click [OK]

So that there is no "changing my mind" problem any more. Teofilo (talk) 12:15, 19 June 2010 (UTC)

For clarity's sake it might be better to find another name for the [OK] button when the (++) mode is on. For example instead of [OK] you might call it [Prepare] (meaning you are preparing the edit, but the edit will not be saved until you click on [Save]). Another possibility would be to keep the [OK] word, but change the button color, to increase the awareness that the "OK" button is not performing the same task in simple mode and (++) mode. Or the other way round: another - perhaps more simple - possibility would be to use [Save] instead of [OK] in simple mode, and keep the [OK] wording only for the (++) mode. Teofilo (talk) 12:54, 19 June 2010 (UTC)

The last one is a good idea. "Save"/"Cancel" in simple mode; "OK"/"Cancel" in multi-mode.
Note that if you want to modify several categories and want to start you modification by removing one, you must click (++) first, otherwise the removal will be executed right away. Lupo 15:29, 19 June 2010 (UTC)
Yes I thought about that too (that's why I did not request to put the (++) button in non-clickable mode during the start). Perhaps this talk would have been easier to understand if I had explained why "changing one's mind" is something that happens. Sometimes my first idea, for example when I see a building picture mentioned to be located in "Small Town, Oregon" is that I need 2 categories : "Buildings in Oregon" and "Small Town, Oregon". But after I type the first one, I might discover that more detailed categories do exist for that state if I explore the child categories with the (↓) button, and I may well discover that a category called "Buildings in Small Town, Oregon" is available, so that I need to insert the file into only that category. Teofilo (talk) 15:28, 21 June 2010 (UTC)

Ideas for further improvements in the future

In the future we can imagine the following :

  • sortkey finding tool for "by something" categories

When you are inserting a subcategory into parent category "<something> by country", and you start typing the sort key (a country name), the software could provide the country list. If you type "something by country|P..." the list would be :

Papua New Guinea
Puerto Rico

The same sort of things could apply for other widely used "by something" categorizing schemes.

  • {{PAGENAME}} copypaste tool.

Often the category into which you insert a file or a subcategory has a name whose spelling is very close to {{PAGENAME}}. For example [[:File:Ciconia nigra in Kruger National Park, 2010-06-19.jpg]] needs to be categorized into category:Ciconia nigra and category:Kruger National Park. It is a pity that you need to type "Ciconia nigra" again. A tool copy-pasting {{PAGENAME}} into the box would be most welcome. Even better would be an option to select any full word from {{PAGENAME}} (Ciconia, Nigra, Kruger, National, Park) and copy-paste it into the box.

Teofilo (talk) 10:40, 19 June 2010 (UTC)

That could be further enhanced by providing also word duets, and triplets, so the full list on display for the example above would be:

Ciconia nigra
Ciconia nigra in
nigra in
nigra in Kruger
in Kruger
in Kruger National
Kruger National
Kruger National Park
National Park
National Park, 2010-06-19
Park, 2010-06-19

From this list, it is possible to find matches with existing categories : Category:Kruger National Park and Category:Ciconia nigra. Teofilo (talk) 12:33, 19 June 2010 (UTC)

What's so difficult about selecting the relevant excerpt from the page title manually and pasting it into the input box of HotCat? I don't quite understand why something would need to be programmed for this; especially since any algorithmic tuple selection would produce many nonsense tuples. Lupo 15:32, 19 June 2010 (UTC)
Copy-pasting with the mouse and especially moving one's hands from the keyboard to the mouse and back from the mouse to the keyboard are gestures which should be limited to the smallest possible minimum if one wants to take en:ergonomics into account. Ideally, repetitive tasks should be keyboard-only (or mouse-only).

Nonsense stuff is harmful only to the extent that it consumes screen space. Nonsensical combinations are truly unnecessary, but not more unnecessary than the many proposals that come from the alphabetical lists in the present tool. If I begin to type "Inuktikut" (for example for the purpose of categorizing an audio file), the first alphabetical proposal after I type "Inuk" is "Inukai Tsuyoshi" (the name of a Japanese politician) which is unnecessary for my needs concerning Alaskan linguistics. A lot of unnecessary stuff comes up in the present tool already. Another possibility if what I said above is not convincing enough, would be to show only the matches.

A match finding tool could also try to find matches from the |description= field of the information template. But this idea might be an idea for a different tool or for a bot (if much computing power is needed). Teofilo (talk) 15:02, 21 June 2010 (UTC)
There's two different proposals here:
  • Provide suggestions for the sort key: where should such suggestions come from? I can't think of a sensible query that would yield meaningful suggestions. Consider a file description page, possibly with a creator template. Basing the suggestions on either the file name or the author is not trivial, and even if we'd restrict this to the author, it's far from trivial to automatically generate sensible proposals. Just try figuring out the "last name"... and even if you could do that, how would the script know that for instance "Björn Gunnlaugsson" should result in the sort key "Björn Gunnlaugsson", not "Gunnlaugsson, Björn"? No thanks... Furthermore, how should the gadget know when to display suggestions for category names and when to display suggestions for the sort key? Fiddling around with the text cursor position in the input box is not possible; I'm not sure I could make the script detect text cursor position changes reliably.
  • Provide initial category proposals (presumably only for adding a new category when the input box is empty) based on the file name of the page being edited. Would need some at least halfway sensible suggestion generator that works in all languages because HotCat is also used at other wikis; for instance at the de-Wikiversity, the cs-Wikipedia, and the zh-Wikipedia. These other wikis may have different templates, so relying on Creator entries or {{Information}} templates might not work. Such templates may also not be present at all (even here at the Commons) on non-file pages. Such a suggestion generator should also provide sensible suggestions in non-file namespaces. And here at the Commons, it should ideally pluralize the suggestions, which is not trivial, while at other wikis, that may or may not be appropriate. So, this would be a lot of work to do properly, and be very difficult to get right for all languages. (BTW, your "Inuk" example has "Inuktitut syllabics" as the fourth entry in the suggestion list. Interestingly, we presently don't have a Category:Inuktitut, but a Category:Inuit language, and Inuktikut is a redirect to Inuktitut :-)
Your proposals are certainly interesting, and I'm not trying to "shoot them down", but I think it's worth pointing out the conceptual and technical difficulties behind these seemingly "straight-forward" ideas. Lupo 11:39, 22 June 2010 (UTC)
Apart from making detailed suggestions focused on this specific gadget, let's face the fact that 50% of categorizing jobs (on Commons - I have no idea of the needs on other wikis) consist in rearranging keywords already written somewhere on the page. It is a bit of a waste to use human brains and human time for this. In the future robot will do these 50% most simple categorizing tasks, and leave the more complicated cases to human beings. Teofilo (talk) 11:57, 22 June 2010 (UTC)

HotCat on steroids

All right. We have a number of longstanding feature requests, among them

  • Allow multiple category changes
  • Allow changing of hidden categories
  • Only allow changing categories that really are on the page, but don't allow it for transcluded categories
  • Do not autocomplete when the last input was a deletion (DEL or Backspace)
  • Let users choose the suggestion engine. (Opensearch, as it is now, shows categories starting with similar characters, but since it uses the search index, which is updated only at intervals, it may miss recently created categories in the suggestions. Some people would prefer to use the page list, which is strictly alphabetical, but is up-to-date.)

I have previously held back on doing anything about these issues for different reasons. Some of these would require a complete rewrite of the gadget, and I had hoped that the AjaxCategories feature developed in the core would take care of them. But that experimental feature seems to have stalled, isn't deployed anyway, is limited to jQuery-based skins (i.e., currently vector only), and doesn't do half of what HotCat does now. (AjaxCategories current state, bugzilla entry.) Therefore, I sat down and actually did the full rewrite of HotCat that solves all these issues.

I invite all interested people to beta-test the new HotCat. See User talk:Lupo/c.js for what it does, and for what to do to beta-test it. Please report any bugs you might find or any improvement suggestions there.

If no serious problems surface, we'll replace the current HotCat with that new version.

Lupo 06:45, 5 May 2010 (UTC)

I will give it a try. Thank you --Jarekt (talk) 13:25, 5 May 2010 (UTC)
I tried "multiple category change" feature on a few files and it worked fine except for auto-save. After pressing save button on the bottom of the page the process upened edit window and I had to press ave again. Is there a way to remove that step. --Jarekt (talk) 21:10, 5 May 2010 (UTC)
No. Please see User talk:Lupo/c.js. It's on purpose. Lupo 21:26, 5 May 2010 (UTC)
Hey Lupo. In Multimedia Usability we are going in a completely different direction (as usual, trying to make it more newbie-friendly.). Right now I am trying to bang something together that Guillom can present at Wikimania. I don't want to lose the knowledge you've acquired about how expert users use Categories, but at the same time our feeling is that the default interface right now is too complicated. The up and down arrows are probably particularly baffling to new users. I'll shoot you an email (and update this space) when my category-adder is ready. NeilK (talk) 21:43, 6 July 2010 (UTC)
New users will first have to figure out how to enable the gadget before they see anything. By the time they have figured that one out, they probably have already figured out what subcategories and parent categories are. If not, they'll learn quickly enough once they start categorizing things. And if someone really doesn't want these arrows, he or she can configure the gadget to not show them. See Help:Gadget-HotCat#User configuration.
HotCat is not intended for novices, but anyway: the key to tools useful for both experts and novices is configuration. For instance, it may be fine to ask a novice "do you really want to do this" before doing it, but experienced users must have a way of turning such annoyances off. Or to switch on extra features.
Also, whatever you're doing in this area, make sure it does not degrade the user experience of experienced users. Lupo 11:27, 7 July 2010 (UTC)
Personally I sometimes use Commons Commander (CC) as an alternate tool. It might be worth fixing some of its bugs and expanding it.  Docu  at 13:36, 7 July 2010 (UTC)
How about enabling a simplified version on default, for every user & IP, and make the gadget the current, extended version. I think a lot of new users have problems adding categories & I can seem any harm in enabling a simple version for them--DieBuche (talk) 13:48, 7 July 2010 (UTC)

Small prompt problem (again)

Do you remember that little work-around you mentioned (Work-around: type ← once, then → five times) at User talk:Lupo/c.js. At that time I think I remember trying it and that it was OK. Right now I am trying to type "Architectural elements by country". After I have typed "Architectural e", "Architectural element drawings" comes up and after I type ← the prompt is located at "Architectural element drawing(prompt)s" instead of "Architectural (prompt)element drawings" as expected. So I am using "[Ctrl] ←" to move left, but it might be good to investigate why the prompt is not located as expected, because in some instances, it might be useful to use the keys as you mentioned. Teofilo (talk) 16:21, 21 June 2010 (UTC)

Strange. Thanks for the report, I hadn't noticed this. I'll investigate... Lupo 16:58, 21 June 2010 (UTC)
Very strange. It still works like this in IE6/Win, Opera 9.5/Win, and FF3.something/Mac(OS 10.6) -- don't remember off-hand what FF version I have on the Mac. It no longer works like this in FF3.6.3/Win, FF3.6.4/Win also places the cursor at one character off the end of the selection. But even with a May 4 version of HotCat (I originally made that comment on May 4) it doesn't work like this in FF3.6.3/Win. I know I've updated FF on my Windows box from 3.5.something to 3.6.3 since May 4, so I must assume that the behavior has changed in Firefox/Win. Lupo 21:28, 26 June 2010 (UTC)

Request: smaller (+) (-) etc links

See also wikt:Wiktionary:Grease pit#Hotcat display tweak request.

Would it be possible to wrap the (+), (±), etc links on the category bar into a separate <span class> so that it will be possible for users to tweak the display of them in their monobook.css? Personally I think they're too big and detract from the actual categories, so I'd like to make them suprtscript or a smaller font or something, but those with poorer eyesight than me might not want this. wikt:user:Internoob suggested the span class idea and that I ask for it here. Thanks, Thryduulf (talk) 22:33, 10 July 2010 (UTC)

✓ Done The class name is "hotcatlink" and is applied to the span encapsulating all the links. To reduce the link size, you can use the following CSS:
.hotcatlink {
  font-size: 80%; /* Or some other value */
HTH, Lupo 10:17, 12 July 2010 (UTC)
thank you very much. Thryduulf (talk) 17:12, 12 July 2010 (UTC)

Cat sort keys

I removed sort keys when replacing categories, but HotCat don't really deleted them so I got to do a normal edit to get rid of them. Example here. Not a major problem but needs be documented at least. --Foroa (talk) 13:15, 23 July 2010 (UTC)

Can't reproduce; works for me [3]. Please read Help:Gadget-HotCat#Sort keys. The trick is to leave the trailing bar. Lupo 15:58, 23 July 2010 (UTC)

Two other ideas

Two other ideas:

  • [Esc] key. Perhaps it could be nice to have the [Esc] key as an alternative to pushing the "Cancel" button.
  • The "(↓)" down arrow link could be displayed in a different color (red?) and remain non-clickable when there is nothing to see there (when the mentioned category is childless). (Or clicking it as a red link could mean access another "create subcategories-from-scratch" tool or extension). Teofilo (talk) 15:02, 21 June 2010 (UTC)
The ESC-key can surely be done. Currently it is used to revert an changes in the input box back to the last real user input. (For instance, when you enter "HE", then use the down arrow cursor key until you're on "Helicopters" in the suggestion list, the text box also contains "Helicopters". Now hit ESC, and the textbox should be reset to "HE".) It is possible, though, to program the ESC-key it such that it cancels the whole editor if there is nothing to revert. (Already done in my private development version, but I'll have to test that on more browsers before deploying it in the normal version.)
The second part is a bit too difficult and/or expensive. The gadget would need to make yet another API call just to figure out whether a given category does have subcategories at all just to display the "(↓)" differently (or not at all). And if we wanted the same for ""(↑)", too, that'd be again another API call. That's a bit too much for too little.
Or would it help if the mediawiki developpers created a {{SUBCATEGORIESINCATEGORY:categoryname}} magic word similar to {{PAGESINCATEGORY:categoryname}} so that you can test if that magic word is 0 or more than 0 ? Or anything similar which would be more suitable for javascript uses ? Concerning [Esc] I was not aware of the use you mention. I will have to try it. Teofilo (talk) 12:13, 22 June 2010 (UTC). Or if the [Esc] is already used, let's use [shift]+[Esc] or anything else for a different use. Teofilo (talk) 13:26, 22 June 2010 (UTC)
No, that wouldn't help. First, even with such a magic word, HotCat would still need to make an API call to get that magic word evaluated, and second, it's unlikely to be implemented because all that subcategory stuff is very inefficient on the server due to misaligned data representations; see bugzilla:23682.
On the ESC issue: there's no need to use shift-ESC instead, I think. Plain ESC should work OK; just if the first ESC reverts to the last real user input, one would need to hit ESC a second time to cancel the whole editor. Personally, I find that acceptable and—from my own first tests with this—quite consistent, actually. Lupo 13:44, 22 June 2010 (UTC)

A few more keyboard suggestions:

  • [Alt]+[shift]+[S] as an alternative to pressing [Save] button ? Teofilo (talk) 12:13, 22 June 2010 (UTC)
  • Numeric pad for drop-down list navigation, [1] meaning first item at the top, [2] the one below, [3], [4] etc... Teofilo (talk) 12:13, 22 June 2010 (UTC)
  • [Alt]+[shift]+[+] as an alternative to pressing "(+)". Teofilo (talk) 13:26, 22 June 2010 (UTC)[Alt]+[shift]+[P] or [Alt]+[shift]+[=] would be better at least for my computer. Teofilo (talk) 15:20, 22 June 2010 (UTC)
Numeric keypad: I think if you use the cursor keys on the numeric keypad on a PC (possibly after switching off "num lock"...), they should already work like the standard cursor keys. I won't do numeric input. First, it gets really hairy when you go beyond single digits. Second, what if the user actually wants to input the "2" in "Foobar2000" and uses the numeric keypad to do so? It'd be very strange if that selected the second entry in the suggestion list instead (if there are at least two suggestions). Forcing the user to move the focus from the input box to the suggestion list before doing this numeric input might alleviate this latter problem, but then you're just as quick using the arrow keys. Lupo 13:44, 22 June 2010 (UTC)
Yes I was forgetting something concerning when the user wants to really type "2" as his text input. This use of number keys is the standard one in Japanese word processors where you may select your choice with numbers. The focus is switched from the input box to the drop-down menu by using the [Spacebar] key (which is available because there are no spaces between words in Japanese). To avoid things getting hairy, it could be implemented only when the number of choices is less than 9. With my Japanese word processor, I can never see more than 9 items at a time, and I can use page down to add 9, so that if I want to select number 23, I type page down 3 times (that will take me to 28=1+3*9) and then press [4]. I have uploaded a screenshot so that you can see how it looks like. Teofilo (talk) 15:20, 22 June 2010 (UTC)
An interesting application, but I would think most Commons users would be totally unfamiliar with such a method. Also note that currently, even if you move the focus manually to the suggestion list, it is re-set to the text input box if you type an up or down arrow. This permits the user to quickly amend/overwrite the selected entry by just typing without having to navigate the focus manually back to the text box. If some input mechanism similar to the one in that word processor were implemented, the focus would need to remain on the list, which IMO would make using it actually less comfortable.
One could, however, implement the PageUp/PageDown/Home/End keys for the suggestion list. PageUp/Down would jump by ±5 (the maximum height of the suggestion list), Home/End would jump to the top/bottom of the list. But I'll first have to check whether Home/End don't already have a meaning for input boxes. On FF, it appears they don't, but I'd have to check other browsers, too. (I could imagine that some browsers overload these keys to move the text cursor to the beginning/end of the single input line. If so, redefining them to do stuff with the suggestion list might startle users used to the "normal" behavior.) Lupo 15:47, 22 June 2010 (UTC)
Page up/down done. Should work after you have reloaded your browser's cache. Lupo 08:50, 9 August 2010 (UTC)

Category redirects

If a category redirect name is chosen as a new or as changed, the name is automatically replaced by the redirected name. That's right and very helpful. But until recently, this function was available also if a category field is open to edit (±) and consequently approved by "OK" without any change. Now, such categories are not corrected. I think, if the button OK is clicked without any change, the algorithm should verify if the category isn't a redirect or a dissambiguation just like as if some new category is chosen. If somebody have some exceptional reason to keep the original category, he may use "x" to abandon the correction. --ŠJů (talk) 14:12, 22 June 2010 (UTC)

Right. That can be re-enabled. Lupo 15:48, 22 June 2010 (UTC)
✓ Done Lupo 08:48, 9 August 2010 (UTC)

Category description?

This new HotCat is an excellent gadget. Thanx very much. A feature to show a category description in the users language (if it exists) or the name (or the intro) of a interwikilinked wikipedia article in the users language, would be helpful for non-en-users. In some cases of ambigous category names the en category description, would be helpful for all users. --Diwas (talk) 12:43, 23 July 2010 (UTC)

Idem dito. Maybe hovering over the interwiki could show the first "main" paragraph of the concerned article. Note that texts in categories are needed if one wants them searcheable (interwiki's are not integrated in the search database keywords).--Foroa (talk) 13:15, 23 July 2010 (UTC)
Will look into this in a few weeks. Lupo 15:59, 23 July 2010 (UTC)
All right, let's do some brainstorming here.
  1. What exactly are you talking about? Hovering over a category link in the category bar (i.e., category editor not open for that link), or are you talking about hovering over a category name in the suggestion list? I don't even know off-hand how simple or complicated it would be to detect hovering over a particular suggestion list entry.
  2. Showing the first paragraph from an interwikied wikipedia article (in the users language or in English) is interesting, but I'm not sure yet it's doable reasonably simple. That would be a two-step or even three-step process: first get the wikitext or the html of the category from, then extract the interwiki links, and then, if there is an interwiki link to a wikipedia of the user's language, get section zero of that article from (which would again need some trickery to bypass the single-origin policy of JavaScript since "" is not the same domain as ""). That means two asynchronous calls to two different servers, and after the last step, the script would even have to check if the mouse cursor is still hovering over the same link and not display the popup if the mouse cursor moved elsewhere in the meantime.
  3. Just showing the category description itself (i.e., the text on the category page itself) is easier, since that would be only a single API call to However, reliably extracting only the description in the users language is probably not doable, unless the category description uses {{LangSwitch}} (which would automatically only display the correct language, if present). But it's still fragile. Unfortunately, we have no unified way to do multi-lingual category descriptions; besides {{LangSwitch}}, there may be other mechanisms used (such as just enumerating the languages one after the other: a line using {{en}}, a line using {{de}}, and so on; or just giving the descriptions without any language marker, or using {{mld}}, which relies on JavaScript support itself).
I'm open to suggestions... Lupo 08:56, 16 August 2010 (UTC)


Looks like this is the bug fixed earlier. At least, I couldn't reproduce it.  Docu  at 17:35, 27 July 2010 (UTC)

I don't know what this refers to, but yes, that was fixed already in the old HotCat (pre-V2) on January 31, 2010. Lupo 08:35, 16 August 2010 (UTC)

Disappearing (−) (±)

Every time right after I add a category and then try to change it the "(−) (±)" is missing from that category link (not the others). It's annoying to do it manually right after you make a mistake or find a better category or changed your mind. Rocket000 (talk) 00:11, 30 July 2010 (UTC)

I've only noticed it as the righthandmost category +- disappearing, and hadn't noticed it in connection with adding cats. -mattbuck (Talk) 00:53, 30 July 2010 (UTC)
I also have the same rather inconvenient problem. --Santosga (talk) 11:01, 31 July 2010 (UTC)
In the mean time, refreshing the page makes them come back (you don't have to clear you cache). Rocket000 (talk) 21:03, 31 July 2010 (UTC)

Another thing, what is the purpose of the (++) right after the "Category"/"Categories" link? Rocket000 (talk) 21:06, 31 July 2010 (UTC)

rtfm Help:Gadget-HotCat#Making more than one category change by one edit. (A special case of using this is to go step by step through the category hierarchy without saving every single step.) --Diwas (talk) 22:27, 1 August 2010 (UTC)
Thanks. I always used the (+) at the end instead (or just start making my changes while the first input box is still open). Seems a little redundant. Rocket000 (talk) 03:02, 3 August 2010 (UTC)
  • ✓ Done The problem was that for an API call, either the server or the browser cache returned a cached page revision that wasn't the current page revision but an earlier one. This has been fixed now; should work as expected now after reloading your browser's cache. Lupo 08:48, 9 August 2010 (UTC)
Thank you (as always). Rocket000 (talk) 18:07, 11 August 2010 (UTC)

Downward arrow - redir?

this looks ok except that there is no redirect from the selected category to the one it added.

I got to the selected category by using the downward arrow from the first category. When trying to reproduce it, I noticed that the selected category gets replaced by the list of subcategories and the first happens to be the one that is being added. One has to delete part of the name to add the correct one.  Docu  at 09:45, 15 August 2010 (UTC)

Well, that's the autocompletion. I'll disable this for sub/parent categories. However, no matter what I try, I cannot reproduce this with the "redirect resolved" summary; I simply get the normal summary "removed Category:Lakes by country; added Category:Lakes of Germany by name using HotCat". Lupo 08:20, 16 August 2010 (UTC)
✓ Done. Should be fine now after reloading your browser's cache. Lupo 08:31, 16 August 2010 (UTC)


I just upgraded the Dutch version of HotCat to the current Commons version and re-added searching for interwikis in find_insertionpoint(). It uses an SJAX call to the API to obtain the interwikimap. The major drawback is that that map does not only include language links, so the method for finding interwikis is not completely foolproof. It should work for most languages though. The code is available at w:nl:MediaWiki:Gadget-HotCat.js. --Erwin (talk) 12:57, 8 August 2010 (UTC)

Hm. You could avoid making an extra (synchronous!) call by merging getting the interwiki map into the call made in getPage(), with appropriate handling in setPage(). Lupo 09:02, 9 August 2010 (UTC)
I just looked into that, but the getPage function isn't called when editing an article. Though I could similarly make a script element with a callback function to get the interwikis while still allowing for a timeout fallback function. How do you feel about that? --Erwin (talk) 18:03, 11 August 2010 (UTC)
Ah, right, we may be on the edit page at that moment. Hmm... Lupo 06:40, 12 August 2010 (UTC)
Ok, how about this: don't get the interlanguage links from the interwiki map at all, but simply assume that any link "[[foo:bar]]" where "foo" is not a valid namespace is an interlanguage link. Use wgNamespaceIds and/or wgFormattedNamespaces to figure out valid namespace names. That would avoid any API call for this. Possibly constrain it to apply only to links at the end of the wikitext. Lupo 07:08, 12 August 2010 (UTC)
Hmm.. I'm afraid that would cause many false positives as that would include Main namespace:Links and all interwikis like tools:Example (m:Interwiki map). Of course, I could search for ^[[foo:bar]]$ at the end of the article, but instead I looked into a get/setPage analogy, see tools:~erwin85/test.js. --Erwin (talk) 14:48, 15 August 2010 (UTC)
And how about getting the set of prefixes through a langlinks query on the page being edited? Lupo 16:00, 19 August 2010 (UTC)

New translation text

{{editprotected}} I made Japanese translation text (User:Was a bee/vector.js/ja.js). This is for Japanese language, so MediaWiki:Gadget-HotCat.js/ja is the place to be set. I already tested this code at my skin (User:Was_a_bee/vector.js). This works well. Thank you^_^ --Was a bee (talk) 11:57, 26 August 2010 (UTC)

I set HotCat.fixed_search as true. This is simply 3 searches makes confusion. Japanese language does not have upper or lower case. So almost ordinary Japanese may be not able to understand the difference between these 3 searches. --Was a bee (talk) 13:40, 29 August 2010 (UTC)
But English does have upper and lower case, and unless policy has changed recently, categories at the Commons should be in English. I've installed your translations at MediaWiki:Gadget-HotCat.js/ja, but without setting fixed_search. Lupo 20:27, 29 August 2010 (UTC)
Thank you Lupo. About configuration, my explanation was not good. Category names should be in English. What I wanted to say is that "combined search" works very well and provides enough functionality. In contrast, search-engine selector makes something confusional or anxious feeling for non-alphabetical language speaker (Japanese, and maybe Chinese, Korean etc). Because many of them do not know "case sensitivity".
I tested other way([4][5]). If tool-tips are shown on the search-engine list, I think it is very helpful. --Was a bee (talk) 11:58, 30 August 2010 (UTC)

Auto-save multiple changes

I now see the usefulness of the (++) (as I question above, before I ever needed to use it). One thing though, is there any way we can have the "Save" button really mean save? As a user configuration option? If that sounds dangerous, maybe restrict it to admins. The default button text should probably say something like "Preview" instead (or "Apply") since it doesn't "Save" anything. Rocket000 (talk) 22:37, 1 September 2010 (UTC)

An auto-save option would be useful. Docu  at 06:16, 7 September 2010 (UTC)
I consider this too risky. Despite my best efforts to get everything right, there may still be cases where the replacements may go slightly wrong. (In particular if getting the wikitext of the page takes longer than four seconds, and the script thus does not know which categories really are on the page and which are transcluded.) If several changes are made, I want people to quickly verify that everything is OK before committing the change. Lupo 07:24, 7 September 2010 (UTC)

Category search: "in" matching "of"

For users typing "Sunsets in Russia", it would be somewhat helpful if that could match "Sunsets of Russia". Many of Commons' choices between "in" and "of" aren't easily understood and they are currently an obstacle in finding the correct category.  Docu  at 06:16, 7 September 2010 (UTC)

There's not really a way to do that. You'd have to have a way to tell the server side search engines that "in" should be treated like "of". We don't have a wildcard or regular expression search for categories, so the script can't search for e.g. for "Foo (in|of) Whatever". Lupo 07:17, 7 September 2010 (UTC)
Maybe requesting results for "Foo in " at the same time as "Foo of " and then presenting them together might work?  Docu  at 10:27, 7 September 2010 (UTC)
Since both opensearch and the page list allow only one search parameter, that would mean making two calls, one for "Foo in" and a second one for "Foo of". And since the default "combined" search engine already queries both opensearch and the page list, that'd mean four remote calls to the server to get the suggestion list. That's a bit much. Lupo 11:04, 7 September 2010 (UTC)


Is there a way that I could use the importScript() function on wikt:MediaWiki:Gadget-HotCat.js to import this commons script and still set HotCat.isCommonsVersion and HotCat.capitalizePageNames to false? Is that a good idea? It would be more efficient if all the changes could be made in only one place. —Internoob (Talk · Cont. · Wikt) 18:59, 31 August 2010 (UTC)

There is. Please see Help:Gadget-HotCat#Using the Commons version of HotCat on another wiki for how to hotlink the Commons version and still use your own configuration. If you use the Commons version, you should not set HotCat.isCommonsVersion to false. Leave it set to true. Setting HotCat.capitalizePageNames explicitly is OK, but the script tries to configure it correctly anyway according to your wiki's global settings. Lupo 20:47, 31 August 2010 (UTC)
That didn't work. I made this and this but still it didn't capitalize did capitalize (sorry) the page names. In fact, after purging the cache, it stopped working completely. Possibly a cache problem? —Internoob (Talk · Cont. · Wikt) 21:27, 1 September 2010 (UTC)
Possibly. Works for me in both vector and monobook (I don't have the gadget activated but load it in my wiktionary:User:Lupo/monobook.js and wiktionary:User:Lupo/vector.js directly from the Commons). Loads your /local_defaults, and doesn't capitalize (type a lower-case "f"). Lupo 12:41, 4 September 2010 (UTC)
I tested again with the same arrangement and doing everything I could think of to clear my cache, and can confirm that it still capitalizes the categories on save, but not before strangely. So when I type in the box "fr:Occupations", it doesn't change it until it saves, when it goes "Fr:Occupations" as here. —Internoob (Talk · Cont. · Wikt) 18:47, 5 September 2010 (UTC)
Ah, a single category change. Indeed there was a bug there. Fixed now. Lupo 07:47, 6 September 2010 (UTC)
Thanks! —Internoob (Talk · Cont. · Wikt) 21:28, 7 September 2010 (UTC)

Additional localization

Could somebody create MediaWiki:Gadget-HotCat.js/pt based on w:pt:MediaWiki:Gadget-HotCat.js/local defaults?

The same translation can be used for /pt-br.

Thanks! Helder 01:32, 15 September 2010 (UTC)

✓ Done. Lupo 11:47, 15 September 2010 (UTC)
What about creating MediaWiki:Gadget-HotCat.js/frr based on w:frr:MediaWiki:Gadget-HotCat.js/local defaults? Helder 12:12, 15 September 2010 (UTC)
No, there's nothing there that would warrant importing. They redefine the edit summaries, which is OK for their wiki, but here at the commons, the summaries should always be in English. (Edit summaries are for the benefit of others, and thus should not be in the user's interface language, but in the main content language of the wiki.) And since they don't define any of the user interface texts (labels etc.), there's nothing to import. Besides, their setup is botched: they hotlink the Commons HotCat, but then tell it it wasn't the Commons version by setting isCommonsVersion to false. That may have unintended side-effects. One should set HotCat.isCommonsVersion to false only if one copies HotCat to the other Wiki. Lupo 14:29, 15 September 2010 (UTC)
Oh, but I just saw that I could import w:frr:MediaWiki:Gadget-HotCat.js/frr for the user interface texts... will do so in a moment. Lupo 14:36, 15 September 2010 (UTC)
And ✓ Done, too. Also left them messages about their setup. Lupo 14:57, 15 September 2010 (UTC)
Thanks again! =)

Browsing subcategories of large category

I've been transferring some images from Category:Pearl Harbor into the subcategory Category:USS Arizona Memorial. Using HotCat, when I click the down arrow on Pearl Harbor, USS Arizona Memorial isn't listed. Category:Pearl Harbor at the moment has 8 subcategories and 2,150 files, when I press the down arrow only the subcategories that appear with the first 200 files are listed. Benchill (talk) 01:40, 26 September 2010 (UTC)

Please see Help:Gadget-HotCat#Search engines, the note at the end of that section. Seems to be related to server-side problems with generating the list of subcategories. Lupo 07:31, 27 September 2010 (UTC)


This edit i was not able to do with HotCat, it is probably because old category was named "%C3%85land" instead of "Åland". --Smooth_O (talk) 12:28, 27 September 2010 (UTC)

Is this really a "problem"? Does this strange case (having URI-encoded category names in the wikitext) occur frequently enough such that extra code and coding effort to handle this would be worthwhile? Somehow, I doubt it. Lupo 15:17, 27 September 2010 (UTC)
OK, i just noticed it and report it here. Similar thing here: File:Кайо Дуилио.jpg, but off course it's not a big problem. --Smooth_O (talk) 10:23, 28 September 2010 (UTC)
On that file, the wikitext has two blanks between the Russian words, which apparently get folded into one in the displayed category and its link. Hm. The things we have in our wikitext... I'll think about how to best deal with such edge cases. Lupo 12:57, 28 September 2010 (UTC)

Some part of localization does not work (Hotlink)

Yes check.svg Resolved

Hi. Firstly I want to say thank you for great maintenance contribution. By the way, In jawp, process of introducing HotCat as Gadget with hotlink is ongoing(here). In that process, we realized one bug. Interface localization sometimes does not work. This happens frequently especially in Chrome. In FF and IE sometimes. It is sometimes whole interface, but mainly in "HotCat.engine_names". I checked with Google Chrome's JS console. As far as I checked, "importScript"(line.187) works only after "getPage" has end (line.2312). I see that situation is same in zhwp also.

Do you have any idea to avoid this? --Was a bee (talk) 04:35, 9 October 2010 (UTC)

Sorry, wait little please. Things seems gets well.... I don't know why. But it gets well on my enviroment with 5 different browsers (FF, IE, Chrome, Opera, Safari/XP). I am waiting reports from other users on jawp. --Was a bee (talk) 08:46, 11 October 2010 (UTC)
  • Hello. Sorry for this wired report. We have successfully implemented HotCat as gadget in JAWP yesterday. Thank you for your patience. :D --Was a bee (talk) 06:29, 14 October 2010 (UTC)

Some suggestions

He Lupo, I'm making the following suggestions (diff) for changes. This will make it easier to replace the current version of en.wp HotCat, without too much loss of functionality. Highlights:

  • Option to import languages from Commons
  • Option do disable HotCat on the upload form
  • Make Help page link configurable

With these changes, I think we can directly use HotCat from Commons on the English Wikipedia. TheDJ (talk) 15:15, 29 October 2010 (UTC)

Looks good, except for the stuff at line 192: that's en-WP specific. If we incorporate the rest, and en-WP hotlinks, why can't en-WP then put this stuff in their /local-defaults file?
Also, I think we should do $-replacement on HotCat.messages.prefix, too.
Lupo 15:26, 29 October 2010 (UTC)
Yeah, that stuff is intended for /local-defaults later. TheDJ (talk) 17:48, 29 October 2010 (UTC)
Good point about prefix btw. Do you see a better when then using separate functions for that step ? The load order of the prefs is really killing any other option I think... TheDJ (talk) 17:50, 29 October 2010 (UTC)
Function is fine, I think. And yeah, we can't do it too early. But wait... on second thought, I see that this new help_page is even user-configurable, through window.hotcat_help_page and JSConfig. Isn't that overkill? Do we really need this? Why can't en-WP just set messages.prefix and messages.using appropriately? messages.prefix = "" and messages.using = "using [[WP:HC|HotCat]]"? Just redefine these two in /local-defaults... Per-site configuration of stuff in edit summaries should be good enough, I think. Lupo 18:17, 29 October 2010 (UTC)
However, there's a problem with HotCat.external_translations which you introduced. This configuration setting cannot be put into /local-defaults because at the point it's used, that file may not yet have loaded. Any idea how we could solve that? Lupo 13:19, 30 October 2010 (UTC)
  • ✓ Done changes. I omitted help_page (see above), and the user configurability for what I think should be site-wide configurations (upload_disabled and translations_from_commons). Description is here. See here for how I included it at en-WP (for myself, for the time being). I've already written en:MediaWiki:Gadget-HotCat.js/local defaults. Adapt as needed. Lupo 10:21, 31 October 2010 (UTC)

Vertical bar stays

When i did this change with HotCat, it didn't remove vertical bar for sorting, although i removed it while typing. --Smooth_O (talk) 12:41, 6 January 2011 (UTC)

Sort keys are handled by HotCat as follows:
  • If no sort key is given (Input "Documents of Bulgaria"), an existing sort key, if any, is left unchanged.
  • If a sort key is given (Input "Documents of Bulgaria|Sortkey"), the given sort key is used.
  • To remove an existing sortkey, completely remove the sort key, but leave the vertical bar: "Documents of Bulgaria|".
This is described at Help:Gadget-HotCat#Sort keys.
The category you changed did have a sort key: it read "Bulgaria| ", which specifies a blank as the sort key. When you changed the input to "Documents of Bulgaria", this sort key remained unchanged. Lupo 13:01, 6 January 2011 (UTC)
Ok, thanks. --Smooth_O (talk) 13:12, 6 January 2011 (UTC)

Localization problem

Due to specificities of Hungarian language we want to hide Category prefix from edit summaries. To do this, we need a little change in the code: [6]. Please build it into the official code. – BáthoryPéter (talk) 14:52, 11 January 2011 (UTC)

✓ Done [7] Lupo 15:20, 11 January 2011 (UTC)

Thanks! --BáthoryPéter (talk) 15:39, 11 January 2011 (UTC)

Better integrating of sortkeys

While I understand I can change sort keys with hotcat, it might be nice to better integrate it. You for example don't see the current sortkeys. What I can envision is an extra button that shows the existing sort keys of all cats, and the defaultsort if present, and for the other cats (or default) the option to add a sort. Of course then also a button to edit the sort. Would that be feasible? Is this the best place to ask for it? You might want to fiddle with the best interface. Akoopal (talk) 13:37, 22 January 2011 (UTC)

An interface for this would need to be carefully designed. Displaying the sort keys could maybe be done through the title attribute of the category links. Defaultsort would need extra handling (display possibly as the "title" of the "Categories:" link at the beginning of the line?). Changing or adding sort keys could be done using the normal category editing. Changing or adding defaultsort again would need extra handling. And IIRC, the keyword "DEFAULTSORT" in the wikitext can even be localized... It'd be quite a lot of work. I'll give it some thought, but don't hold your breath. Lupo 07:19, 4 February 2011 (UTC)
I understand completely this is not easy coded in a day. Thanks for considering. Akoopal (talk) 08:05, 4 February 2011 (UTC)

Italian localization

Could you add the Italian localization here, please?

Thanks, Salvatore Ingala (talk) 10:48, 27 February 2011 (UTC)

{{editprotected}} to get attention of an admin. Akoopal (talk) 19:16, 27 February 2011 (UTC)
Done--DieBuche (talk) 23:14, 27 February 2011 (UTC)
Many thanks to both of you! Salvatore Ingala (talk) 23:28, 27 February 2011 (UTC)


{{editprotected}} hi, please convert any ".dir = 'rtl'" to ".style.direction = 'rtl'". thanks.−ebraminiotalk 19:46, 25 November 2010 (UTC)

Care to elaborate why? Lupo 19:57, 25 November 2010 (UTC)
it have not any effect but as you know inline style preferred to direct attribution.−ebraminiotalk 20:08, 25 November 2010 (UTC)
So what's the benefit? What's the problem that can't be solved with the way it's currently done? I'm not going to change (and re-test!) this just for beautifying the code. Lupo 20:16, 25 November 2010 (UTC)
okay :), can you invert "→" for rtl languages? thanks −ebraminiotalk 19:09, 26 November 2010 (UTC)
✓ Done. Lupo 10:43, 27 November 2010 (UTC)
thank you, [8] can applied for rtl languages?−ebraminiotalk 09:13, 3 December 2010 (UTC)
Also done. (Finally. Sorry, somehow I didn't notice this before.) Lupo 10:39, 2 March 2011 (UTC)
Thank you −ebraminiotalk 14:13, 8 May 2011 (UTC)

Bug in modifiying several categories

When you click on "modify several categories" and in this configuration you add one or more, it adds them in the bottom, after the interlinks (example). Is it possible to fix it? --Superchilum(talk to me!) 07:36, 1 March 2011 (UTC)

Not a bug, really, just not supported... but I just updated the gadget to do exactly this. Reload your browser's cache (at the Italian Wikipedia!) and try again. Lupo 07:52, 1 March 2011 (UTC)


Hotcat appears to have changed, it now sets the watch this page box to unchecked by default, rather than the more useful checked. I have noticed this when modifying multiple categories, I assume it does the same for single ones. -mattbuck (Talk) 20:31, 1 March 2011 (UTC)

I'll try to verify that tomorrow. HotCat basically should set that box depending on your preference settings. ("Add pages I edit to my watchlist" under Preferences→Watchlist.) If it doesn't, that's a bug. The box should also be set if the page is on your watchlist Lupo 22:07, 1 March 2011 (UTC)
Should be fixed now. Please reload your browser's cache. Lupo 07:43, 2 March 2011 (UTC)

Stopped working?

HotCat seems to have stopped working for me. Is there a problem? --JD554 (talk) 10:49, 2 March 2011 (UTC)

Damn. Was caused by an extra colon. No idea how that sneaked in. Reload you browser's cache, and it should work again. Sorry for the inconvenience. Lupo 11:04, 2 March 2011 (UTC)
No problem. Thanks, JD554 (talk) 11:07, 2 March 2011 (UTC)


When I click save to add a category to a file using HotCat, it downloads a file named index.php and doesn't save. What's going on? --- Cymru.lass (talk) 01:24, 4 March 2011 (UTC)

Probably nothing to do with HotCat. Happens sporadically on other pages and actions, too. I've seen reports (completely unrelated to HotCat) about this happening from time to time at the English Wikipedia, and also see bugzilla:23940. I believe this behavior indicates some corrupted response headers sent by the servers. Lupo 07:26, 4 March 2011 (UTC)
Ahhh ok, thanks! --- c y m r u . l a s s (talk me, stalk me) 22:15, 6 March 2011 (UTC)

Please add SUBPAGENAME as default sortkey

Hi could you please change the default sortkey used when the user does not supply a sortkey, to use {{SUBPAGENAME}} ?
This will improve usability a lot for people using HotCat on wikis with subpages, and won't interfere with regular pages.
Thanks --TriMoon (talk) 23:42, 7 March 2011 (UTC)

See also bugzilla:22911 and b:Wikibooks:Reading room/Archives/2010/June#DefaultSortkey for namespaces with subpages. Helder 03:13, 8 March 2011 (UTC)
I think this is better done by implementing something on the server-side to satisfy bugzilla:22911. I don't want to hardcode this into HotCat, since it might or might not be appropriate for other projects. But I could probably add a hook, which you could implement in the /local_defaults local HotCat config. Lupo 07:38, 8 March 2011 (UTC)


Is there a way to implement category suggestions based on a particular interwiki? For instance, suggest a category in a local wiki if a similar category added in en-wiki. --DixonD (talk) 19:43, 8 March 2011 (UTC)

Basically, I think this would be possible. It's not exactly simple, because that might result in cross-domain queries, but it would be doable. However, I wonder whether it would be worth the effort. Category structures tend to differ quite a bit between Wikis, so after having gotten the categories from the foreign Wiki, one would then need to check whether these categories existed locally, and I guess the resulting list might be empty very often. Lupo 08:03, 9 March 2011 (UTC)
so after having gotten the categories from the foreign Wiki, one would then need to check whether these categories existed locally Checking of existence could be done automatically by script, I think. So the very plugin would show only existed categories that could be added to the current article. And I think that such feature would be very useful for not-English wikipedias. --DixonD (talk) 11:45, 9 March 2011 (UTC)

Doesn't work in Firefox 4, please modify

I don't know what to do but could you please modify the script to work for FF 4. 11:29, 12 March 2011 (UTC)

Works perfectly for me in FF 4 RC 1 on Win XP in the monobook and vector skins. What operating system are you using? And what exactly does "doesn't work" mean? Lupo 13:28, 12 March 2011 (UTC)


Any way to filter out much recurring nested categories such as this one. Thank you. --Foroa (talk) 16:37, 27 March 2011 (UTC)

Adding B instead of A no longer mentioned in edit summary

If "A" is redirect to "B" and one tried to add "A", Hotcat used to note that in the edit summary. Somehow this feature seems to be gone. --  Docu  at 03:47, 10 April 2011 (UTC)


Hi,I have a suggestion:Is it possible to add an alarm when user wants to add subcategory and main category in the one page? for example:If B is a subcategory of A . the script doesn't allow or shows alarm that user doesn't allow to add main and sub category in the one page . Reza1615 (talk) 14:44, 8 May 2011 (UTC)

stopped working?

hey, i'm a regular user of hotcat (ubuntu, chrome web-browser)

it's not working today, & has not been for a several hours.

what's up?

Lx 121 (talk) 18:41, 25 May 2011 (UTC)

No change at all. Perhaps a server issue? Or some issue on your computer? And what exactly does "it's not working" mean? Lupo 06:39, 26 May 2011 (UTC)


It would be nice if using ";" was configurable on HotCat. In Persian we use "؛" instead ";". (Also for more information, we use "،" instead "," and «» instead "".) Thank you for you great job on making this great tool. −ebraminiotalk 21:22, 8 May 2011 (UTC)

✓ Done Define HotCat.messages.separator in your /local_defaults at fa-Wiki to override the default setting of "; ". Lupo 10:56, 30 May 2011 (UTC)

&addcat in URL

Before it was possible to add categories with HotCat directly by building an URL with addcat in it. This seems no longer possible. Is there a way to still use it? --  Docu  at 11:40, 14 June 2011 (UTC)

Nope, it has been removed after several people complained that it was an insecure feature (build a link to add some nonsense category to a high profile page, then entice someone to click the link). HotCat no longer uses a URL-parameter based submission mechanism. Lupo 11:56, 14 June 2011 (UTC)
Could we make it into an option one could turn on and off in preferences? I had made several thousand of edits with that. --  Docu  at 21:17, 14 June 2011 (UTC)
The code is not even there anymore; it was removed on March 1, 2011. (And nobody noticed in 3½ months!) But I think you could rather easily extract it from an earlier version, bundle it in its own JavaScript file, and invoke that. Lupo 07:04, 15 June 2011 (UTC)

Disable in the institution namespace

{{Edit request}} Hotcat should be disabled in the institution namespace (106). It is meant to be transcluded and should not have stray categories. --Zolo (talk) 04:27, 21 June 2011 (UTC)

Same for "Creator"-namespace (100). --  Docu  at 04:46, 21 June 2011 (UTC)
              || wgNamespaceNumber == 2
              || wgNamespaceNumber == 100
              || wgNamespaceNumber == 106
              || wgNamespaceNumber == 2
should do it. --  Docu  at 05:46, 21 June 2011 (UTC)
It was already disabled in the "Creator" namespace. I've now also disabled it in the "Institution" namespace.[9]. Lupo 06:17, 21 June 2011 (UTC)
Thanks. Personally I only use it in file and category namespaces. --  Docu  at 06:18, 21 June 2011 (UTC)

Firefox 5

It also works with FF5. JeanBono (talk) 15:24, 30 June 2011 (UTC)

Activate by default

Would it be worth activating this far all logged-in users by default? (If it hasn't been done yet) Once in a while I come across users that edit quite a lot and I think they would benefit from using this. Others might find it easy to help categorizing images with this tool. --  Docu  at 11:38, 14 June 2011 (UTC)

Are there any statistics on the percentrage of users having it activated? --Leyo 16:24, 30 June 2011 (UTC)
From Commons:Village_pump#User_preferences, I'd guess one third. --  Docu  at 04:42, 1 July 2011 (UTC)

Doubling (Bug)

How is this possible? (I know a hidden Cat) -- Perhelion (talk) 10:09, 23 June 2011 (UTC)

No idea. Should not have happened; and I cannot reproduce it. Lupo 07:27, 1 July 2011 (UTC)
I could reproduce it by using "Animated gifs exceeding the 12.5MP_limit‎". --  Docu  at 10:38, 1 July 2011 (UTC)

Empty line above category

It would be nice, if an empty line could be inserted above a category added by HotCat, if the object above is not a (different) category. Also Wikipedia article would benefit from this feature. --Leyo 12:25, 21 June 2011 (UTC)

Do I need to provide an example? I would not call it bug, but the source code becomes a little unsightly IMHO. --Leyo 18:59, 7 July 2011 (UTC)
No, not necessary. It's clear what you mean, but I don't have the time right now to do this. Whitespace stuff needs thorough testing. I'll get back to it later. Lupo 06:40, 8 July 2011 (UTC)
Should be ✓ Done now. Lupo 07:24, 18 July 2011 (UTC)
Thank you. No empty line is added when replacing {{Uncategorized}} (example), but this is a minor issue. --Leyo 08:02, 18 July 2011 (UTC)

Removed {uncategorized} (Bug)

What can we do to fix this [10]? I think Hidden Cat must be a exception to permit remove template:uncategorized --  «( P E R H E L I O N )»* 18:09, 3 July 2011 (UTC)

✓ Done Lupo 07:09, 4 July 2011 (UTC)

New categories above interwikis

Thanks for the recent imporvement, which puts new categories above interlanguage links! Unfortunately the script still doesn't recognize intervikis such as be-x-old:, nsd-nl: or fiu-vro: and adds new category in the middle of interlanguage links, below the last of such interwiki links with dash in it (eg here). And it considers images at the end of the article as interwikis (eg here).

Also, it's less important, but when adding new category, the script doesn't add an empty row between a category and interlanguage links (eg here). 17:00, 16 July 2011 (UTC)

✓ Done Should all be fixed now. (Possibly you'll have to reload your browser's cache to get the fix.) Lupo 07:23, 18 July 2011 (UTC)
Way better, thanks! But prefix simple: still seems to be a problem. 06:12, 19 July 2011 (UTC)
Darn, I forgot about these special cases ("simple", "tokipona"). Should be fixed now; HotCat tries to get the list of prefixes through the API now and uses a hard-coded regular expression only as a fallback. Lupo 08:09, 19 July 2011 (UTC)
Seems there's something missing from this API list. Now the script doesn't recognize prefix ckb:. 10:58, 19 July 2011 (UTC)
There is a "cbk-zam", but no "ckb". I'm using this query and from that result all those prefixes that do have a language set (the others seem to be interwiki, but not interlanguage links). That list indeed lacks "ckb", yet the servers allow it as a valid interlanguage link. Hmphhh... either this is the wrong query, or there's an API bug. I'll investigate. Lupo 11:23, 19 July 2011 (UTC)
Perhaps it's better to use "prop=langlinks" anyway: smaller result set, and it does return "ckb": [11]. Back to the drawing board. See also bugzilla:29962. Lupo 11:40, 19 July 2011 (UTC)
←Using now a different query ("prop=langlinks" to get the interlanguage links (and their prefixes) actually on the page, instead of the site's interwiki map to get all interlanguage prefixes). At least this new query does contain "ckb". I hope it doesn't produce other strange effects. Lupo 12:02, 19 July 2011 (UTC)

Galician translation

{{editprotected}} Please add the following translation at MediaWiki:Gadget-HotCat.js/gl:

//<source lang="javascript">

// Traducións dalgunhas mensaxes da interface de usuario do HotCat.
if (typeof (HotCat) != 'undefined') {
  HotCat.messages.commit      = 'Gardar';
  HotCat.messages.ok          = 'Aceptar';
  HotCat.messages.cancel      = 'Cancelar';
  HotCat.messages.multi_error = 'Non se puido obter o texto da páxina do servidor. Por ese motivo, os cambios feitos nas categorías '
                               +'non poden gardarse. Sentimos as molestias.';

  HotCat.categories  = 'Categorías';

  HotCat.engine_names.searchindex = 'Índice da procura';
  HotCat.engine_names.pagelist    = 'Lista de páxinas';
  HotCat.engine_names.combined    = 'Procura combinada';
  HotCat.engine_names.subcat      = 'Subcategorías';
  HotCat.engine_names.parentcat   = 'Categorías raíz';

  HotCat.tooltips.change = 'Modificar';
  HotCat.tooltips.remove = 'Eliminar';
  HotCat.tooltips.add = 'Engadir unha nova categoría';
  HotCat.tooltips.restore = 'Desfacer os cambios';
  HotCat.tooltips.undo = 'Desfacer os cambios';
  HotCat.tooltips.down = 'Abrir para modificar e mostrar as subcategorías';
  HotCat.tooltips.up = 'Abrir para modificar e mostrar as categorías raíz';

  HotCat.multi_tooltip = 'Modificar varias categorías';


Thanks! --Toliño Fala aquí comigo 15:04, 24 August 2011 (UTC)

✓ Done. Thank you very much for providing these translations! Lupo 15:50, 24 August 2011 (UTC)

"include on all pages"

In the installation instructions, the following two lines have me confused:

"Make sure your wiki includes ajax.js on all pages. If you're using some Javascript framework on your Wiki, either textually copy the function sajax_init_object into the HotCat file you'll copy in step 5, or rewrite HotCat to use your framework. If you're not using some framework, either set up your wiki to serve ajax.js, or again textually include function sajax_init_object in the HotCat source. See also mw:Manual:$wgUseAjax. Make sure your wiki includes wikibits.js on all pages. HotCat needs the function addOnloadHook from that file to launch. If your Wiki has some other way to launch Javascripts, modify the HotCat source accordingly."

What exactly do I do to get these files included on all pages? In my GlobalSettings, the $wgUseAjax is set to true, but how do I ensure these additional files will be loaded?


If you didn't modify the MediaWiki distribution, you should have these files available. Lupo 10:40, 26 August 2011 (UTC)
Okay, thanks :) — Preceding unsigned comment added by (talk • contribs) 17:08, 26 August 2011 (UTC)

HotCat & Wikisources


On the wikisources, there is a js template on the Index namespace (for example s:en:MediaWiki:Proofreadpage index template). Everything that is not in the template is delete. HotCat add the category *after* the template so categories is delete. Could HotCat add the category at the right place ? (I'm looking to add a category fields on the template but it will take some times)

Cdlt, VIGNERON (talk) 18:56, 27 August 2011 (UTC)

No, HotCat cannot do this. This is a rather special case. I see basically two possibilities:
  1. Disable HotCat on index pages.
  2. Work with a copy of HotCat, and change the category placement code such that it know about this special case.
Lupo 14:56, 28 August 2011 (UTC)

Not for non-existing pages

What about not loading this for non-existing pages? That makes more sense and is prettier. Thanks, SPQRobin (talk) 19:59, 24 August 2011 (UTC)

What do you mean with pages? I like to create new categories using HotCat (multicat mode). --Leyo 21:51, 24 August 2011 (UTC)
Hm, but outside of the Category namespace it probably really doesn't make sense to let HotCat create pages. Or does it? Lupo 06:13, 25 August 2011 (UTC)
Maybe for galleries, but surely not for file description pages. --Leyo 08:08, 25 August 2011 (UTC)
When you go to this gadget adds the category box. It shouldn't be there. When I use it on that page to add a category, it creates the page which doesn't really make sense. SPQRobin (talk) 21:38, 25 August 2011 (UTC)
Have you read the above? --Leyo 21:51, 25 August 2011 (UTC)
Yes I did. So for non-existing category pages and maybe file description pages, it could be useful to have this. But on other namespaces (especially the main namespace), I don't think it should be there. SPQRobin (talk) 19:31, 26 August 2011 (UTC)
In the gallery namespace (main namespace on Commons) it is equally useful as for the category namespace. Please give an example, where it would be useful in the file namespace, i.e. for non-existing files. --Leyo 19:51, 26 August 2011 (UTC)
Never mind file namespace, I misunderstood you. The thing is that we use this on Incubator (incubator:MediaWiki:Gadget-HotCat.js) by calling the code from Commons. But on Incubator it's not really useful on non-existing pages. I am not good at JavaScript so I don't know how to code it myself, so if you have a solution that would be great (maybe an if() statement checking the page existence). SPQRobin (talk) 16:21, 27 August 2011 (UTC)

←Override function HotCat.disable in your /local_defaults at the incubator. The following should do it, I think (untested):

if (typeof (window.HotCat) != 'undefined') {
  window.HotCat.disable = (function (default_disable) {
    return function () {
      return wgArticleId == 0 || default_disable();

Lupo 14:52, 28 August 2011 (UTC)

Hmm.. It didn't work. I tried checking for wgArticleId when loading the gadget, but that didn't work either. SPQRobin (talk) 22:58, 28 August 2011 (UTC)
I just tried this exact code at [12], and it worked perfectly. Did you reload your browser's cache after you made the change? Lupo 07:27, 29 August 2011 (UTC)
Hmm I think I did.. Tried it again and now it works indeed. Sorry :) Anyway, thank you! SPQRobin (talk) 18:46, 29 August 2011 (UTC)

Uncategorized images

When I use HotCat to add an image to a previously uncategorized image like this, it is not properly removing all of the "Uncategorized" categories. I've had to manually remove several, like this. Can this behavior be changed? WhatamIdoing (talk) 18:19, 7 September 2011 (UTC)

A user manually added an Uncategorised. In this case it was "double-uncategorised". -- RE rillke questions? 18:25, 7 September 2011 (UTC)

HotCat is not working

Since a few days (probably since Sept 1st) HotCat is not working for me. HotCat is available, and I can fill categories, but the OK button either has no action or end without saving. I use IE7. HenkvD (talk) 11:02, 7 September 2011 (UTC)

I experienced a lot of users with problems since a few weeks and IE7 and I am curious what it is. Is there an error in the error-console after clicking on save? (Status-bar, left side, Warning-Symbol, double-click) -- RE rillke questions? 11:29, 7 September 2011 (UTC)
I could imagine that IE7 has a problem with protocol-relative URIs used in Ajax calls. The switching on of protocol-relative URIs at the Commons is the single major change that happened recently and that could (and did) affect scripts. wgServer is since set to "//" instead of "". There does seem to be a problem with the <script> tag in that respect on older IEs, see e.g. [13]. (I didn't verify this.) If so, I'll have to adapt quite a few places in the script. Will investigate in the next few days; I don't have an IE7 at hand right now. More problems with protocol-relative URLs exist in IE7 & 8 in CSS: [14]. Lupo 12:11, 7 September 2011 (UTC)
Concerning IE, I tried the two programs, I added to COM:User Scripts. Installing the one from MS was a pain. It took 2 hours and afterwards it didn't work. (UI was fine but clicking on "load a page", made the program hanging up with 100% processor usage.) The second one worked fine but sometimes the tabs crashed. Fortunately they are located in different processes. -- RE rillke questions? 18:31, 7 September 2011 (UTC)
The script error is "access denied", line 20 char 913 code 0. There ar prevous messages, all "acces denied", but different lines and chars. The first is line 82, char 722. HenkvD (talk) 11:58, 8 September 2011 (UTC)
See bugzilla:30825. Looks indeed like protocol-relative URIs are the culprit. I'll adapt HotCat to deal with this (simply prepend document.location.protocol to any protocol-relative URI in Ajax calls and in script inclusions should do the trick). However, the error messages you quoted seem to indicate that the problem is not in HotCat alone. It'll affect *all* JavaScript that uses Ajax, and in particular the "line 82, char 722" tells me that it's in all likelihood in some minified unrelated code. See also COM:AN#Helpdesk and Villagepump flooded by users who cannot upload using upload wizard. Lupo 07:55, 9 September 2011 (UTC)
Indeed, I tested with IE7 and there are 2 unhandled error messages at page load-time whithout clicking anywhere. Can you apply my proposed patch at MediaWiki:AjaxQuickDelete.js, please? -- RE rillke questions? 07:58, 9 September 2011 (UTC)
User:ALE! already did it. Lupo 08:11, 9 September 2011 (UTC)
I think you are on the right track. These "access denied" errors occur also at just loading a page, and I also have problems on the UploadWizzard. HenkvD (talk) 09:35, 9 September 2011 (UTC)
I have adapted HotCat such that it never generates Ajax calls with protocol-relative URLs. (It just prefixes document.location.protocol if it encounters a protocol-relative URL.) That avoids this IE7 bug. I have similarly adapted ImageAnnotator. At bugzilla:30825, Brion points to revision 96699, which should fix this for jQuery-based scripts. However, it appears that this fix has not yet been deployed. Therefore, it is currently still possible that you get these "access denied" errors on IE7. I would expect r96699 to be deployed today; if it isn't and you still have the problem, just re-open bugzilla:30825 or bug the devs to deploy it. Lupo 06:57, 12 September 2011 (UTC)
Seems to work OK now. Thanks HenkvD (talk) 18:02, 12 September 2011 (UTC)
Yep, r96699 was deployed today at 17:36 UTC. See the Server admin log. Glad to see that this fixes this problem, and that apparently my changes in HotCat and ImageAnnotator didn't break anything else. Lupo 21:58, 12 September 2011 (UTC)

BUG: HotCat doesnt load at finnish wikipedia.

Hi, it seems that Mediawiki 1.18 update changed the syntax of addOnloadHook and now it should be addOnloadHook (run()); instead if addOnloadHook (run); -- 08:46, 9 October 2011 (UTC)

If you write addOnloadHook (run());, you don't need addOnloadHook.
BTW you can use resource-loader to load hotcat: MediaWiki:Gadgets-definition#Categoriesfi:Järjestelmäviesti:Gadgets-definition#Muokkaaminen -- RE rillke questions? 11:45, 9 October 2011 (UTC)

Modify button

Hi. I have installed the gadget in other wiki (outside Wikimedia projects), but the modify button (+ and -) is not there... The add button (+) is OK. Which can be the problem? Thank you. --Unai Fdz. de Betoño (talk) 15:08, 10 October 2011 (UTC)

  • Category transclusion by a template. /Problems fetching the wikitext. -- RE rillke questions? 15:30, 10 October 2011 (UTC)
Do you know how to fix it? We had the same problem in the Basque Wikipedia, last week, and we solved it like this, but that doesn't work out of Wikimedia. --Unai Fdz. de Betoño (talk) 15:47, 10 October 2011 (UTC)
If you are running MW 1.18, you have to use the latest copy. -- RE rillke questions? 18:01, 10 October 2011 (UTC)

Oh... I'm running MW 1.15.1... --Unai Fdz. de Betoño (talk) 20:13, 10 October 2011 (UTC)

Thank you so much, Rillke. With your answer about the MW version we have solved it. Bye!--Unai Fdz. de Betoño (talk) 07:52, 11 October 2011 (UTC)

You can add the Belarusian localization?


be:MediaWiki:Gadget-HotCat.js/be--Хомелка (talk) 09:31, 11 October 2011 (UTC)

✓ Done Thank you! Lupo 09:57, 17 October 2011 (UTC)
Huge thanks :)--Хомелка (talk) 16:35, 17 October 2011 (UTC)

Hidden Cat can be added again

Can someone confirm that (bug)? -- πϵρήλιο 06:21, 18 October 2011 (UTC)

Not a bug. Hidden categories that are not transcluded from somewhere can be edited with HotCat, and HotCat allows adding hidden categories. However, if there are no categories at all on a page, and a {{uncategorized}} is present, adding only hidden categories through HotCat should not remove the {{uncategorized}}. Due to bugzilla:15321, this only works if all the hidden categories added have at least one member. Lupo 07:01, 18 October 2011 (UTC)

2011-10-18 code changes cause strange GUI effects

HotCat bug 2011-10-22.png

In Firefox 3.6, Monobook. When I reduce window width to provoke a horzontal scrollbar and then use HotCat the suggestion box sometimes is at the wrong place. To make this happen the category entry needs to be on the right side of a line (marked with a green arrow). Then I clicked the ↓. The category name is pushed to the next line since space in the old line is not enough but the suggestion box stays at the old line - sometimes that far right that I need to scroll to the right to see it. I have not figured out 100 % why and at which settings it happens - but with the version before last tuesday it works. Just noting here in case others have the same/similar problems (I know one other person who has this problem). Cheers --Saibo (Δ) 23:42, 21 October 2011 (UTC)

The current version of HotCat is from 2011-10-19. refreshing your browser's cache should fix this problem. I'm running FF 3.6.4, monobook, on a Win XP box and cannot reproduce this problem anymore with the current HotCat version. Lupo 18:27, 22 October 2011 (UTC)
In fact, I can reproduce it in one case: on a page without any categories at all, just keep clicking the (+) link at the end of the category bar. Seems to be a FF3.6 layout problem; FF3.6 simply mis-places the suggestions and the engine selector, even though the script does everything correctly. Should be fixed with this edit. So, the current HotCat version is from 2011-10-22. refreshing your browser's cache should get that version, and with that, this problem should really be gone. Lupo 19:07, 22 October 2011 (UTC)
Thank you! :-) Works again. Cheers --Saibo (Δ) 12:26, 25 October 2011 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. Saibo (Δ) 12:26, 25 October 2011 (UTC)

Bug in Monobook theme


In Monobook, the upper part of the gadget ('comblined search' in the screenshot) cover half of the category field ('q'), attached screenshot. Netanel h (talk) 12:51, 5 October 2011 (UTC)

It happens only when the gadget open below the categories field, not when it opens upwards.
Layout bug should be fixed now. Reload your browser's cache, and it should display at the correct position. However, there's something else that's strange in your screenshot: the background of the suggestion list appears to be transparent; the background text shines through. What browser are you using? Lupo 09:26, 18 October 2011 (UTC)
Unfortunately, I spoke too early. The bug isn't fixed yet. Needs more careful analysis. Lupo 19:52, 18 October 2011 (UTC)
OK, now it should be fine. Lupo 20:11, 18 October 2011 (UTC)
Thanks, now it is OK. Sorry about forgetting this issue for a while. I use Iceweasel 3.6.x, but now the suggestion list is white, so it may be fixed also, thanks for your effort. Netanel h (talk) 23:47, 31 October 2011 (UTC)

Layout problem in IE8 and IE9

While we're at it; IE8 and IE9 have a different layout problem, which I fixed on 2011-10-22 20:21 UTC. If the suggestions and the search engine selector overlap the category input field, please refresh your browser's cache, too. The cause for this layout problem is a bug in IE8 and IE9, if you reload your browser's cache, your browser should load the newest HotCat version, which works around this IE bug. Lupo 20:40, 22 October 2011 (UTC)

Comment to enable archiving. Lupo 09:29, 4 November 2011 (UTC)

Issues with Opera and missing translation

Someone on pl.wikipedia reported issues with HotCat not running under Opera. I have installed Opera 11.52. After some debugging I have found the cause. HotCat's loader does not work correctly. It tries to load 'MediaWiki:Gadget-HotCat.js/pl' which is okay if such page exists. If not, the callback for onload and onreadystatechange events will not be called (under Opera), as a result the script will be waiting indefinitely for its dependency, and no HotCat UI will be shown. The workaround is simple for Polish users, I can create an empty page, but this does not solve the real issue. Beau (talk) 19:31, 3 November 2011 (UTC)

Change pl:MediaWiki:Gadget-HotCat.js to the contents of en:MediaWiki:Gadget-HotCat.js. Then change pl:MediaWiki:Gadget-HotCat.js/local_defaults to the following:
// Lokalne komunikaty
if (typeof (HotCat) != 'undefined') {

  HotCat.messages.cat_removed   = 'Usunięto kategorię "$1"';
  HotCat.messages.template_removed  = 'Usunięto {{[[Kategoria:$1]]}}';
  HotCat.messages.cat_added     = 'Dodano kategorię "$1"';
  HotCat.messages.cat_keychange = 'nowy klucz sortowania [[Kategoria:$1]]: ';
  HotCat.messages.cat_notFound  = 'Nie znaleziono kategorii "$1"';
  HotCat.messages.cat_exists    = 'Kategoria "$1" już jest w haśle; nie dodano';
  HotCat.messages.cat_resolved  = ' (za przekierowaniem [[Kategoria:$1]])';
  HotCat.messages.uncat_removed = 'usunięto {{kategoria}}';
  HotCat.messages.using         = ' za pomocą [[WP:Narzędzia/HotCat|HotCat]]';
  HotCat.messages.multi_change  = '$1 kategorii';

  HotCat.category_regexp     = '[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]|[Kk][Aa][Tt][Ee][Gg][Oo][Rr][Ii][Aa]';
  HotCat.category_canonical  = 'Kategoria';
  HotCat.disambig_category   = null;
  HotCat.redir_category      = null;
  HotCat.uncat_regexp        = /\{\{\s*([Kk]ategoria)\s*\}\}\n?/g ;
  HotCat.template_regexp     = '[Tt][Ee][Mm][Pp][Ll][Aa][Tt][Ee]|[Ss][Zz][Aa][Bb][Ll][Oo][Nn]';
  HotCat.template_categories = {};

  HotCat.no_autocommit = true;
} // end if
Then it'll work again (after having cleared the browser's cache). Lupo 20:20, 3 November 2011 (UTC)
You don't have to define all the interface texts, they're already at MediaWiki:Gadget-HotCat.js/pl. Lupo 20:24, 3 November 2011 (UTC)
In general, though, I should probably do something about this. I'll have to see whether an onerror handler on the script tag might help Opera. Lupo 20:35, 3 November 2011 (UTC)
Indeed, Opera never calls the onload handler when the script to be loaded doesn't exist; it calls an onerror handler instead. I've therefore added an onerror handler, and now it works (tested on Opera 9.5, WinXP) So that's ✓ Done. But you should change your HotCat configuration at the Polish Wikipedia all the same as outlined above; that'll give you many more translations. Lupo 20:59, 3 November 2011 (UTC)
Thanks. Beau (talk) 21:10, 3 November 2011 (UTC)

Key change - translation

Currrently the "s are hardcoded with the following line: summary.push (HotCat.messages.cat_keychange.replace (/\$1/g, toAdd) + '"' + k + '"'); in e.g. Norwegian, we want them to be « » instead. Njardarlogar (talk) 11:23, 5 November 2011 (UTC)

✓ Done To configure this, define HotCat.messages.cat_keychange in no:MediaWiki:Gadget-HotCat.js/local defaults as follows:
HotCat.messages.cat_keychange = 'ny sorteringsnøkkel [[Kategori:$1]]: «$2»';
Then reload your browser's cache. That should do it. Lupo 15:29, 5 November 2011 (UTC)

Redirects Problem

Hi, I installed HotCat on the hindi wikipedia per the instructions. You can find it at w:hi:Mediawiki:Gadget-HotCat.js and the local defaults at w:hi:Mediawiki:Gadget-HotCat.js/local defaults. The latter specify

HotCat.redir_category      = 'विकिपीडिया श्रेणी अनुप्रेषित';

which leads to w:hi:Category:विकिपीडिया श्रेणी अनुप्रेषित. Subcategories of this category are tagged with w:hi:Template:श्रेणी अनुप्रेषित which works the same as w:en:Template:Category Redirect. But the subcategories are not resolving as redirects. For Example:w:hi:Category:Himalaya should resolve to w:hi:Category:हिमालय but it doesn't. Any idea what I'm doing wrong? You can use w:hi:विकिपीडिया:प्रयोगस्थल for testing. Thanks for this wonderful gadget and any help that you might be able to provide.--Siddhartha Ghai (talk) 23:02, 9 November 2011 (UTC)

Maybe reload your browser's cache? It works for me: when I enter "Himalaya", HotCat resolves the redirect to w:hi:श्रेणी:हिमालय and would insert the line "[[श्रेणी:हिमालय]]" above the interwiki links. Isn't that correct? Lupo 23:26, 9 November 2011 (UTC)
Thanks. I don't know why I didn't see that. It works :D Siddhartha Ghai (talk) 21:52, 10 November 2011 (UTC)

Problem on outside installation

Using this gadget on a non-Wikimedia MediaWiki installation. We're testing out 1.18 and this gadget seems to no longer work. It loads correctly, but when you go to save any changes, you get this error: "Could not retrieve the page text from the server. Therefore, your category changes cannot be saved. We apologize for the inconvenience." Any suggestions? --Varnent (talk) 03:41, 7 November 2011 (UTC)

Is that installation accessible? If so, I could go take a look. (If you don't want to publish the URL here, send me an e-mail instead.) Otherwise: is the API enabled? Does your wiki send ajax.js? Which version of HotCat are you running? The latest? Lupo 08:05, 7 November 2011 (UTC)
Yes, it's accessible, API and AJAX should be working. Was fine with 1.17 install, just not working with 1.18 install. Using the Commons version, but could setup local copy if that's necessary. Thank you for looking into this! :) --Varnent (talk) 04:07, 10 November 2011 (UTC)
Your server does indeed not return the pagetext. Compare:
There's nothing I can do about this in HotCat. It's an error somewhere in the API software on your server.
That Wiki seems to have some problems anyway; my browser tells me there's a syntax error on line 21 of the script loaded from That line looks completely broken; looks like whatever minifier processed this got mightily confused with the quotes.
In summary: not a HotCat problem but a server software (or setup) problem at WikiQueer. Lupo 08:22, 10 November 2011 (UTC)
P.S.: creating an account there gave me a blank page with the error message "Fatal error: Call to a member function checkFlags() on a non-object in /home/wikiquee/ on line 212", but it did create the account and also logged me in. Something's really broken at that wiki. Lupo 08:29, 10 November 2011 (UTC)
We're in soft launch (so testing out a number of extensions that don't always work) and aware of the NewUserMessage and Google Translate problems - but the API one is new. I'll check it out. Any ideas why it is working fine with our MW1.17 install and broken in our MW1.18 test site (now - thanks! --Varnent (talk) 00:58, 11 November 2011 (UTC) (updated to new URLs)
Closing the loop on this question - it appears it was a bug in the API for MW1.18 that was fixed in the trunk but not yet committed to the beta releases. Here's more info for anyone interested. --Varnent (talk) 19:27, 11 November 2011 (UTC)