Page MenuHomePhabricator

[Investigation - 4 hours] "You are blocked" message does not display when a user with a partial block attempts to take action with gadget on the page; page freezes instead
Open, MediumPublicBUG REPORT

Description

Tested on Arabic Wikipedia by @alanajjar.

Event Timeline

@alanajjar you can describe what you found on Arabic Wikipedia related to the page freezing and not showing block message when adding a category with a gadget. I would appreciate you sharing the particular details and screenshots.

Thanks @SPoore

First
Gadget-hdedit.js

  • I blocked Alaa account from editing the page نظير إنزيمي with an expiration time of 1 day (autoblock disabled).
  • I try to edit same article then I can't edit it as expected. (Block ID #236075)
  • When I try to use (Gadget-hdedit.js) it's not give me any block message or access denied message, only the section header freezes instead (like in photo below).

capture-20190322-161053.png (219×1 px, 29 KB)

Second
Gadget-Cat-a-lot.js

  • I blocked Alaa account from editing the page نظير إنزيمي with an expiration time of 1 day (autoblock disabled).
  • I try to edit same article then I can't edit it as expected. (Block ID #236075)
  • When I try to use (Gadget-Cat-a-lot.js) it's not give me any block message or access denied message, instead it give me (done) but without any action (like in photo below).

vlcsnap-2019-03-22-16h24m53s333.png (626×1 px, 107 KB)

Third
Gadget-rater.js

  • I blocked Alaa account from editing the talk page نقاش:نظير إنزيمي with an expiration time of 1 day (autoblock disabled).
  • I try to edit same article then I can't edit it as expected. (Block ID #236075)
  • When I try to use (Gadget-rater.js) it's not give me any block message or access denied message, instead it give me (done) but without any action (like in photo below).

capture-20190322-162928.png (625×1 px, 88 KB)

Other gadgets working well (like Gadget-HotCat.js) be giving me the block message.

Niharika renamed this task from "You are blocked" message does not display when a user with a partial block attempts to take action with gadget on the page; page freezes instead. to [Investigation - 4 hours] "You are blocked" message does not display when a user with a partial block attempts to take action with gadget on the page; page freezes instead.Mar 27 2019, 7:19 PM
Niharika triaged this task as Medium priority.
Niharika moved this task from Triage/To be Estimated to Zayin - ז on the Anti-Harassment board.
Niharika edited projects, added Anti-Harassment (Zayin - ז); removed Anti-Harassment.

I've had a look into these issues:

Gadget-hdedit.js

I tested this with partial blocks disabled - it was broken before partial blocks was enabled. The problem is that it is checking for a property on an object that may not exist.

It can be fixed by replacing the line:

if (data.edit.result == 'Success') {

with:

if (data.edit && data.edit.result == 'Success') {

After doing that, a blocked user sees an appropriate block message.

Gadget-Cat-a-lot.js

I get errors when I try to use this gadget, even when I am not blocked - although they are different from the errors reported. That makes me suspect that it may have been broken before partial blocks was enabled.

Gadget-rater.js

I'm struggling to find any instructions on how to use this gadget, so haven't been able to replicate the problem. @alanajjar Would you mind testing it for an unblocked user and a sitewide blocked user, to check whether it is an issue with partial blocks?

Sorry for late in reply, I didn't notice it!!

After doing that, a blocked user sees an appropriate block message.

Fixed. Confirmed (photo below)

capture-20190517-003828.png (657×1 px, 72 KB)

Gadget-Cat-a-lot.js
I get errors when I try to use this gadget, even when I am not blocked - although they are different from the errors reported. That makes me suspect that it may have been broken before partial blocks was enabled.

Per Gadgets-definition

Cat-a-lot[ResourceLoader|rights=review|dependencies=mediawiki.util]|Cat-a-lot.js|Cat-a-lot.css

So you should have editor flag to try it. Please give me your SUL name and I'll grant you this flag.

Gadget-rater.js
I'm struggling to find any instructions on how to use this gadget, so haven't been able to replicate the problem. @alanajjar Would you mind testing it for an unblocked user and a sitewide blocked user, to check whether it is an issue with partial blocks?

rater[ResourceLoader|rights=review|dependencies=mediawiki.util]|rater.js

Same thing need editor flag. I tried it with sitewide blocked user, and it appear not related to partial block only.

Removing task assignee due to inactivity, as this open task has been assigned for more than two years (see emails sent to assignee on May26 and Jun17, and T270544). Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be very welcome!

(See https://www.mediawiki.org/wiki/Bug_management/Assignee_cleanup for tips how to best manage your individual work in Phabricator.)