Page MenuHomePhabricator

Using Hotcat after saving with visual editor tries to edit old version
Closed, ResolvedPublic1 Estimated Story Points

Description

When I save a page on nl.wikipedia with visual editor (Chrome), and try to edit the categories using the HotCat extension, two situations can occur:

  1. hotcat doesn't load properly, and doesn't show the (+) in the category bar.
  2. hotcat does load, but tries to edit the previous version of the page (before saving through Visual Editor) - basically reverting the previous edit. This triggers a warning "warning you're editing an old version of this page. If you continue...". After reloading the page, everything works fine.

Event Timeline

(I think a workaround would be not to use VE. Could not hold myself.)

(Also, I believe HotCat is no extension)

(Also, I believe HotCat is no extension)

Is that another (misplaced) joke? Just checking, because of your previous comment.

In case it's not: in my preferences on nlwiki, it is at least listed under the extensions tab. Not sure what other definition you'd use.

Is there anything shown in the web browser's developer tools?
After opening them, please append ?debug=true to the address of the page on which you see the problem, if the address does not already include a ?. (If the address already includes a ?, append &debug=true instead - see https://www.mediawiki.org/wiki/ResourceLoader/Developing_with_ResourceLoader#Toggle_debug_mode for more information).
If there is a problem or an error with JavaScript it should be printed in the 'console' of the developer tools. Often JavaScript errors are a reason for problems, or a non-existing file called from another file (which can be seen in the 'network' tab).
For more information please see:

At the moment I try to save the category, I get in debug mode the following (I get the same in regular mode btw) in my console:

VM3178:166 This page is using the deprecated ResourceLoader module "jquery.ui.position".
(anonymous) @ VM3178:166
(anonymous) @ load.php?debug=false&lang=nl&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin…:162
fire @ load.php?debug=false&lang=nl&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin…:45
add @ load.php?debug=false&lang=nl&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin…:45
always @ load.php?debug=false&lang=nl&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin…:46
runScript @ load.php?debug=false&lang=nl&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin…:162
checkCssHandles @ load.php?debug=false&lang=nl&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin…:162
execute @ load.php?debug=false&lang=nl&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin…:163
implement @ load.php?debug=false&lang=nl&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin…:169
(anonymous) @ VM3178:166
(anonymous) @ load.php?debug=false&lang=nl&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin…:4
globalEval @ load.php?debug=false&lang=nl&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin…:4
(anonymous) @ load.php?debug=false&lang=nl&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin…:167
VM3178:121 This page is using the deprecated ResourceLoader module "jquery.ui.core".
Please use "mediawiki.ui.button" or "oojs-ui" instead.
mw.loader.implement.css @ VM3178:121
(anonymous) @ load.php?debug=false&lang=nl&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin…:162
fire @ load.php?debug=false&lang=nl&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin…:45
add @ load.php?debug=false&lang=nl&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin…:45
always @ load.php?debug=false&lang=nl&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin…:46
runScript @ load.php?debug=false&lang=nl&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin…:162
checkCssHandles @ load.php?debug=false&lang=nl&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin…:162
(anonymous) @ load.php?debug=false&lang=nl&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin…:163
fire @ load.php?debug=false&lang=nl&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin…:45
fireWith @ load.php?debug=false&lang=nl&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin…:46
fire @ load.php?debug=false&lang=nl&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin…:46
fireCallbacks @ load.php?debug=false&lang=nl&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin…:157
addEmbeddedCSS @ load.php?debug=false&lang=nl&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin…:157
(anonymous) @ load.php?debug=false&lang=nl&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin…:157

This may be an issue in HotCat. I'm not sure.

I can reproduce this at the English Wikipedia.

The bug appears to be in HotCat - it uses wgCurRevisionId, but it makes a local copy of mw config: conf = mw.config.get() so even though VE updates wgCurRevisionId, HotCat doesn't see it.

Jdforrester-WMF subscribed.

Should be fixed by that gadget's community maintainers, whoever they are.

It looks to be User:Lupo (@Lupo). I guess follow-up should be on https://commons.wikimedia.org/wiki/MediaWiki_talk:Gadget-HotCat.js though I don't think it's very active.

Jdforrester-WMF assigned this task to Esanders.
Jdforrester-WMF set the point value for this task to 1.

Ah well. If we keep fixing community gadgets for people they'll end up expecting us to do so forever. :-(