Page MenuHomePhabricator

After checking the preview, the NWE appears one more plus (+) icon after the categories
Closed, ResolvedPublic1 Estimated Story Points

Description

In the 2017 wikitext editor, after I

  1. make an edit
  2. watch the preview
  3. go back to edit

the number of the plus (+) icons in the bottom of the page, which are after the categories will be more every time when I do the previous ones. The problem is that it can easily increase size of the editing-tab if you are editing a page with a lot of category (and you make lots edits). Here you can see a video about the bug.

Event Timeline

Bencemac created this task.Jul 15 2017, 7:14 PM
Restricted Application added a project: VisualEditor. · View Herald TranscriptJul 15 2017, 7:14 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

This is a bug in the HotCat gadget, which reacts poorly to the wikipage.content hook. HotCat bugs aren't handled here, but given that my report almost a year ago on commons about this issue wasn't handled there either and the fact that there are many tasks in Phabricator for HotCat, let's see if someone wants to fix the issue given this report here.

Some classes/IDs should be added and then checked around lines 1335 and 2860. I could fix this, but I don’t have write access to the script. (Also, if you have ideas for the perfect class names, please share them!)

@Tacsipacsi Thanks your help again! I think @Esanders could help you to fix it. Could you take a look?

Some classes/IDs should be added and then checked around lines 1335 and 2860. I could fix this, but I don’t have write access to the script. (Also, if you have ideas for the perfect class names, please share them!)

If you could prepare a fix and put the fixed version somewhere (e.g. https://phabricator.wikimedia.org/paste/edit/), then any Commons administrator can replace it – they are usually quite responsive if you put {{editprotected}} on the gadget talk page. (For urgent issues or if no one responds, you can also ping the WMF developers in 'sysadmin' or 'global-interface-editor' groups to do it.)

I fixed it and pasted to P6066, and tested as I usually test such things, but that’s not so much, so feel free to do more tests it and report errors! (BTW, does it have any standard test cases, like the extensions?)

Perhelion added a subscriber: Perhelion.EditedOct 7 2017, 11:07 AM

@Tacsipacsi I got an error on the (from @Schnark) given test page: https://commons.wikimedia.org/w/index.php?title=File%3A1921_год_Доклад_о_состоянии_протезного_завода.pdf
Uncaught TypeError: Cannot read property 'insertBefore' of undefined

at CategoryEditor.initialize (<anonymous>:1347:22)
at CategoryEditor (<anonymous>:1237:46)
at createEditors (<anonymous>:2848:6)
at setup (<anonymous>:2861:5)
at Object.HotCat.start (<anonymous>:2985:56)
at api.php?format=json&callback=HotCat.start&action=query&rawcontinue=&titles=File%3A1921_год_Доклад_о_состоянии_протезного_завода.pdf&prop=info|revisions&rvprop=content|timestamp|ids&meta=siteinfo&rvlimit=1&rvstartid=213817041:1

PS: This is bug T151056 / T147197

Perhelion added a comment.EditedOct 7 2017, 11:21 AM

@Tacsipacsi Anyway I tested with VE, your fix seems a bit pointless. HotCat is not intended to be active on edit-mode. So the simple solution would be to add a IF for the VE edit-mode.

I guess this would be the right fix: T103285#1775077 (by @kaldari ) I don't know why this was removed for hook 'wikipage.content'.

Bencemac closed this task as Resolved.Oct 7 2017, 3:14 PM
Bencemac assigned this task to Perhelion.

Good news @Schnark; we got the fix. :)

Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptOct 7 2017, 3:14 PM
Jdforrester-WMF set the point value for this task to 0.Oct 10 2017, 3:33 PM
Jdforrester-WMF changed the point value for this task from 0 to 1.Oct 15 2017, 10:27 PM