MediaWiki talk:Gadget-HotCat.js/Archive04
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. |
Localisation problem on Esperanto Wikipedia
Hi. Esperanto Wikipedia is using this gadget by direct linking (eo:MediaWiki:Gadget-HotCat.js), on Commons is Esperanto localisation but the edit summaries on Esperanto Wikipedia are still in English (example). Can someone help please? --KuboF (talk) 11:56, 14 February 2015 (UTC)
- I just added "window.hotcat_translations_from_commons = true;" to the gadget page eo:MediaWiki:Gadget-VarmaKato.js. But this doesn't change the language of the summaries. Why? --Tlustulimu (talk) 16:19, 17 February 2015 (UTC)
- I just added some lines to eo:MediaWiki:Gadget-HotCat.js/local defaults. Now the summaries are translated. :-) --Tlustulimu (talk) 16:56, 17 February 2015 (UTC)
Can someone please update the MediaWiki:Gadget-HotCat.js/eo using eo:MediaWiki:Gadget-HotCat.js/local defaults? Thanks! --KuboF (talk) 17:07, 17 February 2015 (UTC)
- Nothing to be done here. The UI elements are correctly specified in MediaWiki:Gadget-HotCat.js/eo, and the non-UI parts like edit summaries and so on shall not be done here but only in /local_defaults at eo-WP. We want the edit summaries to be in English here at the Commons. Lupo 11:26, 24 February 2015 (UTC)
HotCat not compatible with MoreMenu?
HotCat does not seem to work with MoreMenu. I've had HotCat for a while and it has been working fine through the other gadgets I've downloaded. The most recent edit with HotCat was this one, on Feb 17. When I actually got MoreMenu to work on Feb 20, I don't think I noticed that I couldn't use HotCat anymore. I just realized today that I can't use HotCat. I think MoreMedia caused it to not work. Is there a compatibility issue? --Mr. Guye (talk) 00:28, 26 February 2015 (UTC)
- I don't know, but then I don't think so. Probably this was caused by your invalid vector.js, which was fixed for you some 5 hours after you posted the above comment by en:User:MusikAnimal. Lupo 11:41, 26 February 2015 (UTC)
Changing the default edit summary
Is it possible to change the default edit summary?--ԱշոտՏՆՂ (talk) 16:56, 21 June 2015 (UTC)
Add rawcontinue URL parameter
Please update this gadget from User:Mr. Stradivarius/HotCat.js (diff). This adds the rawcontinue URL parameter, which is necessitated by an upcoming API change (see the announcement for more details). — Mr. Stradivarius ♪ talk ♪ 08:34, 27 June 2015 (UTC)
- Done INeverCry 09:09, 27 June 2015 (UTC)
- Thanks! — Mr. Stradivarius ♪ talk ♪ 09:24, 27 June 2015 (UTC)
- Aren't there a few more places? And must it be
rawcontinue=1
, or israwcontinue=
good enough? Lupo 19:36, 29 June 2015 (UTC)- Those should be the only API queries where the query-continue data is actually used - there's no need to add rawcontinue otherwise. Although if I've missed any, please feel free to correct me. Either
rawcontinue=
orrawcontinue=1
will work. — Mr. Stradivarius ♪ talk ♪ 01:13, 1 July 2015 (UTC)
- Those should be the only API queries where the query-continue data is actually used - there's no need to add rawcontinue otherwise. Although if I've missed any, please feel free to correct me. Either
- Aren't there a few more places? And must it be
- Thanks! — Mr. Stradivarius ♪ talk ♪ 09:24, 27 June 2015 (UTC)
There were indeed a few more places. -- Rillke(q?) 01:17, 1 July 2015 (UTC)
- @Rillke: Which are they? I can't see them, but I might be missing something obvious. If there are some missing, it would be good to know sooner rather than later, as the API change comes into effect today on Commons. — Mr. Stradivarius ♪ talk ♪ 01:29, 1 July 2015 (UTC)
- I think I caught the remaining ones. -- Rillke(q?) 01:45, 1 July 2015 (UTC)
- Ah, I see, you were talking about other places in other gadgets, not other places in HotCat. Yes, there are still a lot of scripts on WMF wikis that need updating. There are still quite a few on Commons, but it looks like you got all the ones in the MediaWiki namespace. (I used this search to find scripts that need updating, although it can find some false positives.) — Mr. Stradivarius ♪ talk ♪ 02:40, 1 July 2015 (UTC)
- I think I caught the remaining ones. -- Rillke(q?) 01:45, 1 July 2015 (UTC)
hotcat-bug
in urdu wiki pedia hotcat bug [1]. hotcat removed curly Brackets in all templates.--Obaid Raza (talk) 11:57, 13 July 2015 (UTC)
Interest in conversion to an extension?
The Community Tech team is looking into the status of HotCat and how we might be able to improve it, including the possibility of converting this gadget to an extension. What are your thoughts? Is there anything besides a general update and jQuery-fication that would be particularly useful?
Related tasks on Phabricator:
--Fhocutt (WMF) (talk) 01:10, 13 August 2015 (UTC)
Tag
We may provide the option of tagging edits made using hotcat, when such a tag is defined in the local config. It's done in the french wikipedia version of hotcat for example, see fr:special:tags. This functionality was enabled in this commit. Cenarium (talk) 23:47, 6 September 2015 (UTC)
- This can be achieved by adding a changetag message (empty by default), and a wpChangeTags field in the commit form. Cenarium (talk) 19:49, 7 September 2015 (UTC)
- Cool! Helder 01:26, 9 September 2015 (UTC)
drop-down broken in google Chromium 45
apparantly, the drop down boxes are acting differently in Chome browser. see
Slowking4♡Farmbrough's revenge 14:33, 7 September 2015 (UTC)
- I'm also seeing the issue on Mac Gogle Chrome version: 45.0.2454.85 (64-bit) TiMike (talk) 20:42, 20 September 2015 (UTC)
HotCat and global user pages
I added a category to a user page using HotCat, and the edit unexpectedly replaced the user page with just the category, as the user page was a global page. See [2]. I reported this through Phabricator at [3]. Please fix this behaviour as per the suggestions in the Phabricator ticket! Thanks. Mike Peel (talk) 20:23, 15 October 2015 (UTC)
- Done by disabling HotCat on non-existing user pages. Lupo 22:15, 15 October 2015 (UTC)
- @Lupo: that's great, thanks! Mike Peel (talk) 16:56, 16 October 2015 (UTC)
Typo in the italian translation
In the italian translation, the line with the sentence Motore di recerca should be replaced as follows:
HotCat.engine_names.searchindex = 'Motore di ricerca';
Thanks, --Ruthven (msg) 13:48, 18 October 2015 (UTC)
Updating HotCat UI
Warning: Unsolicited advice incoming! :)
HotCat's checkmark and "X" look out of place (and out of date) within the rest of the interface of MediaWiki. The style of the text (a script font) and the color choice (a seemingly random shade of purple) do not indicate action as well as other colors could (say green or red). For this editor, and I can only assume others, HotCat is just part of the interface. It's so much part of my workflow that going to a wiki without it enabled is jarring. It's a really popular Gadget too!
This seems like an opportunity to benefit from existing style guides in terms of intent and design. Better consistency in tools like HotCat and only improve its integration into the work of so many editors.
I encourage the maintainers of the gadget to consider improving HotCat in this area.
Ckoerner (talk) 16:04, 4 November 2015 (UTC)
Debugging hotcat
Hi,
we were using HotCat hapilly in the past at our non-WMF wiki (1.24.0), but when we started using our own skin, it ceased to work at all. I would like to be specific about the bug, but we dont get any error messages nowhere (server logs), the gadget just does not appear in the UI. Could you point me to where I should start digging why our HotCat is not working?
Thank you for your advice. --Wesalius (talk) 05:58, 5 November 2015 (UTC)
- On a page where you expect HotCat, you could for instance open your browser's developer tools (the console) and enter
window.HotCat
. If the gadget is not loaded, it will be undefined otherwise you know that you need to debug JavaScript in the browser. -- Rillke(q?) 16:00, 6 November 2015 (UTC)
wgAction is deprecated
Could you replace it with mw.*("wgAction")? (* means I don't remember, which function is its replacement util or config maybe?) --Dvorapa (talk) 17:04, 22 November 2015 (UTC)
HotCat only saves a little over half the time I try to save
In Firefox and in Chrome, on two computers (one Win7 one Win8), HotCat seems to work inconsistently. I don't know how to reproduce the issue reliably. It's simply a matter of starting to type a category name and hitting enter when it autocompletes. Sometimes it'll work 20 times in a row, other times it takes 4-5 tries to save. Anyone have any ideas for what I could try to fix it? Thanks. — Rhododendrites talk | 01:49, 27 November 2015 (UTC)
- Not as frequent, but happens to me, too (Windows 8.1/Chrome). A real nuisance when categorizing a large number of images quickly. --Lineagegeek (talk) 16:10, 4 December 2015 (UTC)
Ascend and descend buttons (↓)(↑) is an eyesore
1. I notice that in zh-wiki(Chinese Wikipedia) and in Wikimedia Commons, the HotCat shows 4 buttons, (−)(±)(↓)(↑). I think the two ascent descent buttons, (↓)(↑), are an eyesore for most users and are seldom used. It would be better if users can configure to hide the two buttons.
2. Then I found out that hotcat in English wikipedia has only two buttons! The two (↓)(↑) are not shown. I cannot figure out why. I think that both the Chinese site and English site scripts loads the Hotcat scripts in Commons, [4](en) [5](zh). And I checked that the browser indeed loads the Commons script in both case. Then why did enwiki hotcat shows only two buttons? --Golopotw (talk) 21:39, 29 November 2015 (UTC)
- @Golopotw: In the English Wikipedia they must be turned on. Perhaps by setting the same variable to false, you can turn them off elsewhere See : Wikipedia:HotCat#Easy_categorizing_to_child_or_parent_categories — Preceding unsigned comment added by Naraht (talk • contribs) 22:16, 29 November 2015 (UTC)
Unstacked categories
Is there a good way to make HotCat use "unstacked" categories? By this, I mean doing...
[[Category:Old Cat]][[Category:New Cat]]
instead of...
[[Category:Old Cat]] [[Category:New Cat]]
It's the preferred convention on my own wiki. Xbony2 (talk) 14:55, 5 December 2015 (UTC)
Requiring two clicks to remove single category
I understand that if a user wants to make a change to a single category, the tool should allow for (almost) immediate publishing, but this causes an issue when removing a category. When clicking (+) or (±), one must type in a new category name, it's not a single action. I've accidentally clicked the (-) link a couple of times but at least I immediately recognized that I removed a category and reverted myself. Other less experienced users might not realize this. My suggestion is once the (-) link is clicked for a category is to display the category with Removed Category (x) and either change the (++) on the left to Save or display an OK button to the right. Then for the deletion of a single category, clicking the button immediately removes it, removing more than one will send you to the edit difference page. Is this doable? —Mr. Matté - En. 'pedia talk 13:43, 19 December 2015 (UTC)
- This seems to be a matter of configuration. See Help:Gadget-HotCat#User_configuration, the very first point there seems to be a configuration that changes precisely this. darkweasel94 11:48, 21 December 2015 (UTC)
- It wasn't the first item there but rather
JSconfig.keys['HotCatDelNeedsDiff'] = true
is more along the lines of what I need -- deleting a cat will always bring up the edit difference. Thanks for pointing me in the right direction. —Mr. Matté - En. 'pedia talk 04:46, 22 December 2015 (UTC)
- It wasn't the first item there but rather
Localization problem
I recently add Burmese localization of HotCat to Commons. After MediaWiki:Gadget-HotCat.js/my was created, I tested a page with HotCat. If I use my preference language as Burmese, HotCat inserted [[ကဏ္ဍ:**]] instead of [[Category:**]]. In Burmese "Category" is localized as "ကဏ္ဍ". But using [[ကဏ္ဍ:**]] is not working. Please check this log. When using with preference language as English, it's working smoothly. This bug also affected to Burmese wikipedia. Burmese Wikipedia also use [[Category:**]] not as [[ကဏ္ဍ:**]] for categorization. Ninja✮Strikers «☎» 03:29, 20 January 2016 (UTC)
- First, one should only localize UI texts here at the Commons, not texts that appear in commit messages. UI texts are those that are shown to the user using HotCat. Commit messages are for the benefit of others, and therefore they should remain in English here. Basically: here at the Commons, only localize the entries shown in MediaWiki:Gadget-HotCat.js/de.
- Second, to localize also commit messages and such at the Burmese wiki, do so at my:MediaWiki:Gadget-HotCat.js/local_defaults. In other words: move all entries from MediaWiki:Gadget-HotCat.js/my that do not appear in MediaWiki:Gadget-HotCat.js/de to my:MediaWiki:Gadget-HotCat.js/local_defaults.
- Third, do not localize
HotCat.category_canonical
. Evidently the Burmese wiki is not set up to have localized namespace names, that's why [[ကဏ္ဍ:**]] doesn't work. Usually HotCat is smart enough to figure out the correct prefix to use on its own.
- Thanks for your explanation. After making changes to MediaWiki_talk:Gadget-HotCat.js/my, it works perfectly. Cheer! Ninja✮Strikers «☎» 09:12, 11 February 2016 (UTC)
Cannot autosave?
Hello team HotCat, it's been reported[6] on the Cantonese Wikipedia that HotCat doesn't auto-save after modifications are made, instead opening the wikitext edit screen with the new version of the text. I am able to reproduce the problem and have come to report it. Deryck Chan (talk) 22:40, 7 February 2016 (UTC)
- This is configurable. Probably somebody configured it so. Lupo 14:31, 8 February 2016 (UTC)
No suggestions
Hi, I can't get Hotcat to give a list of suggestions when adding cats, am using ipad safari, please advise. Atlantic306 (talk) 21:19, 22 March 2016 (UTC)
Hotcat cannot save on my own wiki.
This is my code in MediaWiki:Gadget-HotCat.js
mw.loader.load( '//commons.wikimedia.org/w/index.php?title=MediaWiki:Gadget-HotCat.js&action=raw&ctype=text/javascript' );
The hotcat user interface can display normally. But when I try to save, there is a pup-up window which displays 0. And I cannot save the result. LesleyLai (talk) 15:02, 10 May 2016 (UTC)
"Hotcat" and «Hotcat» use
Hello. 1, 2. Possible finder work with any type? "" and «» ? Thanks НоуФрост (talk) 18:57, 13 July 2016 (UTC)
- Have the problem with quotes. In ruwiki (and probably in other interwikis) names of many categories contains the quotes '«»'. These symbols impossible (or too hard) to input with keyboard. Easy to input the common quotes " but gadget checking it as different from «», so does not find categories with '«»'. Could you make check «» and " as identical? --Vladis13 (talk) 19:33, 13 July 2016 (UTC)
- I join the request. It's a matter of a big debate and confusion in the Russian Wikipedia, because most users don't use various kinds of typographic keyboard layouts, though «» quotes are a requirement for texts in Russian ("" are automatically changed to «» thanks to the instrument widely used in ruwiki called Wikificator). Substitution of «» with "" works in case of the search bar, but not in case of HotCat. Jack who built the house (talk) 21:02, 13 July 2016 (UTC)
Too many empty lines
When categorizing an uncategorized file, the corresponding template is being removed (but not the line where the template used to be). In addition, an empty line plus a line containing the new category are added (example). Could it please be fixed? --Leyo 21:40, 10 August 2016 (UTC)
Avoiding [[category:[[category:...]]]]
Hi everybody, on Commons there are many files that contain [[category:[[category:...]]]].[7] When analyzing the reason for it i found out that many stem from HotCat. I think a user just copies and pastes the category including the leading "category:" or even with the squared brackets resulting in such edits.[8]. Wouldn't it an improvement to strip away those elements before adding the category? Best regards, --Arnd (talk) 05:59, 19 August 2016 (UTC)
Do not re-add buttons when part of the page is reloaded
Steps to reproduce:
- Go to any file description page with a multi-page document, e.g. File:1921 год Доклад о состоянии протезного завода.pdf.
- Select a different page from the dropdown on the right.
Note that now all the links to add/remove/edit categories are duplicated. They should only be created when the page is completely updated, not on every partial update. --Schnark (talk) 09:15, 13 September 2016 (UTC)
Avoid using deprecated code
Since MW 1.28, this gadget causes the following warning in the console on every page it is loaded (I've seen this on ptwiki): Use of "Map-values" is deprecated. mw.Map#values is deprecated. Use mw.Map#get() instead. Helder 13:30, 28 October 2016 (UTC)
- Should be fixed: [9]. Matma Rex (talk) 13:51, 28 October 2016 (UTC)
Categorysorting
Are there a way to add new categories in correct order inbetween other categories which has been added in an earlier edit ? For example adding that + -sign right next to that | -character ? So that you don't have to sort the categories in a new wanted order without going into the usual edit-mode to organize them ? Best of wishes from Migrant (talk) 17:58, 14 November 2016 (UTC)
Compatiblitiy with Refreshed skin
My wiki uses the Refreshed skin as default, but HotCat does not work there (it is working fine on Vector and Monobook). I'd imagine its something to do with Refreshed using different elements (like a "main" element for #content rather than a div) but I don't know how to fix it.
Here is an article on the wiki: http://coasterpedia.net/wiki/Six_Flags
Thanks, NemesisAT (talk) 17:25, 8 January 2017 (UTC)
Please ignore, as it appears to now be working.NemesisAT (talk) 18:05, 8 January 2017 (UTC)
Not working with NWE
Marked as stalled in Phabricator, so I will put it here: https://phabricator.wikimedia.org/T154397 --Stryn (talk) 20:55, 12 January 2017 (UTC)
- This gadget is using the wikipage.content hook incorrectly. It fires with a $element argument, to which all subsequent actions should be scoped. ESanders (WMF) (talk) 11:29, 22 January 2017 (UTC)
- Done Fixed by Ed: [10] Matma Rex (talk) 21:14, 22 January 2017 (UTC)
Interaction with page buttons
Hello, HotCat is one of my favorite tool. However, I noticed since a long time something annoying for me.
When I use the 2 verticals arrows to get some propositions of upper- and under-categories, the list of propositions hides partially behind some of the normal page buttons (Modify, History, etc). In that case, I cannot choose any of the proposition with the mouse (moving with keyboard arrows is ok). It seems like a problem with the z-index in the style sheet. Pmau (talk) 21:46, 25 February 2017 (UTC)
Help
@Lupo: @ESanders (WMF): Hello! How to translate 'removed Category:...using HotCat', 'added Category:...using HotCat' in local wiki ?. - Otogi (talk) 14:04, 4 March 2017 (UTC)
- Place translations on the local Wiki in a page "MediaWiki:Gadget-HotCat.js/local_defaults". The Hungarian localizations are a good template: hu:MediaWiki:Gadget-HotCat.js/local_defaults. Copy that to your local Wiki and replace the texts as appropriate. Lupo 12:22, 6 March 2017 (UTC)
@Lupo: Yes i try, but doesn't work (ka:mediawiki:Gadget-Hotcat.js/local defaults). See history of page "added Category", "using HotCat" it isn't translated. - Otogi (talk) 13:24, 6 March 2017 (UTC)
- When HotCat tries to get ka:Mediawiki:Gadget-Hotcat.js/local defaults, it gets back a successful but empty response. No idea why. The same request does send back the data without problems when I try it on the Hungarian or German Wikis. Seems to be something peculiar to the Georgian Wiki. Sorry, I can't help you further with this. Lupo 10:41, 7 March 2017 (UTC)
- Otogi, you have placed the local defaults using the spelling Hotcat, but shouldn't it be HotCat (upper case C)? I don't actually know how the script works, so I may have gotten it wrong. Peter Alberti (talk) 14:42, 7 March 2017 (UTC)
- Thanks to all! Trivial problem! I have created new MediaWiki:Gadget-HotCat.js/local defaults (with a capital letter). Problem solved. Thanks @Lupo: , @Peter Alberti: . - Otogi (talk) 10:01, 8 March 2017 (UTC)
Request
@Lupo: This suggestion was made on IRC, by DragonflySixtyseven, and he asked me to actually make the request. The gadget understands the template {{Uncategorized}}, and it's various synonyms, and removes it when the issue is fixed. It would be convenient if it treated the various subcategories of Category:Media needing categories by subject the same way, and would automatically remove them. I think that hardcoding an actual list would be problematic, but I'd think it would be possible to actually look for 'is it in a subcategory of...' and remove that if the editor confirms the action. Hopefully that would not be too complicated. - Reventtalk 19:27, 19 March 2017 (UTC)
- I do not have the time to implement new features in HotCat. But maybe someone else would like to? Lupo 13:09, 20 March 2017 (UTC)
The API used for edit seemed to be ancient and undocumented
I inspected the post request of a hotcat edit. The body includes these fields, and it differs very much from what is documented [11]
POST https://en.wikipedia.org/w/index.php?title=...&action=edit
wpTextbox1
model
format
wpSummary
wpWatchthis
wpAutoSummary
wpEdittime
wpStarttime
wpSave
oldid
hcCommit
wpEditToken
wpUltimateParam
Golopotw (talk) 03:53, 9 April 2017 (UTC)
- Sorry I didn't notice that hotcat POST to index.php. While the API I mentioned was api.php. Golopotw (talk) 07:55, 9 April 2017 (UTC)
- @Golopotw: Can you please be moor precise? It is calling the regular api. --Steinsplitter (talk) 08:00, 9 April 2017 (UTC)
- @Steinsplitter: Relevant lines can be found by searching "action=edit" in the source. The implementation is at line 2904. Golopotw (talk) 09:18, 9 April 2017 (UTC)
- @Golopotw: Can you please be moor precise? It is calling the regular api. --Steinsplitter (talk) 08:00, 9 April 2017 (UTC)
line 860: // Create a form and submit it. We don't use the edit API (api.php?action=edit) because // (a) sensibly reporting back errors like edit conflicts is always a hassle, and // (b) we want to show a diff for multi-edits anyway, and....
- For searching it is using the api (/api.php?format=json&action=query&list=categorymembers), what you want to tell us? You mean using the POST for edits is deprecate? The script has no real maintainer. --Steinsplitter (talk) 09:27, 9 April 2017 (UTC)
- When it add a page to category it post to
/w/index.php&action=edit
rather than/w/api.php
. Just point this out. I was confused, but as of now I am not arguing that anything should change since if it works it works. Golopotw (talk) 11:42, 9 April 2017 (UTC)
Remove empty sortkeys
Extended content
|
---|
Please, change line 1974: v = v.replace(/^(\s|_)+/, ""); // Trim leading blanks and underscores to: v = v.replace(/^(\s|_)+(.)/, "$2"); // Trim leading blanks and underscores |
The motivation is to be able to remove empty sortkeys like [[Category:Wikipedia| ]]
. Matěj Suchánek (talk) 18:18, 3 May 2017 (UTC)
- Found workaround, moreover I doubt this would "fix" the problem. Matěj Suchánek (talk) 15:56, 4 May 2017 (UTC)
JS error
I've enabled this gadget in voy:it:, but I've been informed that it triggers TypeError: span.firstChild is null for line if (span.firstChild.nodeType !== Node.ELEMENT_NODE) return null;) --Andyrom75 (talk) 15:11, 11 May 2017 (UTC)
Backwards compatibility
Maintaining such distant backwards compatibility is going to make the code bloat as APIs change upstream and we have to keep supporting old and new versions. It would be easier just to provide links to old snapshots for people who want to use this with old MW versions, e.g.
This gadget is compatible with MediaWiki 1.27+, older versions are available below: <=1.26: https://commons.wikimedia.org/w/index.php?title=MediaWiki:Gadget-HotCat.js&oldid=211134664
ESanders (WMF) (talk) 10:35, 24 May 2017 (UTC)
HotCat and NWE
Hi! Can anyone adjust HotCat so that it might work with the new 2017 wikitext editor? Currently it doesn't. If you try to do any action with this tool, the editor will open, and no changes are saved (you would have to do them manually) --Piramidion (talk) 09:23, 27 May 2017 (UTC)
Truncating category symbol and number of files
- There is implemented truncating of "Category: " at the start of the string.
- Though, sometimes user copy-pasted name of category with the symbol of category and number of files, e.g. "► 175 Sobornyi Avenue, Zaporizhzhya (13 F)".
- It seems it worth to cut also in the category inputbox:
- symbol of category with space at the beginning "► "
- number of files at the end, e.g. " (13 F)"
- It seems, there is some constant in the mediawiki core for symbol of category, though dirty workaround could be as follow:
.replace(/^\u25BA\s?/g, "");
- Unfortunately I cannot suggest second regexp, because letter "F" is localized and represents in a different way in the different languages of UI.
--Movses (talk) 08:24, 12 June 2017 (UTC)
HotCat not working properly
In the last week or two, HotCat has been failing to operate properly. In the pest, it would auto-suggest existing categories based on the first few letters, e.g. typing Pinus sy would result in Pinus sylvestris appearing automatically. This has only been working intermittently recently, resulting in edits like this which then need a follow-up edit to complete the category by typing out in full - tedious and time-wasting. Anyone know what's gone amiss, please? - MPF (talk) 23:34, 14 June 2017 (UTC)
Handling of duplicate categories
Let's say there is a page with following categories:
[[Category:Category A|key]]
[[Category:Category B|key]]
[[Category:Category A|different key]]
The page in Category A is sorted under D, it gets the last occurrence and ignores other duplicate occurrences. But HotCat edits the first occurrence, first key. Therefore if I edit a key for Category A using HotCat (e.g. I change key to anotherkey), nothing changes in sorting of pages in Category A and the page is still under D. --Dvorapa (talk) 11:48, 18 June 2017 (UTC)
noinclude cats on DR
Hi,
When adding a category with HotCat on a deletion request, would it be possible that the gadget also automatically adds the noinclude tags?
Thanks. --Thibaut120094 (talk) 11:58, 16 July 2017 (UTC)
Do not re-add buttons when part of the page is reloaded
See the this previous report and mine on Phabricator. In summary: every time when I switch between preview and editing on a page, it appears one more + icon. Could you fix it? Bencemac (talk) 11:41, 27 July 2017 (UTC)
Plural forms?
I was typing "Pine nu...", and it suggested:
- Category:Pine nut -- non-existing, not OK;
- Category:Pine nuts -- redirected category, OK;
- etc. -- doesn't matter.
IMHO, it shouldn't suggest non-existent categories like (1). --Djadjko (talk) 00:41, 3 August 2017 (UTC)
ESLint changes broke HotCat entirely for me
@ESanders (WMF): I don't know what Special:Diff/253969250 and Special:Diff/253969410 are supposed to do, but they broke HotCat for me. I now get this error in my JS console:
JavaScript parse error: Parse error: Unexpected token; token 3 expected in file 'MediaWiki:Gadget-HotCat.js' on line 2904
Could someone please revert or otherwise correct the issue? Thanks, IagoQnsi (talk) 19:28, 2 August 2017 (UTC)
@ESanders (WMF): same for me. --Herzi Pinki (talk) 19:44, 2 August 2017 (UTC)
- Same here. Hotcats doesn't appear anymore on any page for me. --Rhadamante (talk) 19:45, 2 August 2017 (UTC)
- Same for me. --Off-shell (talk) 19:52, 2 August 2017 (UTC)
I've undone the changes. Any Commons administrator could also have done that. Matma Rex (talk) 20:35, 2 August 2017 (UTC)
- Thanks - looks like it triggered a bug in the PHP JSParser which didn't come up in my test rig. Have fixed and re-deployed. ESanders (WMF) (talk) 22:20, 2 August 2017 (UTC)
- @ESanders (WMF): still seems to behave oddly to me (Chrome, Windows 10). As in, not at all... Effeietsanders (talk) 23:54, 2 August 2017 (UTC)
- Doesn't work properly for me (FF, W8). I can add a category, not modify the ones already there. Rhadamante (talk) 00:10, 3 August 2017 (UTC)
- Ah, no, never mind. The categories I could not modify were in fact created by a model. Rhadamante (talk) 00:16, 3 August 2017 (UTC)
- @ESanders (WMF): The functions are still not fully recovered, or with the words of Tuvalkin (cf. Special:Diff/253988581/253997519): “Not responding to all keyboard commands, but responding to some, some times. Savvy users will know that to use Hot-Cat productively to add a single cat to a page (and thus enjoying the one-click publish advantage) very often, when one navigates parent or child chats, up- and down-arrow key input is unavoidable. That functionality is, at the moment, still broken, making categorization (explicitly careful categorization, be it either with full dissimination, which needs ↓, or having checked for soft-redirects, which needs ↑) much harder and time-consuming than before. Please fix!” I second this. As example you could start to input
gadget
in a sandbox and then try to select another popupped category with cursor keys. — Speravir – 03:19, 3 August 2017 (UTC)- Thanks, fixed. ESanders (WMF) (talk) 09:31, 3 August 2017 (UTC)
- And thank you for the fix, ESanders.— Speravir – 15:33, 3 August 2017 (UTC)
- Thanks, fixed. ESanders (WMF) (talk) 09:31, 3 August 2017 (UTC)
- @ESanders (WMF): still seems to behave oddly to me (Chrome, Windows 10). As in, not at all... Effeietsanders (talk) 23:54, 2 August 2017 (UTC)
Removing dead code
As we have bumped the MW dependency to 1.27, we can remove all the jQuery polyfill code next. ESanders (WMF) (talk) 22:41, 5 August 2017 (UTC)
{{Edit request}} Hello, some administrator could please add the Mirandese translation of HotCat? Here is the translation code link. Thanks and greetings from the Portugese community. Athena in Wonderland (talk) 04:15, 9 August 2017 (UTC)
- Athena in Wonderland, it is wise to add an edit request template to this section, I just did it for you. (See also the notice here on top, when you are in edit mode.) — Speravir – 00:52, 15 August 2017 (UTC)
- Done Awesome! Thanks!! --Hedwig in Washington (mail?) 00:01, 19 August 2017 (UTC)
Shortcuts broken
Hi, shortcuts seem to be broken since some time in the last 48 hours. My common.js file clearly defines "ia" as a shortcut for "in Austria", so this and this should have expanded accordingly, but didn't. It seems to still have worked yesterday morning CEST (I'm 99.9% sure I used the shortcut to make that edit). Any advice? darkweasel94 16:08, 21 September 2017 (UTC)
- (same user as above) This may be Firefox-specific. I tried it with different accounts, browsers, operating systems and computers, and it always happened in Firefox (52.3.0 on Linux and 55.0.3 on Windows) and never in Chrom(ium|e) or Konqueror. Darkweasel-testo (talk) 16:49, 21 September 2017 (UTC)
- @Darkweasel94 and Darkweasel-testo: with your settings, I had it too. It's due to JSconfig being undefined sometimes by the time that your script is being parsed. Unfortunately it seems few of the gadgets and scripts of Commons are being maintained right now. There is also advice to use .bind() to configure your settings, while .bind() has been discouraged since 2011. —TheDJ (talk • contribs) 19:34, 21 September 2017 (UTC)
- @Darkweasel94 It looks like MediaWiki:Common.js on this wiki defined
JSconfig
inside a callback, which doesn't always run before user scripts. I've made a revision that fixes that. Can you try again? --Krinkle 19:53, 21 September 2017 (UTC)- Looks like it's working. I had to clear my cache though. Thank you! darkweasel94 19:55, 21 September 2017 (UTC)
Unicode
When adding/deleting/editing a single category (i.e., post with auto-save), I'm seeing this error: "It appears that your browser does not support Unicode. It is required to edit pages, so your edit was not saved." This just started showing up today. Browser is Firefox 55.0.3 (32-bit) running on Windows 7. If I edit multiple categories (i.e., requires a manual save), there is no issue. Thanks. —howcheng {chat} 20:30, 27 September 2017 (UTC)
- I get the same error, starting today (about 2 hours ago). I'm also using Firefox 55.0.3 on Win 7. The normal edit window works just fine, but this takes more time, limiting the value of HotCat. Josh (talk) 20:45, 27 September 2017 (UTC)
- im getting it too. Artix Kreiger (talk) 20:48, 27 September 2017 (UTC)
- Done This is a temporary general problem. Better going to VP. Probably phab:T67297 -- User: Perhelion 21:14, 27 September 2017 (UTC)
- Bad scene on both Firefox and Chrome. I'll give up using commons today. When will it be fixed? cheers, Daderot (talk) 22:40, 27 September 2017 (UTC)
- im getting it too. Artix Kreiger (talk) 20:48, 27 September 2017 (UTC)
Fixed with these two edits. MaxSem (WMF) (talk) 23:13, 27 September 2017 (UTC)
- It is working correctly, thanks! Josh (talk) 19:05, 28 September 2017 (UTC)
Multiple “Add new category” and “Modify several categories” links on partial page reload
See here and here. Anyone? --Tacsipacsi (talk) 16:45, 1 October 2017 (UTC)
- See the latest comment on Phabricator. Thanks! Bencemac (talk) 07:04, 7 October 2017 (UTC)
- @Bencemac and Tacsipacsi: Is it working now? I can't reproduce this bug. -- User: Perhelion 14:55, 7 October 2017 (UTC)
- Perfect, thank you very much! Bencemac (talk) 15:12, 7 October 2017 (UTC)
Editing fully protected pages
Copied over from w:WP:VPT
I made this edit to a fully-protected article, not realising said article had been fully protected. Since the edit could potentially be seen as admin abuse (using ability to edit to impose my edit where a non-admin could make said edit or revert it), would it be possible to tweak HOTCAT so that it brings up the edit page on trying to save, thus alerting the editor that the article is fully protected. This would give the editor the chance to bail out of the edit and go to the article talk page. For the record, I reverted the edit after discussion at the talk page. It was not my intention when making the edit to use my tools to gain an advantage. Mjroots (talk) 18:10, 27 October 2017 (UTC)
Empty lines issue
{{Editprotected}} When a category is added to an uncategorized file, not only is the template replaced by the category, but also two empty lines are being added (see e.g. Special:Diff/279086193, Special:Diff/279087041). Could someone please fix this minor issue? --Leyo 22:17, 12 January 2018 (UTC)
- Done Thank you! -- User: Perhelion 23:16, 12 January 2018 (UTC)
Fail on talk page
load.php?debug=true&lang=de&modules=ext.gadget.HotCat&only=scripts&skin=vector&version=16oosgl:1348 Uncaught TypeError: Cannot read property 'appendChild' of undefined at CategoryEditor.initialize (load.php?debug=true&lang=de&modules=ext.gadget.HotCat&only=scripts&skin=vector&version=16oosgl:1348) at new CategoryEditor (load.php?debug=true&lang=de&modules=ext.gadget.HotCat&only=scripts&skin=vector&version=16oosgl:1240) at setup (load.php?debug=true&lang=de&modules=ext.gadget.HotCat&only=scripts&skin=vector&version=16oosgl:2850) at Object.HotCat.start (load.php?debug=true&lang=de&modules=ext.gadget.HotCat&only=scripts&skin=vector&version=16oosgl:2974) at /w/api.php?format=json&callback=HotCat.start&action=query&rawcontinue=&titles=MediaWiki_talk%3AGadget-DelReqHandler.js&prop=info%7Crevisions&rvprop=content%7Ctimestamp%7Cids&meta=siteinfo&rvlimit=1&rvstartid=282971825:1
var line is undefined on 1348. -- User: Perhelion 18:24, 26 January 2018 (UTC)
Minor edits
Hello, when I edit a category page with HotCat to add or remove the page's parent categories, the edits are marked as minor. I think it's wrong. Adding/removing parent categories to a category page should never be marked as minor. Please change it. Thanks! --NaBUru38 (talk) 20:16, 31 January 2018 (UTC)
- @NaBUru38: instructions for changing the minor-edit-marking preference are on the documentation page, near the middle—you can find it quickly by searching for “minor“. Further, any time you want to override the default behaviour, just click the (+) before any other controls and the edit will be treated as multiple, so you’ll be sent to the standard Editing window even if you only make a single change.—Odysseus1479 (talk) 02:20, 1 February 2018 (UTC)
- Hello, my proposal is specific about namespaces. If the user adds or removes a parent category from a page, the edit should not be marked as minor if the page is a category, and it should be marked as minor if the page is in another namespace. The option you mention applies to all namespaces. --NaBUru38 (talk) 16:22, 1 February 2018 (UTC)
Tag HotCat edits
Could someone change the gadget so that it tags its own edits with e.g. a "hotcat" tag (to be created locally on Commons) similarly to how frwiki's version does since 2015? This would allow all wikis which import the gadget to filter its edits on recent changes. See also MediaWiki talk:Gadget-HotCat.js/Archive04#Tag. Helder 17:58, 29 December 2017 (UTC)
- To filter out, you mean? I frequently use the gadget, specifically its left (++) button, to create a seed of an «action=edit» (with changes of categories already in the textarea and edit comment field). Then I elaborate it and save with several other changes. Hiding HotCat edits would be a good idea only for the non-edit-form one-change mode. Incnis Mrsi (talk) 10:00, 30 December 2017 (UTC)
- This differentiation is technically possible. But should we do not ask wider for such project tag!? If HotCat gets a tag, of course CatAlot should be become this too (which had already such tag... but removed, seemingly not working @Steinsplitter: ) -- User: Perhelion 14:03, 30 December 2017 (UTC)
- Certainly. Cat-a-lot first, then HotCat’s one-change mode may arguably be subsumed by the same tag. Incnis Mrsi (talk) 15:02, 30 December 2017 (UTC)
- Yep, although that would depend on phab:T114555 for usage directly on wikis (but we can use CSS with the class
.mw-tag-hotcat
for now ). Helder 19:23, 30 December 2017 (UTC)
- This differentiation is technically possible. But should we do not ask wider for such project tag!? If HotCat gets a tag, of course CatAlot should be become this too (which had already such tag... but removed, seemingly not working @Steinsplitter: ) -- User: Perhelion 14:03, 30 December 2017 (UTC)
Done@He7d3r and Incnis Mrsi: and thanks to Steinsplitter. -- User: Perhelion 16:45, 28 January 2018 (UTC)- The update went bad (note tagging of a non-HotCat edit). Incnis Mrsi (talk) 17:18, 28 January 2018 (UTC)
- Done On BETA is the fixed version for test. -- User: Perhelion 15:24, 30 January 2018 (UTC)
- The change is now live here in production as well (Special thanks to Perhelion), a summary is here: Help:Gadget-HotCat#Tacking. --Steinsplitter (talk) 18:51, 13 February 2018 (UTC)
- Done On BETA is the fixed version for test. -- User: Perhelion 15:24, 30 January 2018 (UTC)
- The update went bad (note tagging of a non-HotCat edit). Incnis Mrsi (talk) 17:18, 28 January 2018 (UTC)
- @Perhelion: I just noticed that when I make multiple changes the “using HotCat” hypertext still appears in the edit summary field, then suddenly disappears when I hit “Publish“. It‘s a little disconcerting; can it not be added in the first place? Or is it needed to trigger the tagging action? If the latter, could someone prevent tagging simply by removing (or changing) that part of the ES?—Odysseus1479 (talk) 03:34, 3 April 2018 (UTC)
- @Odysseus1479: preventing tagging is a feature, not a bug. See my December comment. If one is sophisticated enough to edit summaries, then this user may use its clone of HotCat to avoid tagging; but again, I don’t see any potential for disruption in such scenarios. Incnis Mrsi (talk) 17:19, 3 April 2018 (UTC)
Edit summary
Why does Wikipedia prompt me to change the edit summary and show me a preview now? Shouldn’t HotCat perform each edit without having to open an edit summary?
This happens when removing categories or using the do-multiple-things-at-once feature. Interqwark talk contribs 01:36, 16 June 2018 (UTC)
Edit edit summaries
Could a way to change the edit summaries please be added? I would like to change WP:HC to WP:HotCat, -
to −
, “added” to “Added,” and “removed” to “Removed.” (Or, perhaps, these changes could be done universally.) Interqwark talk contribs 01:36, 16 June 2018 (UTC)
Hot cat doesn't work if added cat is a redirect
When I add two cats with hotcat and the second added cat is a redirect, then the first added cat turns automaticly into the second added cat and after using the save-button only one cat is added.
BUT: It doesn't happend every time
- If the redirect is added at first and the "normal" cat at second. It works well and the redirect is automaticly changed into the redirecet cat
- If I use the OK-Button for adding the cat, the problem doesn't occur
- I used different cats to create the failure again. with some cats, that I added first, the failure didn't occur. (with the cat "Dresden" there was no failure with the cat "Dresden (Boeing 747)" the failure occured.
- the redirecting cat was "Coat of arms" (redirected to "Coats of arms")
do you need more information? have a look at the attached file. greetings --Z thomas 16:37, 5 July 2018 (UTC)
HotCat on Slovene Wikipedia
Slovene Wikipedia uses the imported HotCat from Commons, however there is a problem with buttons which are not shown exept for the ending "+" button. As one user noticed all buttons are shown correctly only in articles, which "mistakenly" uses the english name of category namespace, i.e. [[Category:
instead of Slovene [[Kategorija:
(see the article Komunikacijski podatki for example). Any help is appreciated. --Janezdrilc (talk) 01:35, 25 July 2018 (UTC)
- @Janezdrilc: sl:MediaWiki:Gadget-HotCat.js/local defaults appears to have been copied from German Wikipedia. HotCat.category_regexp should be
'[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]|[Kk][Aa][Tt][Ee][Gg][Oo][Rr][Ii][Jj][Aa]'
(it means Category or Kategorija, upper-, lower- or mixed-case). HotCat.template_regexp should, similarly, be'[Tt][Ee][Mm][Pp][Ll][Aa][Tt][Ee]|[Pp][Rr][Ee][Dd][Ll][Oo][Gg][Aa]'
. So the relevant section should look like this:(I hope I didn’t make any typo, but even if I did, it won’t break anything apart from HotCat.) You may also change its content model to JavaScript so that it’s treated appropriately by MediaWiki. —Tacsipacsi (talk) 10:23, 25 July 2018 (UTC)HotCat.category_regexp = '[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]|[Kk][Aa][Tt][Ee][Gg][Oo][Rr][Ii][Jj][Aa]'; HotCat.category_canonical = 'Kategorija'; HotCat.categories = 'Kategorije'; HotCat.disambig_category = 'Razločitev'; HotCat.redir_category = 'Preusmeritev kategorije'; HotCat.uncat_regexp = null; HotCat.template_regexp = '[Tt][Ee][Mm][Pp][Ll][Aa][Tt][Ee]|[Pp][Rr][Ee][Dd][Ll][Oo][Gg][Aa]'; HotCat.template_categories = {};
Thank you very very much. It works. Just one more question. Is it possible that all translatable messages would be part of Translatewiki.net project? It's much easier to make a translation with Translatewiki platform. --Janezdrilc (talk) 17:50, 25 July 2018 (UTC)
- Yes, it’s planned to be implemented in the next few decades. For this short time, you can rely on the central translation at MediaWiki:Gadget-HotCat.js/sl, remove the translations that are identical, and as for Commons admin help if you think the translation on Wikipedia is better than the translation on Commons. If you do this, Commons and Wikipedia users will get the same messages. (If a message key doesn’t exist on the Commons page, don’t bother it: most probably it’s because that should in the content language, not the interface language.) —Tacsipacsi (talk) 21:43, 25 July 2018 (UTC)
- @Tacsipacsi, Janezdrilc, and Sporti: That should definitely not be the fix (which I've already yesterday locally) because
HotCat.category_regexp
is a replace regexp, but in this case there is no canonical name 'Kategorija' to replace, so this 'wrong regexp' never hit anyway! HotCat.category_regexp and HotCat.template_regexp should also not be needed here as they are get correct localized anyway (so the/local_default
overwrites the correct strings). - The fix should be definitely at line 584
nameSpace = matches[ 0 ].match[ 1 ] || nameSpace;
as the'Category' (= matches[ 0 ].match[ 1 ])
got used before'Kategorija' (= nameSpace = HC.category_canonical)
- -- User: Perhelion 06:44, 26 July 2018 (UTC)
- @Tacsipacsi, Janezdrilc, and Sporti: That should definitely not be the fix (which I've already yesterday locally) because
Avoid accidental edits
To avoid accidental edits, Hotcat should require an explicit save of the changes even if only one change is made. At present, single category changes are automatically saved without user intervention being possible. --Schlosser67 (talk) 05:07, 24 August 2018 (UTC)
- No, it shouldn't (in fact I'd prefer if there were an option to also auto-save on multiple changes, in order to save time). If you want that behavior for you, then you can configure it that way. I don't care what is the default, but I strongly oppose removing the current default behavior as an option. Tokfo (talk) 05:42, 24 August 2018 (UTC)
- Actually, a semi-auto-save (i.e. hit "save" and be done) after multiple changes might indeed be a good idea. In such a case we know that we have changed things, and if we are satisfied with what we see in the categories bar, we do not necessarily need the edit screen. But what with slow network connections, hardware issues, crowded displays and the like, a single change can be accidental. Perhaps as a compromise, there could be two buttons: one "Save straight away" and one "Edit further details", the former causing the category changes to be saved, the other bringing up the edit screen, so thta one could e.g. update the description of a file. --Schlosser67 (talk) 06:03, 24 August 2018 (UTC)
- We could add an opt-in checkbox for this!? -- User: Perhelion 06:08, 24 August 2018 (UTC)
- Might work. Depends on what one is supposed to opt in. But that's something people need to know about for it to work. --Schlosser67 (talk) 13:07, 24 August 2018 (UTC)
- We could add an opt-in checkbox for this!? -- User: Perhelion 06:08, 24 August 2018 (UTC)
- Actually, a semi-auto-save (i.e. hit "save" and be done) after multiple changes might indeed be a good idea. In such a case we know that we have changed things, and if we are satisfied with what we see in the categories bar, we do not necessarily need the edit screen. But what with slow network connections, hardware issues, crowded displays and the like, a single change can be accidental. Perhaps as a compromise, there could be two buttons: one "Save straight away" and one "Edit further details", the former causing the category changes to be saved, the other bringing up the edit screen, so thta one could e.g. update the description of a file. --Schlosser67 (talk) 06:03, 24 August 2018 (UTC)
“Accidental edits” are more a problem for casual users or newbies some of whom take HotCat’s (+) for the section=new
button rendered as
in some skins. IMHO the gadget should have some deterrence against activation on any talk (odd-namespace) page. Incnis Mrsi (talk) 12:26, 24 August 2018 (UTC)
- Yes, I have quite often seen newbies attempting to start a user-talk thread by clicking the rightmost (+) symbol and typing away in the new-cat field. Anyway, you can always force an “explicit save” by clicking the (++) symbol on the left before making any changes to the categories.—Odysseus1479 (talk) 23:24, 25 August 2018 (UTC)
- Not only casual users. See above, sometimes it is a hardware or networking question - you click somewhere in the page to be able to scroll, but it hasn't fully loaded yet, and hey presto, you've accidentally removed a category. --Schlosser67 (talk) 07:16, 27 August 2018 (UTC)
Setting list size fails
When setting a custom list size for HotCat, I still get the default 5-line display. All other settings work as expected, included advanced stuff like custom shortcuts. I tried both methods with window.hotcat_list_size = 10;
and JSconfig.keys['HotCatListSize'] = 10;
, both fail. Is this a known bug or am I doing something wrong? My browser is Chrome for Mac, in case that has an impact. — JFG (talk) 10:23, 3 September 2018 (UTC)
- @JFG: I don’t know how
JSconfig
works, but the plainwindow
version’s variable name used underscore in the documentation, while camelCase in the actual code. It should work aswindow.hotcat_listSize = 10
. —Tacsipacsi (talk) 13:47, 3 September 2018 (UTC)- Hey, that worked, many thanks! Need to update the documentation or the code, or both! – JFG (talk) 14:11, 3 September 2018 (UTC)
- OK, we could achieve consistency with other documented user config variables by editing line 2694 thus:
HC.listSize = window.hotcat_list_size || window.hotcat_listSize || config.HotCatListSize || HC.listSize;
- (keeping the camel case option for people who already figured it out). I'd gladly do this but am not allowed to edit here. @Tacsipacsi: Would you be able to perform the update? – JFG (talk) 14:28, 3 September 2018 (UTC)
While we're on this subject, I've been frustrated by the arbitrary limitation to 15 items displayed. I noticed that the max value is hardcoded at line 2773: HC.listSize = Math.min( HC.listSize, 15 );
Could this be extended to say 30 lines, and placed in a named variable such as maxListSize
, for easy reference by future programmers? – JFG (talk) 14:28, 3 September 2018 (UTC)
I’ve already updated the documentation to reflect the reality. I don’t have the right to change the gadget itself; only interface admins (10 people) can do that. I don’t know why is the limit of 15 lines (maybe because it would get out of the screen?), so I don’t know whether it’s a good idea to change it. —Tacsipacsi (talk) 15:46, 3 September 2018 (UTC)
- @Xaosflux: As a valiant IAdmin, could you give this easy fix a go? – JFG (talk) 07:10, 4 September 2018 (UTC)
- Oh gosh, xaosflux is IAdmin on enwiki, and this is commons. Let's try Guanaco or Ymblanter. Hi! – JFG (talk) 07:12, 4 September 2018 (UTC)
- Looking into it.--Ymblanter (talk) 07:13, 4 September 2018 (UTC)
- @JFG and Tacsipacsi: Done, pls have a look and let me know if it needs to be fixed.--Ymblanter (talk) 07:29, 4 September 2018 (UTC)
- The change on the documentation should be reverted and
hotcat_listSize
removed, as this change seems made by me with no intention. Sorry for that (in fact, camelCase is the modern JS and Wikimedia recommendation. I checked all other global window.hotcat_, listSize is the only. Anyway configuration via the directwindow
object is also very outdated.) -- User: Perhelion 10:05, 4 September 2018 (UTC)- @Perhelion: Are you sure that nobody uses the camelCase version, not even outside of Wikimedia? —Tacsipacsi (talk) 10:38, 4 September 2018 (UTC)
- No, but it's high unlikely that someone used it (change was made this year), if already on Commons nobody used it (I checked). It was never documented. (Anyway, Wikimedia also removes long year undocumented variables without warning.) Thanks for attention. -- User: Perhelion 10:51, 4 September 2018 (UTC)
- OK, although maybe checking at least around Wikimedia would be worth (if you have access to mwgrep). I haven’t found this edit, so I’ve had no idea when did you change it. —Tacsipacsi (talk) 11:39, 4 September 2018 (UTC)
- Great, thanks.--Ymblanter (talk) 11:41, 4 September 2018 (UTC)
- No, but it's high unlikely that someone used it (change was made this year), if already on Commons nobody used it (I checked). It was never documented. (Anyway, Wikimedia also removes long year undocumented variables without warning.) Thanks for attention. -- User: Perhelion 10:51, 4 September 2018 (UTC)
- @Perhelion: Are you sure that nobody uses the camelCase version, not even outside of Wikimedia? —Tacsipacsi (talk) 10:38, 4 September 2018 (UTC)
- The change on the documentation should be reverted and
- Oh gosh, xaosflux is IAdmin on enwiki, and this is commons. Let's try Guanaco or Ymblanter. Hi! – JFG (talk) 07:12, 4 September 2018 (UTC)
Works great, much more comfortable to navigate long category sequences now. Thanks Ymblanter! — JFG (talk) 14:45, 4 September 2018 (UTC)
- Sure, but this is actually mostly Perhelion--Ymblanter (talk) 15:12, 4 September 2018 (UTC)
- Thanks Perhelion then! — JFG (talk) 17:22, 4 September 2018 (UTC)
Change configuration loading to avoid loading executable code from a page that can be edited without being an interface administrator
Hi,
editing sitewide Javascript code has been limited to interface administrators, but the way HotCat loads configuration settings circumvents that and should be changed.
The simplest option would be to make sure all page names end in .js
(e.g. MediaWiki:Gadget-HotCat.js/local_defaults.js
instead of MediaWiki:Gadget-HotCat.js/local_defaults
) and mass-rename the existing files (and maybe decide the page name based on wiki version, to avoid breaking third-party wikis which hotload from Commons).
The nicest option would be to convert the configuration to JSON and rename it to .json
instead. That's more work but the ability to change config settings is less restricted. --Tgr (talk) 15:38, 9 September 2018 (UTC)
Extending functionality to stub templates
I wanted to make a request to try and extend some of the HotCat functionality to stub templates. So, being able to add or remove stub templates, a search function, and maybe some navigation options (similar to the up and down arrows). Some of these features are sort of implemented here. -Furicorn (talk) 00:55, 29 October 2018 (UTC)
(+) in TALK namespaces
MediaWiki_talk:Gadget-HotCat.js/Archive04 #Avoid_accidental_edits was archived without any action taken, whereas the problem of unhealthy prominence of the gadget’s UI in TALK (odd-numbered) namespaces persists. See a fresh example: Revision of User_talk:Jameslwoodward. Incnis Mrsi (talk) 21:23, 19 February 2019 (UTC)
- Done, on talk namespace the autocommit is default now off, which can be overwritten anyway per user config. (But not working on discussion pages on project namespace like VP.) @Schlosser67, Tokfo, and Odysseus1479: -- User: Perhelion 11:34, 20 February 2019 (UTC)
- PS: On the other hand we could disable the autocommit in general for "non-confirmed" users, like on the EnWP!? en:MediaWiki:Gadget-HotCat.js/local_defaults -- User: Perhelion 11:57, 20 February 2019 (UTC)
something not working
Nothing happens when I try to change the sort order of any category, such as from this "Fluvial landforms in Europe|*" to this "Fluvial landforms in Europe", in other words removing the |*. I do not get an edit completion message and must open up and edit the category directly. Fixing this would help. Thanks Hmains (talk) 03:03, 22 February 2019 (UTC)
- This seems to be by design. Although I don’t know how the gadget exactly works, it doesn’t change the sort key if it’s entirely dropped (I suppose it’s because it’s much more common that it‘s accidentally removed while changing just the category itself), but it does change (remove) if only the key text itself is removed (e.g. the input‘s content is Fluvial landforms in Europe|). —Tacsipacsi (talk) 01:29, 23 February 2019 (UTC)
- Well yes, but I can hope. Hmains (talk) 05:54, 23 February 2019 (UTC)
Timeless skin
I think HotCat doesn't work for Timeless skin. emijrp (talk) 19:07, 5 March 2019 (UTC)
Misplaced LTR marks
It seems that HotCat unneccesarily adds LTR marks and then FrescoBot cleans them up. --bdijkstra (overleg) 08:23, 8 March 2019 (UTC)
HotCat loses categories doing multiple redirecting
Standardly, when categories are edited using HotCat, more fields can be open (without OK click) and the "Save" button saves all changes correctly.
However, when more than one used categories are redirected, the screen displays all of them correctly redirected at first, but in the next step when the whole page is opened to edit, only the last of the redirected category tags is kept and all the previous are disappeared. --ŠJů (talk) 22:57, 2 May 2019 (UTC)
(phab:T222376 was closed as invalid)
Hotcat removes "categorize" template, but doesn't mention that in edit summary
Hello, hotcat removes categorize template on adding a category, but that isn't mentioned in the edit summary. I recall hotcat used to add this in edit summary, why was that feature removed? Thanks! --Martin Urbanec (talk) 22:03, 4 May 2019 (UTC)
Noinclude
Hello, likely not be the biggest problem in the world, but to have an option to put a category using HotCat, inside the <noinclude></noinclude> tags would may be a good thing IMO, (example). Regards, Christian Ferrer (talk) 11:49, 5 May 2019 (UTC)
[BUG] cat name disappears
On Category:Commons YouTube resources, the cat name Commons resources would be hidden, leaving four buttons behind.--Roy17 (talk) 17:53, 23 July 2019 (UTC)
- Would be hidden when doing what, exactly? --bdijkstra (overleg) 18:12, 23 July 2019 (UTC)
Edit request
HC.capitalizePageNames = ( json.query.general[ 'case' ] === 'first-letter' );
change it to if (!HC.capitalizePageNames) HC.capitalizePageNames = ( json.query.general[ 'case' ] === 'first-letter' );
This makes it possible to configure this setting, without it being overridden by a default. Amir E. Aharoni (talk) 12:57, 15 August 2019 (UTC)
- Done Diff. Discussed in-person, and implemented differently than originally requested, but the issue you were having on ka.wikipedia.org should now be fixed! --Krinkle 13:21, 15 August 2019 (UTC)
Confirming (-)
Hello everyone,
Nowadays pressing (-) removes the category immediately. It is inconvenient as you may want to press another button, but press (-) by mistake not willing to remove that category, which would require reverting the edit afterwards. Is there an opportunity to write a confirm message like "Are you sure you want to remove the category [Categoryname]?" Thanks in advance. ----Joél be back (talk) 17:12, 30 August 2019 (UTC)
- There are some configuration options that might get you what you want. See Help:Gadget-HotCat#User_configuration, particularly "HotCatNoAutoCommit" and "HotCatDelNeedsDiff". Tokfo (talk) 19:14, 30 August 2019 (UTC)
- Where and what should I write?--Joél be back (talk) 08:35, 31 August 2019 (UTC)
- The technique I've always used for this has been to tell HotCat I want to add a category, and then tell it I want to remove one. That way it'd start accumulating a multiple action. --Pi zero (talk) 21:44, 4 September 2019 (UTC)
Importing HotCat from Commons
I tried to import HotCat to wiki.openstreetmap.org using Windows and Ubuntu with Firefox. After saving, the page ends right before the second letter of the Unicode string "ℳ𝒲♥𝓊𝓃𝒾𝒸ℴ𝒹ℯ" and I do not get any indicator why the rest of the page is missing. This appears on JavaScript pages only. I tested copying HotCat to my Common.js in WM Commons and it worked here. I already confirmed that I did not trigger an AbuseFilter on wiki.openstreetmap.org.
Any idea what could cause that? FellTiger (talk) 22:17, 21 February 2020 (UTC)
- @FellTiger: The Unicode character "𝒲" is outside of the w:Basic Multilingual Plane (BMP; in other words, it's an "astral character"). Looks like your wiki's MySQL database was incorrectly set up to use the
utf8
charset, which can't store astral characters, rather thanutf8mb4
, which can. - You can try replacing
"ℳ𝒲♥𝓊𝓃𝒾𝒸ℴ𝒹ℯ"
with"\u2133\ud835\udcb2\u2665\ud835\udcca\ud835\udcc3\ud835\udcbe\ud835\udcb8\u2134\ud835\udcb9\u212f"
to get around this. But you will run into the same issue with many other characters, particularly emoji; for example, if anyone tries to add 💩 to any page on your wiki, that page will be cut off at that spot. Here's an article that describes the database problem and how to fix it: https://mathiasbynens.be/notes/mysql-utf8mb4 Matma Rex (talk) 22:42, 21 February 2020 (UTC)
Hotcat removing added categories
Hi, I hope this is the right location to report this. When using HotCat and adding a category with a redirect, it overwrites the first category added with HotCat. In the edit summary it retains the correct category? Edited to add that I use Brave and Chrome and it only seems to happen if the added categories are not separately confirmed before clicking "save". -- Deadstar (msg) 10:40, 10 March 2020 (UTC)
Making HotCat.js compatible with new skin, Timeless
Hi,
I've been using HotCat a lot, on Commons and other projects. I recently switched to Timeless skin, for readability purpose... but HotCat does not work anymore in this skin.
Is it possible to adapt it to Timeless skin, please ? --Hsarrazin (talk) 10:54, 9 April 2020 (UTC)
- Support - I did not even actively switch to Timeless ... seems it's the new default skin, isn't it? --dealerofsalvation 17:19, 13 May 2020 (UTC)
- No, it isn’t the default skin; the default is still the good old Vector. Timeless is in fact quite difficult to support, especially when working with categories—category links have three different places depending on the screen resolution (on the botttom on narrow screens, on the left on medium screens and on the right on wide screens), so one has to insert CatScan’s link in all these places and synchronize between them. Not impossible, but neither a trivial change. —Tacsipacsi (talk) 01:03, 15 May 2020 (UTC)
Making Hot Cat easier to use
At the moment when I click on hot cat for a category, it opens a drop-down box with five choices, and a scroll bar to make other choices accessible. Given that many categories have 100 or more subcategories to chose from, this makes finding others by scrolling very difficult: a tiny touch of the scroll button and suddenly you're 20 subcategories lower or higher, and missed the others inbetween.
Suggestion: please make Hot Cat tall enough to show 50 choices at a go from the drop-down, not just 5. MPF (talk) 15:04, 16 June 2020 (UTC)
- Oppose Use the dedicated user setting (either
JSconfig.keys['HotCatListSize']
orwindow.hotcat_list_size
in your common.js or systemwide in your global.js), cf. Help:Gadget-HotCat. — Speravir – 03:20, 28 June 2020 (UTC)
{{Edit request}} in COM:VP RZuo brought up the idea to increase the default to 10 (in this massive edit). — Speravir – 18:36, 30 June 2020 (UTC)
- @Speravir: Thanks! I didn't know there was any option to set the number; perhaps this option needs to be more prominently advertised in the Hot Cat info? While I'd prefer to be able to set to 50 lines, the 30 maximum currently allowed certainly helps a lot. - MPF (talk) 21:44, 30 June 2020 (UTC)
- Never mind, MPF. — Speravir – 22:09, 30 June 2020 (UTC)
- @Speravir: Thanks! I didn't know there was any option to set the number; perhaps this option needs to be more prominently advertised in the Hot Cat info? While I'd prefer to be able to set to 50 lines, the 30 maximum currently allowed certainly helps a lot. - MPF (talk) 21:44, 30 June 2020 (UTC)
- The number listsize has been increased from 5 to 10. Multichill (talk) 13:22, 7 August 2020 (UTC)
Eliminiere LTR-Marks
Hallo @Didym: Ich ping Dich hier einfach mal an, weil Du als Benutzeroberflächenadministrator Deutsch sprichst. Immer wieder kommt es vor, dass bei der Benutzung von HotCat wild Zeichenketten (Kategoriebezeichnungen) aus Wikipedia-Listen kopiert werden. Da die Listen mit LTR- und RTL-Schriften klar kommen müssen, sind diese Kategoriebezeichnungen mit einer endenden LTR-Mark versehen worden (siehe w:de:Bidirektionaler Text in Bezug auf w:de:H:SPUK). Bei der Kopie dieser Bezeichnung kommt es immer wieder vor, dass diese Marks mit übernommen werden, und dann mit HotCat in hunderten Artikeln zugleich transportiert werden, wo sie gar nicht hingehören. Das sieht dann so aus: [[Category:FooBar[LTR]]]. [LTR] wäre hier das überflüssige LTR-Zeichen. Wir haben eine Lösung gefunden, das Problem zu eliminieren, indem die LTR-mark entfernt wird, mit einer zusätzlichen Zeile im .js-Code.
Und zwar in Zeile 2084: v = v.replace(/\u200E$/, ''); // Trim ending left-to-right mark
Sowohl @DerHexer and Giftpflanze: waren bei der Ausarbeitung behilflich und wissen darüber auch bescheid. Ich würde mich auf eine Antwort freuen. Liebe Grüße, Doc Taxon (talk) 19:55, 15 October 2020 (UTC)
- Das Problem sollte damit gelöst sein. --Didym (talk) 21:49, 17 October 2020 (UTC)
Box above page line
If HotCat drop-down box reaches the upper line (below navigational bookmarks: File, Talk, Edit...) of the page (it happens on empty category pages), it is not possible to click on categories in the box above that line. A fix would be welcome. — Draceane talkcontrib. 15:08, 20 October 2020 (UTC)
Add debounce on api calls
It would be good to apply a debounce technique when calling the API, instead of just delaying the api call. If the user continues typing, there's no need to call the api for suggestions on every keystroke (hammering the server unnecessarily), but instead do only one call every suggest_delay.
This technique is described here: https://css-tricks.com/debouncing-throttling-explained-examples/#debounce
I've implemented it here, with the bonus that there will be one call every suggest_delay even if the user doesn't stop typing. --Ciencia Al Poder (talk) 15:26, 22 November 2020 (UTC)
Mobile view
Categories in mobile view now behave like in Desktop view. But HotCat doesn't work correctly, for example category suggestions are barely readable. --Discostu (talk) 09:24, 12 June 2021 (UTC)
Yes, I have this exact same issue, and it's driving me nuts. The suggestions get jumbled due to overlapping the underlying text, can't read anything or click anything properly. The older version where it would take you to a new page for adding / removing categories was much better. STC1 (talk) 03:55, 10 July 2021 (UTC)
Deprecated API queries
Can someone stop this version of HotCat doing action=query&prop=info&intoken API queries that are deprecated?
See phab:T286551/phab:T280806.
Thanks!
Reedy (talk) 20:35, 3 August 2021 (UTC)
- I've done it now ;) - [12] Reedy (talk) 20:43, 3 August 2021 (UTC)
- @Reedy it doesn’t seem to be working. I fixed a missing character in the URL, but I still get “Uncaught TypeError: can't access property "csrftoken", json.query.tokens is undefined” when loading a file page. Lucas Werkmeister (talk) 21:00, 3 August 2021 (UTC)
- I’ve added |tokens to another API URL, but it still doesn’t work, because apparently HotCat uses callback style to make API requests, and you’re not allowed to get tokens in that mode, IIUC. I’ll see if I can rework that. Lucas Werkmeister (talk) 21:05, 3 August 2021 (UTC)
- I think it’s working again now. Lucas Werkmeister (talk) 21:09, 3 August 2021 (UTC)
- I’ve added |tokens to another API URL, but it still doesn’t work, because apparently HotCat uses callback style to make API requests, and you’re not allowed to get tokens in that mode, IIUC. I’ll see if I can rework that. Lucas Werkmeister (talk) 21:05, 3 August 2021 (UTC)
- @Reedy it doesn’t seem to be working. I fixed a missing character in the URL, but I still get “Uncaught TypeError: can't access property "csrftoken", json.query.tokens is undefined” when loading a file page. Lucas Werkmeister (talk) 21:00, 3 August 2021 (UTC)
Not respecting minordefault preference
Hi, the gadget is currently not respecting the minordefault preference. The line
minorEdits = json.query.userinfo.options.minordefault === 1;
should be changed to
minorEdits = json.query.userinfo.options.minordefault === '1';
Thanks! --Porplemontage (talk) 18:37, 10 September 2021 (UTC)
Error induced by local_defaults sub-page (SOLVED)
I have had HotCat running on MW-1.31 but after upgrading to 1.35 I simply cannot get it to work. It has been hot-loaded from Commons but even statically copying the source code does not work.
In LocalSettings.php, there is $wgUseInstantCommons = true; which should do for enabling cross-origin resource sharing, right? The Gadgets extension is activated and HotCat can be enabled in the user settings. However, it does not appear to function at all.
Activating Debugging including a log-file does not show anything special. Any hints on how to track down the error? Thanks in advance! --Sm8ps (talk) 12:34, 16 July 2021 (UTC)
- @Sm8ps: Do you mean $wgDebugLogFile? That doesn’t record JavaScript errors like gadgets’ errors. Instead you should use client-side debugging tools. —Tacsipacsi (talk) 14:54, 16 July 2021 (UTC)
- @Tacspacsi: Thank you so much for your valuable answer! Indeed, I had set up $wgDebugLogFile and your hint made it clear to me that I had to take the client side approach. Below is the error message I get. Am I the only one experiencing this issue? I shall double-check everything in a short while. — Preceding unsigned comment added by Sm8ps (talk • contribs) 15:37, 16 July 2021 (UTC)
17:29:58.669 Uncaught ReferenceError: wgArticleId is not defined
So here is what I have found out.
- The source page MediaWiki:Gadget-HotCat.js does indeed look for
conf.wgArticleId
whereconf
essentially equalsmw.config.get( 'wgServer' )
. In my LocalSettings.php I had had$wgServer = "https://mediawiki.my.domain";
. Removing the protocol part "https:" (but leaving the two slashes as explained in Manual:$wgServer made this error go away and HotCat works an Firefox mobile. - However, it does not work on a desktop version of Firefox. Instead, the error is simply replaced by a different one -- and several things like the ability to edit pages break. The new error complains that the
GET https://mediawiki.my.domain/index.php/mediawiki.my.domain/index.php?title=MediaWiki%3AGadget-HotCat.js%2Flocal_defaults&action=raw&ctype=text/javascript
results in HTTP/2 403 Forbidden which is easy to understand as the URL contains twice the part "mediawiki.my.domain/index.php/". However, I have at best a very faint idea of what could be the cause. - I have come to wits' end. I tried playing around with
$wgServer = "https://mediawiki.my.domain";
and$wgScriptPath="";
to no avail. — Preceding unsigned comment added by Sm8ps (talk • contribs) 18:16, 16 July 2021 (UTC)
- @Sm8ps: Really weird, I have no idea either what’s going on. Hopefully someone else will know it. —Tacsipacsi (talk) 20:45, 16 July 2021 (UTC)
OK, here comes the solution to this very specific problem! I had imported a non-functional version of the page 'MediaWiki:Gadget-HotCat.js/local defaults'. Presumably I had been following the instructions from https://incubator.wikimedia.org/wiki/MediaWiki:Gadget-HotCat.js/Documentation#Installing_HotCat_on_another_Wiki -- however I cannot tell for sure. The Javascript error resulted from that page but did show up in the debugger console as related to the main Gadget-HotCat.js, probably because that one imports the local defaults page. Deleting that page solved the problems. --Sm8ps (talk) 09:03, 6 November 2021 (UTC)
automatically putting new categories inside <noinclude> tags for DRs?
I noticed that some users are automatically adding <noinclude> tags when using HotCat to categorize deletion requests. However, this does not happen for me. How do I configure HotCat to insert <noinclude> tags and place new categories inside them for certain pages?
Thanks. Ixfd64 (talk) 06:07, 1 October 2021 (UTC)
- @Ixfd64: I don’t think it’s possible. However, if you disable autocommit – either one-off by clicking the (++) link before the (+) link, or permanently by putting
window.hotcat_no_autocommit = 1;
in your common.js or global.js file –, you’re brought to the edit form with the category preloaded, and you can manually add the tags. This means two page loads instead of one, but HotCat still helps with autocomplete. —Tacsipacsi (talk) 11:46, 2 October 2021 (UTC)
- Thanks. I'm guessing those users are manually adding the <noinclude> tags before saving the page. Ixfd64 (talk) 17:49, 2 October 2021 (UTC)
API deprecation notice about rvslots
The response contains an api deprecation notice.
Because "rvslots" was not specified, a legacy format has been used for the output. This format is deprecated, and in the future the new format will always be used.
For both use of rvprop=content
the param rvslots=main
should be added. Also page.revisions[ 0 ][ '*' ]
must changed to page.revisions[ 0 ][ 'slots' ][ 'main' ][ '*' ]
.
The mediainfo slot does not support categories and is ignored in that case. This is untested. Der Umherirrende (talk) 21:29, 14 January 2022 (UTC)
Global Localization for Thai
HotCat: Global Thai Localization
Based upon w:th:MediaWiki:Gadget-HotCat.js/local_defaults (Diff ID 9337615), which is the main localization of HotCat for Thai language Wikis. Most of the texts below are unchanged from the original.
//<syntaxhighlight lang="javascript">
/*
* HotCat: Global Thai Localization
*
* Based upon //th.wikipedia.org/w/index.php?title=MediaWiki:Gadget-HotCat.js/local_defaults
* , which is the main localization of HotCat for Thai language Wikis. Most of the texts are
* unchanged from the original in the first revision of this JS page.
*
* As of the creation of this page, some sister projects localization have not been updated
* to the current revision (ID 9337615) of Thai Wikipedia's localization yet.
*
* (Credits according to local_defaults' history in each projects)
* Credits WP: B20180, Jutiphan, Nullzero
* Credits WS: Sasakubo1717, Geonuch
* Credits WB: Sasakubo1717, Geonuch
* Credits WikT: Sasakubo1717, Octahedron80
* Credits WQ: Sasakubo1717, B20180
* Credits UN: Patzagorn Y? (Patsagorn Y.)
*/
/* global HotCat */
// Layout from ../en
// Localizations of a few HotCat user interface texts.
if (window.HotCat) {
HotCat.messages.commit = 'บันทึก';
HotCat.messages.ok = 'ตกลง';
HotCat.messages.cancel = 'ยกเลิก';
HotCat.messages.multi_error = 'ไม่สามารถดึงข้อความที่ต้องแก้ไขจากระบบได้ การเปลี่ยนหมวดหมู่ไม่สามารถดำเนินการได้ ขออภัยในความไม่สะดวก';
HotCat.categories = 'หมวดหมู่';
HotCat.engine_names.searchindex = 'ดัชนีการค้นหา';
HotCat.engine_names.pagelist = 'รายการหน้าทั้งหมด';
HotCat.engine_names.combined = 'ค้นหารวมกลุ่ม';
HotCat.engine_names.subcat = 'หมวดหมู่ย่อย';
HotCat.engine_names.parentcat = 'หมวดหมู่หลัก';
HotCat.tooltips.change = 'แก้ไข';
HotCat.tooltips.remove = 'นำออก';
HotCat.tooltips.add = 'เพิ่มหมวดหมู่ใหม่';
HotCat.tooltips.restore = 'ย้อนการแก้ไข';
HotCat.tooltips.undo = 'ย้อนการแก้ไข';
HotCat.tooltips.down = 'เปิดหน้าต่างแก้ไขและแสดงหมวดหมู่ย่อย';
HotCat.tooltips.up = 'เปิดหน้าต่างแก้ไขและแสดงหมวดหมู่หลัก';
HotCat.multi_tooltip = 'แก้ไขหลายหมวดหมู่พร้อมกัน';
// Localize these messages to the main language of your Wiki.
//
// TODO FOR LOCAL: According to //commons.wikimedia.org/wiki/Help:Gadget-HotCat#Localization , this should be
// copied over to ((wgServer + /w/index.php?title=MediaWiki:Gadget-HotCat.js/local_defaults))
// TODO FOR LOCAL: Replace next line with: if (window.HotCat) {
if (mw.config.get('wgContentLanguage') === 'th') {
HotCat.messages.cat_removed = 'ลบ[[:หมวดหมู่:$1]]';
HotCat.messages.template_removed = ''; // According to original local localization, this is unused and is set as null.
HotCat.messages.cat_added = 'เพิ่ม[[:หมวดหมู่:$1]]';
HotCat.messages.cat_keychange = 'เปลี่ยนการเรียงลำดับใน[[:หมวดหมู่:$1]] ให้เรียงด้วย "$2"'; // $2 is the new key
HotCat.messages.cat_notFound = 'ไม่พบหมวดหมู่ "$1"';
HotCat.messages.cat_exists = 'มีหมวดหมู่ $1 อยู่แล้ว ไม่เพิ่มหมวดหมู่';
HotCat.messages.cat_resolved = ' (แก้เปลี่ยนทางของ[[:หมวดหมู่: $1]]แล้ว)';
HotCat.messages.uncat_removed = 'ลบป้าย {{ต้องการหมวดหมู่}}';
// ----
// Some text to append to the edit summary (tagline). Named 'using' for historical reasons.
// --
// TODO FOR LOCAL: Uncomment |HotCat.messages.using| and edit it for each sister projects
// Use local_defaults, below is from Thai Wikipedia, but sister projects use different ones
// HotCat.messages.using = 'ด้วย[[วิกิพีเดีย:ฮอทแคต|ฮอทแคต]]';
// ----
// $1 is replaced by a number. If your language has several plural forms (c.f. [[:en:Dual (grammatical form)]]);
// you can set this to an array of strings suitable for passing to mw.language.configPlural().
// If that function doesn't exist, HotCat will simply fall back to using the last
// entry in the array.
HotCat.messages.multi_change = '$1 หมวดหมู่';
// These are in the local localization, but not on global en loc. These are probably
// still in use to this day due to regex difference in |HotCat.uncat_regexp|
HotCat.category_regexp = 'หมวดหมู่'; //ไม่ใช้ Regex เพราะปกติการเพิ่มหมวดหมู่พิมพ์เป็นภาษาไทย แต่หากเดิมเนมสเปซนี้พิมพ์เป็นชื่ออื่น HotCat จะไม่แก้หมวดหมู่หรือแก้คำให้
HotCat.category_canonical = 'หมวดหมู่';
HotCat.disambig_category = 'แก้ความกำกวม';
HotCat.redir_category = 'หมวดหมู่เปลี่ยนทาง';
HotCat.uncat_regexp = /\{\{(uncategorized|ต้องการหมวดหมู่)\}\}|\{\{(((article|multiple)\ )?issues?|ข้อควรปรับปรุงของบทความ|ขคปป\.)\|(uncategorized|ต้องการหมวดหมู่)=yes\}\}|\|(uncategorized|ต้องการหมวดหมู่)=yes/i ;
HotCat.template_regexp = 'แม่แบบ';
HotCat.template_categories = {};
}
}
//</syntaxhighlight>
Add it to MediaWiki:Gadget-HotCat.js/th please. Thanks. --Bebiezaza (talk) 15:53, 26 May 2022 (UTC)
Dropped-categories bug
As first reported here, there is an annoying tendency to change and then drop user-input categories, seemingly at random. Upon confirming the new HotCategorized categories with the "Save" button, it may happen that the first of the new categories gets exchanged for another new category; which then leads subsequently to dropping the one that gets changed in the Edit dialog. This may or may not have something to do with the editing line still open (it gets closed automatically when you use the Save button). This bug has undone some work from me for months, but I couldn't reproduce it until today, in the case of the attached screenshot-series. Sorry that I cannot provide any technical insight into the problem. --Enyavar (talk) 23:00, 4 February 2022 (UTC)
- @Enyavar: Did you mean this bug? Standardly, when categories are edited using HotCat, more fields can be opened (without OK click) and the "Save" button saves all changes correctly. However, when more than one target categories are redirected, the screen displays all of them correctly redirected at first, but in the next step when the whole source page is opened to edit, only the last of the redirected category tags is kept and all the previous are disappeared. Multiple redirects don't work correctly. Probably, some variable used for redirects is not distinguished and is ovewritten by the next one. To prevent this, the user must first confirm each category change separately with the OK button before pressing Save button for the entire change group (if he is not sure that none of the newly linked categories is redirected).
- @Lupo: Unfortunately, Phabricator reportedly has no project in which this bug could be solved. I was referred here to this local site.--ŠJů (talk) 15:01, 11 June 2022 (UTC)
- It makes sense to me now that the category-redirects have to do with this. I am treading much more carefully with this already and more often needlessly click "ok". The rate this bug happens to me has dropped to only once a day or so, and I usually catch it after it happened. What I am not sure about is that bit with "more than one target categories are redirected". I am certain I have had this bug two days ago with just two categories, and only the latter one was a redirect which I had confirmed, and the first one was the correct category which was still dropped upon saving. --Enyavar (talk) 16:45, 11 June 2022 (UTC)
A hint to a user attempting to remove a sort key
As discussed in MediaWiki_talk:Gadget-HotCat.js/Archive02#Removing_of_sort_key, sort key removal is quite esoteric in HotCat (I only found our the right way today myself). Could we please notify user what's happening if "an existing sort key from the source is preserved when performing the edit" despite the user removing it? TBH, I would prefer that the sort key would actually be removed in that case in accordance to the principle of least astonishment, but can accept if it's not possible for some technical reasons. Ain92 (talk) 09:12, 9 July 2022 (UTC)
Cursor jumping to the end
I keep having trouble with the cursor jumping to the end of the input. It seems that whenever it automatically uppercases the first letter or removes leading whitespace/underscores, it moves the cursor to the end regardless of where the cursor was before. For example, if the current name is "Example" and the cursor is at the beginning:
- Pressing "a" turns into "AExample"
- Pressing the delete key turns into "Xample"
- Pasting a lowercase word like "another" turns into "AnotherExample"
- Pressing the space bar removes the space
and then the cursor moves to the end.
It looks like the problem is caused by sanitizeInput
and makeActive
in the textchange
function. The former changes the capitalisation and strips leading whitespace/underscores, and the latter moves the cursor to the end if actualValue.indexOf( expectedInput )
is false, which is the case when the values are the same (indexOf
is 0) or when the capitalisation is different (indexOf
is -1).
- Nikki (talk) 18:18, 27 July 2021 (UTC)
- +1, this bug is annoying. Let's hope it will be solved eventually. --Enyavar (talk) 13:58, 27 January 2022 (UTC)
- +1 indeed! -- Tuválkin ✉ ✇ 22:07, 28 January 2022 (UTC)
- +1 Can we please get some action on this - I mistakenly long thought it was an esoteric 'feature' PeterWD (talk) 11:01, 21 May 2022 (UTC)
- Let me absolutely second that! Ain92 (talk) 09:05, 9 July 2022 (UTC)
- +1 This bug is indeed annoying. Please try to solve this. (Other than that it's a great tool!) JopkeB (talk) 04:18, 20 October 2022 (UTC)
Hotcat in Categories.
For a large amount of time, hotcat didn't come up when looking at entries in Category space, now it seems to. I have no idea what I changed, any ideas?Naraht (talk) 16:00, 24 October 2022 (UTC)
- It has always worked for me in all namespaces (including Category), for manually added categories. Maybe previously you saw only categories automatically added by templates (e.g. {{Wikidata Infobox}})? Those cannot be modified using HotCat, since the tool could not remove the old category, as it’s not in the wikitext. —Tacsipacsi (talk) 00:46, 26 October 2022 (UTC)
Capital letters in Georgian
Hi! This gadget is being used in the Multilingual Wikisource to add categories to pages in the Georgian language (language code "ka"). There's an issue with it: It forces the first letter to be uppercase. For the particular case of Georgian, it causes severe issues because of various incompatibilities in how capital Georgian letters are implemented on various systems. For all practical purposes, the Georgian alphabet doesn't actually use uppercase letters at all in real life, but since they are technically available in Unicode, software sometimes assumes that what is needed for Latin, Cyrillic, Greek, and some other scripts, is also needed for Georgian, but that is not true.
I wish toUpper() and other letter case functions were smart enough to work correctly with Georgian, but unfortunately they aren't. The easiest thing to do is probably not to apply these functions to category names that begin with Georgian letters, from ა (U+10D0) to ჿ (U+10FF).
There were also similar bugs in MediaWiki extensions, e.g. TT208139 and TT230559, but HotCat probably requires a separate fix.
Thanks! :) Amir E. Aharoni (talk) 13:56, 5 January 2023 (UTC)
- Actually, now that I think of it, I have a vague recollection that this was resolved already (maybe by @TheDJ?) in 2019, but apparently, it's still broken in the Multilingual Wikisource. Amir E. Aharoni (talk) 14:07, 5 January 2023 (UTC)
- ... Indeed, it was done here by @Krinkle, but I'm pretty sure that @TheDJ was involved, too :)
- Anyway, evidently, that fix wasn't enough. Amir E. Aharoni (talk) 14:10, 5 January 2023 (UTC)
Don't show ++ before any categories have been added
Jidanni (talk) 01:11, 15 February 2023 (UTC)
Mobile compatibility
I know full well that this gadget was made mobile-friendly quite a while ago. Exactly when did it happen? And how can I make Wiktionary's version of HotCat mobile-friendly as well? (I'm really horrible with code, by the way.) BlunderGhoul (talk) 20:24, 25 August 2022 (UTC)
- For others who are not infinitely blocked on Wiktionary: it was enabled on mobile in June last year. I don’t know if any other steps were necessary, but I don’t want to spend more time finding it out until someone actually needs it. —Tacsipacsi (talk) 21:13, 26 August 2022 (UTC)
- Did it work when it was enabled? Because currently it doesn't work well for me on Commons. It shows "Categorieën (++): (+)" on every page, so I guess one can add categories but one doesn't know the current categories. bdijkstra (overleg) 09:08, 21 February 2023 (UTC)
- Existing categories appear – and still do appear – only if you have “advanced mode” enabled in Special:MobileOptions (if you also think this is ridiculous, your vote at m:Community Wishlist Survey 2023/Mobile and apps/Display the categories on the mobile site for everyone is very welcome!). It’s strange that HotCat also appears when existing categories don’t, I suppose no one tested non-advanced mode… —Tacsipacsi (talk) 20:59, 21 February 2023 (UTC)
- Did it work when it was enabled? Because currently it doesn't work well for me on Commons. It shows "Categorieën (++): (+)" on every page, so I guess one can add categories but one doesn't know the current categories. bdijkstra (overleg) 09:08, 21 February 2023 (UTC)
Enabling change tag at Czech Wikipedia's HotCat instance
Hello all! I tried to add a change tag (HotCat) at Czech Wikipedia, but I failed to figure out how to do so. I added a line to the local defaults file with no luck.
When evaluating HotCat.changeTag
in my browser console, I notice that the expression evaluates to HotCat
first, and then some other configuration is loaded and overrides it to an empty string. If I execute HotCat.changeTag = 'HotCat';
before saving an edit, it works.
Can I ask for help on how I can enable change tag for cs.wikipedia? Thanks!
CC @MIGORMCZ for awareness. Martin Urbanec (talk) 17:03, 19 February 2023 (UTC)
- @Martin Urbanec: I see the following line: while config is previously defined as
if ( conf.wgDBname !== 'commonswiki' ) HC.changeTag = config.HotCatChangeTag || '';
So it looks like it’s not really supported to override this at a per-wiki level, but you should be able to do it regardless. —Tacsipacsi (talk) 17:48, 19 February 2023 (UTC)// User configurations: Do this here, called from the onload handler, so that users can // override it easily in their own user script files by just declaring variables. JSconfig // is some feature used at Wikimedia Commons. var config = ( window.JSconfig !== undefined && JSconfig.keys ) ? JSconfig.keys : {};
- Seems mocking JSconfig did the trick! Thank you, @Tacsipacsi! Best, Martin Urbanec (talk) 18:03, 19 February 2023 (UTC)
- However, I think it’s rather a workaround than a solution (as JSconfig is for per-user configuration), HotCat should support it officially (e.g. by checking whether this tag exits using the query+tags API module instead of assuming that it exists only on Commons). —Tacsipacsi (talk) 18:22, 19 February 2023 (UTC)
- Certainly agreed, but it works for now, and I'm too lazy trying to write a patch for HotCat. If it ever happens, feel free to ping me so I can remove the local hack. Martin Urbanec (talk) 18:27, 19 February 2023 (UTC)
- However, I think it’s rather a workaround than a solution (as JSconfig is for per-user configuration), HotCat should support it officially (e.g. by checking whether this tag exits using the query+tags API module instead of assuming that it exists only on Commons). —Tacsipacsi (talk) 18:22, 19 February 2023 (UTC)
- Seems mocking JSconfig did the trick! Thank you, @Tacsipacsi! Best, Martin Urbanec (talk) 18:03, 19 February 2023 (UTC)
Mouse required
I note that just using TAB and ENTER and the arrow keys, one can almost get to a "Checkmarked" state. But try this: type in a unique category's name, but don't type the full name. Anyway the mouse is still required to select the full name. That's too bad web accessibility-wise. Jidanni (talk) 01:26, 16 March 2023 (UTC)
- OK, I think I solved it. Never mind. Jidanni (talk) 11:43, 17 March 2023 (UTC)
Why does HotCat always edit conflict?
Why does HotCat always edit conflict? Every time after I manually edit a page and then want to categorize, an edit conflict pops up. This is a bug and really irritating! How can it be fixed? ɱ (talk) 23:18, 30 March 2023 (UTC)
Not working with Timeless skin
Hi, is it normal that HotCat does not work with Timeless ? Thanks for your help. M0tty (talk) 23:19, 18 April 2023 (UTC)
Localizaion Update Requset (ar)
Please see update requset here, thx --Mohanad (talk) 14:45, 16 June 2023 (UTC)
Language suffix on translatable pages
Dear maintainers,
For multilingual wikis, it would be nice HotCat automatically adds {{#translations:}}
after category name when someone adds a category on a translatable page.
I don’t know how to efficiently check whether the page is translatable from JS. -- Pols12 (talk) 14:38, 17 June 2023 (UTC)
- It’s quite easy to check whether the current page is translatable:
mw.config.get('wgTranslatePageTranslation') === 'source'
. However,{{#translation:}}
(in singular!) should only be used if the category itself is also translatable (there may be categories that contain too few pages to make it sense to translate them), which may not be this easy and efficient. (However, efficiency is not that important for the second check – it runs only in the fraction of cases when the gadget is used on a translatable page.) —Tacsipacsi (talk) 19:09, 17 June 2023 (UTC)- On Meta-Wiki, translation pages should ever been located in translation categories, even for small categories. I thought those recommendations were shared through WM multilingual wikis. -- Pols12 (talk) 23:11, 17 June 2023 (UTC)
- Customs slightly differ between wikis (e.g. the usage of /Translations categories is AFAIK unique to Meta), but even as a Meta translation administrator, I disagree that categories for translatable pages should always, without exception, be translatable. For example, m:Category:Photography contains several pages, so it makes sense to have a category, but only a single one of them is translatable, so creating language-specific categories would mean none of the language-specific categories could contain more than one page, no matter how much of Meta content is translated into that language. Creating categories that don’t have the potential to group similar pages (because there’s only one “similar” page) doesn’t help navigation but increases the number of pages that need to be created, checked for vandalism etc. In wikis that have just a handful of translatable pages (e.g. oldwikisource: has as few as 22 translatable pages, of which zero are categories), the probability of a such cases is even higher. —Tacsipacsi (talk) 20:29, 18 June 2023 (UTC)
- Automatically adding #translation: could create some issues, so I understand it was a bad idea.
- However (out of topic), I disagree with your point of view: I don’t use #translation: expecting the category pages to be translated, I only want to clean the main category tree. In your example, m:Category:Photography, it is hard to notice “Whose Knowledge?/VisibleWikiWomen/2018” because it is lost in a forest of translation pages. -- Pols12 (talk) 21:47, 18 June 2023 (UTC)
- @Pols12: But if m:Whose Knowledge?/VisibleWikiWomen/ar was in m:Category:Photography/ar, one had no way to find m:Category:Photography or any of its parent categories without manually editing the URL (for which one needs to know that that’s the solution, which is far from being obvious). —Tacsipacsi (talk) 00:13, 5 July 2023 (UTC)
- Right. I didn’t think about this issue. So, in my opinion, translation pages should not be categorized, but display source page categories instead. -- Pols12 (talk) 09:37, 5 July 2023 (UTC)
- @Pols12: But if m:Whose Knowledge?/VisibleWikiWomen/ar was in m:Category:Photography/ar, one had no way to find m:Category:Photography or any of its parent categories without manually editing the URL (for which one needs to know that that’s the solution, which is far from being obvious). —Tacsipacsi (talk) 00:13, 5 July 2023 (UTC)
- Customs slightly differ between wikis (e.g. the usage of /Translations categories is AFAIK unique to Meta), but even as a Meta translation administrator, I disagree that categories for translatable pages should always, without exception, be translatable. For example, m:Category:Photography contains several pages, so it makes sense to have a category, but only a single one of them is translatable, so creating language-specific categories would mean none of the language-specific categories could contain more than one page, no matter how much of Meta content is translated into that language. Creating categories that don’t have the potential to group similar pages (because there’s only one “similar” page) doesn’t help navigation but increases the number of pages that need to be created, checked for vandalism etc. In wikis that have just a handful of translatable pages (e.g. oldwikisource: has as few as 22 translatable pages, of which zero are categories), the probability of a such cases is even higher. —Tacsipacsi (talk) 20:29, 18 June 2023 (UTC)
- On Meta-Wiki, translation pages should ever been located in translation categories, even for small categories. I thought those recommendations were shared through WM multilingual wikis. -- Pols12 (talk) 23:11, 17 June 2023 (UTC)
Enforced "advanced mode"
Hei hei! I reported an issue wrongly on Phabricator about this (details: phab:T340954), but due to gadget loading with the new mobile update, HotCat enforces "advanced mode" on mobile Wikipedia pages at least. Is there any way to prevent this from happening other than deactivating the gadget? 🤔 EdoAug (talk) 18:52, 3 July 2023 (UTC)
- Fixed now, apparently! EdoAug (talk) 23:50, 4 July 2023 (UTC)
- On a related note, the error message is not clear on what "AMC mode" is, or how you enable it. It took me several steps of Googling to figure out that it stands for "Advanced mobile contributions". Can we get an explanation added to the error (or at least a link to mw:Reading/Web/Advanced mobile contributions)? --Iiii I I I (talk) 03:00, 16 September 2023 (UTC)
Enter key
Hi, I'm finding that when I hit enter after typing in a category the page refreshes but the category isn't saved. This doesn't happen when I click the 'OK' button. Blythwood (talk) 07:58, 25 September 2023 (UTC)
- @Blythwood: Not unexpected. When you are typing in the category text area you will see that the text field is highlighted, which is where an "enter" would apply, and as that doesn't make sense so nothing occurs. If you instead hit your tab key, you will see that the highlight will move from the text field to the OK button, from which the enter key will action that function. Two fields cannot be active at the same time, and the search ahead, selection function of the list in HotCat is the priority. — billinghurst sDrewth 11:16, 25 September 2023 (UTC)
Press somekey to add another category?
Hi! Is there any key (or key combination) to OK the current inputbox and show a new inputbox to enter another category? It is useful for new pages. --Lopullinen 08:53, 14 October 2023 (UTC)
Intercepting HotCat to set watchlist expiry period
When using JavaScript to intercept the page edit that HotCat makes, is it possible to set the watchlist expiry period with code? I use a script that presets this for edits made with VE, but it would be nice if I could have HotCat work in a similar manner. StefenTower (talk) 22:53, 16 October 2023 (UTC)
TypeError: ip.insertRow is not a function
@Jon (WMF): Why did you include && ip
in this hotfix? If it was falsy, the function has already done an early return at line 2868.
By the way, I think the proper fix was removing || document.getElementById( 'wpDestFile' )
in line 2863 – #wpDestFile
is an <input>
, every other code path should find <table>
s (and HTMLTableElement
should have an insertRow method in all major browsers released in the past nine years). —Tacsipacsi (talk) 10:43, 28 October 2023 (UTC)
Cursor jumping to the end (discussion restored from Archive 04)
I keep having trouble with the cursor jumping to the end of the input. It seems that whenever it automatically uppercases the first letter or removes leading whitespace/underscores, it moves the cursor to the end regardless of where the cursor was before. For example, if the current name is "Example" and the cursor is at the beginning:
- Pressing "a" turns into "AExample"
- Pressing the delete key turns into "Xample"
- Pasting a lowercase word like "another" turns into "AnotherExample"
- Pressing the space bar removes the space
and then the cursor moves to the end.
It looks like the problem is caused by sanitizeInput
and makeActive
in the textchange
function. The former changes the capitalisation and strips leading whitespace/underscores, and the latter moves the cursor to the end if actualValue.indexOf( expectedInput )
is false, which is the case when the values are the same (indexOf
is 0) or when the capitalisation is different (indexOf
is -1).
- Nikki (talk) 18:18, 27 July 2021 (UTC)
- +1, this bug is annoying. Let's hope it will be solved eventually. --Enyavar (talk) 13:58, 27 January 2022 (UTC)
- +1 indeed! -- Tuválkin ✉ ✇ 22:07, 28 January 2022 (UTC)
- +1 Can we please get some action on this - I mistakenly long thought it was an esoteric 'feature' PeterWD (talk) 11:01, 21 May 2022 (UTC)
- Let me absolutely second that! Ain92 (talk) 09:05, 9 July 2022 (UTC)
- +1 This bug is indeed annoying. Please try to solve this. (Other than that it's a great tool!) JopkeB (talk) 04:18, 20 October 2022 (UTC)
I have restored this topic discussion, that was archived by archiveBot on 24April2023. The historic bug remains unresolved, and I hope that someone can help fix it.PeterWD (talk) 08:13, 1 June 2023 (UTC)
{{Edit request}} About 2100 lines into the script the following line of code can be found:
if ( this.text.value !== null && this.text.value !== v ) this.text.value = v;
This is what makes the cursor jump to the end. To avoid this please change it as follows:
if ( this.text.value !== null && this.text.value !== v ) {
var cursorPos = this.text.selectionStart;
this.text.value = v;
this.text.setSelectionRange( cursorPos, cursorPos );
}
Requested via de:WP:Reparatursommer#HotCat. Additional notes: Works in all supported browsers. You might wonder why I don't use selectionEnd, i.e. why I collapse the selection to a single cursor position. This is intentional so the user doesn't overwrite more and more stuff when they continue typing. --Thiemo Kreuz (WMDE) (talk) 14:04, 25 September 2023 (UTC)
- Done – @Nikki, Enyavar, Tuvalkin, PeterWD, Ain92, and JopkeB: Should be fixed now, sorry for the delay. (I mainly react to edit requests via watching the category, so if the template is added or removed to a page that already has another edit request so that the category doesn’t actually change, I’m liable to miss it, I’m afraid. No idea if other interface admins deal with this differently.) --Lucas Werkmeister (talk) 21:46, 2 November 2023 (UTC)
- looks good at first test, thanks a lot! --Enyavar (talk) 21:54, 2 November 2023 (UTC)
- Thanks, it works now good. JopkeB (talk) 03:35, 3 November 2023 (UTC)
Utilize `wpIgnoreBlankSummary`
{{Edit request}}
When the gadget is used with autocommit disabled, it displays the diff, showing changes that are to be saved. The summary field is pre-filled by HotCat and usually there's no need to alter it. However, MediaWiki prompts user that he hasn't entered the summary. This can be avoided if HotCat sends wpIgnoreBlankSummary=1
on its POST request to display the diff (documentation here). I'd be grateful if that field gets incorporated to the gadget (in function createCommitForm
as far I as understand the code). Msz2001 (talk) 15:07, 21 June 2023 (UTC)
- @Msz2001: I looked into this a bit, but I’m not very familiar with HotCat and wasn’t able to reproduce the issue you described. When I disabled autocommit, removing a category from File:PNG_Test.png sent me to the edit form (which I think is the expected behavior of disabling autocommit?), and then I was able to directly submit the edit there (without touching any of the fields) – MediaWiki didn’t complain about the edit summary, as (IIUC) you described above. Can you describe the steps to reproduce in more detail for me? Then I’ll try to see if
wpIgnoreBlankSummary=1
helps. Lucas Werkmeister (talk) 22:32, 3 November 2023 (UTC)- @Lucas Werkmeister: You need to enable Prompt me when entering a blank edit summary (or the default undo summary) in your preferences. —Tacsipacsi (talk) 11:27, 5 November 2023 (UTC)
- @Tacsipacsi: Thanks – I’ve tried that, but still got the same behavior…
- What I did:
- enabled
Prompt me when entering a blank edit summary (or the default undo summary)
in my preferences - added
window.hotcat_no_autocommit = true;
to my common.js - went to File: PNG Test.png
- clicked the “-” button after Category:ISA test
- on the resulting edit form, pressed Alt+Shift+S (
s
accesskey, i.e. save / publish)
- enabled
- and it was saved directly. Lucas Werkmeister (talk) 14:38, 5 November 2023 (UTC)
- @Lucas Werkmeister: Oh, I just realized – it’s not a problem on Commons, probably because the using [[Help:Gadget-HotCat|HotCat]] part of the edit summary is replaced by a tag, and removing that bit from the summary apparently counts as not using the “default undo summary”. Either you need to unset window.HotCat.changeTag, or test on a wiki where it’s not set (I believe it’s not set on dewiki, and I know for sure that it’s not set on huwiki). —Tacsipacsi (talk) 17:51, 5 November 2023 (UTC)
- @Tacsipacsi: I tried to reproduce the issue on dewiki (w:de:Benutzer:Lucas Werkmeister/common.js) but still wasn’t successful. If you can reproduce it on huwiki, and are able to test an edited version of the gadget yourself (if you can figure out where the
wpIgnoreBlankSummary
goes), I’d be willing to deploy that even if I can’t test the fix myself (assuming that the code change should be reasonably small). Lucas Werkmeister (talk) 19:09, 5 November 2023 (UTC)
- @Tacsipacsi: I tried to reproduce the issue on dewiki (w:de:Benutzer:Lucas Werkmeister/common.js) but still wasn’t successful. If you can reproduce it on huwiki, and are able to test an edited version of the gadget yourself (if you can figure out where the
- @Lucas Werkmeister: Oh, I just realized – it’s not a problem on Commons, probably because the using [[Help:Gadget-HotCat|HotCat]] part of the edit summary is replaced by a tag, and removing that bit from the summary apparently counts as not using the “default undo summary”. Either you need to unset window.HotCat.changeTag, or test on a wiki where it’s not set (I believe it’s not set on dewiki, and I know for sure that it’s not set on huwiki). —Tacsipacsi (talk) 17:51, 5 November 2023 (UTC)
- @Lucas Werkmeister Hi and sorry for not responding earlier. The request originally came from one of plwiki community members. Since we import HotCat from Commons, I posted it here (but, my bad, I didn't check that on Commons the summary logic works a bit different). The intent was to add another hidden input field to
createCommitForm
function (from line 3132). The modified version of HotCat (just forked) can be found on w:pl:Wikipedysta:Msz2001/HotCat.js. The only change is addition of line 3151. Msz2001 (talk) 20:09, 5 November 2023 (UTC)- I see, thanks – I’m assuming that pl:Special:Diff/71715787 represents a successful test of the edited version. Done. --Lucas Werkmeister (talk) 20:17, 5 November 2023 (UTC)
- Yeah, exactly (didn't prompt for the summary, so went as expected after the changes). Msz2001 (talk) 20:21, 5 November 2023 (UTC)
- I see, thanks – I’m assuming that pl:Special:Diff/71715787 represents a successful test of the edited version. Done. --Lucas Werkmeister (talk) 20:17, 5 November 2023 (UTC)
- @Lucas Werkmeister: You need to enable Prompt me when entering a blank edit summary (or the default undo summary) in your preferences. —Tacsipacsi (talk) 11:27, 5 November 2023 (UTC)
HotCat adds page status and does strange things in de.wikisource
I created a new project-category for a text where this has been forgotten. Then I added the category via HotCat to the pages. Then something strange happened: The header and footer got shifted into the main textbox and an additional "Seitenstatus" was added... Both shouldn't have happened. Can someone look into it? Example: Diff-link --Jenne1504 (talk) 08:26, 30 November 2023 (UTC)
- This is the internal representation of a Page-namespace page: it begins with a
<noinclude>
section containing the<pagequality>
element and the header, then the page body, then the footer in another<noinclude>
. HotCat inserted the category below this<noinclude>
section, which is certainly not good (the<noinclude>
section should be at the very end). - Honestly I don’t see the point in categorizing Page-namespace pages (categories should be placed on the mainspace pages transcluding these Page-namespace pages), so I’d probably just disable HotCat in the Page namespace instead of putting probably considerable effort into fixing it. (But if anyone else thinks it’s worth being fixed, I’m not opposed to that.) —Tacsipacsi (talk) 21:20, 30 November 2023 (UTC)
- They are categorized so that one can get a quick overview about the status of a project (petscan-links are automatically put on every index-page; but that only works if all pages from a project are in one project-category. The page-category is added automatically if the category is put on the index page. But has to be added if someone forget to fill the field… Jenne1504 (talk) 21:54, 1 December 2023 (UTC)
Deleting a category sortkey does not work
If I were to use HotCat to change "Abc|Foo" (Category:Abc, sortkey Foo) to "Abc" (Category:Abc, no sortkey), the edit would seemingly work, but no change would be made. Could someone please fix this? Thanks! —Ivi104 22:31, 30 December 2023 (UTC)
- @Ivi104 you need to leave "Abc|" in the input field and then click ok. if you enter "Abc", the gadget thinks you didnt modify the sortkey. "Abc|" means sortkey is changed to nothing. RZuo (talk) 12:52, 31 December 2023 (UTC)
If one category is a redirect, other categories are not saved
Hi,
When you open a file in Commons and try to add two or more categories one of which is a redirect, only the redirect is added and other categories are ignored. Michgrig (talk) 19:11, 4 January 2024 (UTC)
Can't scroll list if bangs into top
Here the user cannot scroll the list down. It has banged into the top...
The user tugs on the grey scrollbar, but alas...
Yes, the user has chosen to put the categories at the top of the page.
Jidanni (talk) 07:49, 7 January 2024 (UTC)
Allow tool to operate on red categories (that don't exist yet.)
Let's say we click a red category link. OK, now we are editing a category that doesn't exist yet. It would be great if the tool appeared to help us assign this red category page to categories, so it would no longer be red. Currently one must manually place the first category in the category and save it to get the ball rolling, if you know what I mean. Jidanni (talk) 07:38, 14 January 2024 (UTC)
- The gadget works only in read view. If you enter the read view by exiting the editor (Cancel button in the wikitext editor, Escape key in the visual editor), you’ll be able to use HotCat to create categories. —Tacsipacsi (talk) 07:44, 15 January 2024 (UTC)
Link from gadget itself
There should be a little link to this discussion area from the gadget itself.
Currently we must remember it is a gadget. And then we must look in our preferences under gadgets, and try to remember the name of this tool, to find the link.
I'm saying that right there, after the list of categories and + - signs, on every wiki page, there should be a link, to more information about the tool, including this discussion area. Jidanni (talk) 07:42, 14 January 2024 (UTC)
Adds 10+ seconds of load time to Wikitionary pages
When I open Wiktionary in Chrome on a definition such as goose when I'm logged in with HotCat enabled, there's a good 10+ seconds after I open the page where I can't click on any links. Opening up the Performance tab in the Dev Tools I can see that it's running find_category for literally 10.8 seconds, the last call in the call graph is en_wiktionary_category_name_detect twice for 5 seconds each. Disabling HotCat fixes the issue. Akeosnhaoe (talk) 20:28, 6 February 2024 (UTC)
Where is the category bar?
The instructions state, "It augments the category bar". Where is the category bar? (Be gentle, please -- I'm having a bad day. :-) SCHolar44 (talk) 06:24, 21 February 2024 (UTC)
- for example. RZuo (talk) 09:10, 21 February 2024 (UTC)