Last modified: 2014-03-26 23:02:26 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T54004, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 52004 - VisualEditor: Blocked users are not blocked from using VE (just from saving); should instead show <Blockedtext> with log entry
VisualEditor: Blocked users are not blocked from using VE (just from saving);...
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
MediaWiki integration (Other open bugs)
unspecified
All All
: High normal
: VE-deploy-2014-03-27
Assigned To: Alex Monk
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-25 00:17 UTC by Chris McKenna
Modified: 2014-03-26 23:02 UTC (History)
9 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
What a blocked user sees when they try to save an edit in VE (101.46 KB, image/png)
2013-07-25 00:20 UTC, Chris McKenna
Details
What a blocked user sees immediately they the source editor loads (77.07 KB, image/png)
2013-07-25 00:22 UTC, Chris McKenna
Details

Description Chris McKenna 2013-07-25 00:17:25 UTC
When a blocked users attempts to edit a page in the classic editor they see a large, red-bordered notice that tells them:
*They are unable to edit, but they can still read
*Who blocked them
*Why they are blocked (shows them the block log extract)
*When the block expires
*That they can usually edit their talk page and email other editors and aministrators
*What to do if the block is unclear or doesn't seem relevant
*How to appeal a block (links to policy and guide)
*That they can view and copy the source of a page

In contrast when a blocked user attempts to edit a page in VE
*No notice appears, and editing works as normal
*When they click "Save page" they can review their changes and enter an edit summary as normal

When they try to save their edits they see a small white box with a message that tells them:
*There was a server problem
*Their request was unsuccessful because they have been blocked
They can then choose only "OK" which takes them back to the save page dialog.

This is very bad because
*The message they see appears to say they caused a server error - cue panic mode for non-technical users ("Help! I've broken Wikipedia!" - that is exactly the reaction I would expect from my mother.)
*They have wasted potentially lots of time on an edit they cannot save
*It doesn't tell them what being blocked means
*It doesn't tell them who blocked them or for what reason 
*It doesn't tell them what they can do to get help - they can't ask questions at the page that seems to be about asking questions for example (see Bug 51875)
*It doesn't tell them when the block expires, how they can appeal it or how they can contact anybody.

For some users it is even worse that that - saving fails silently: Bug 51999
Comment 1 Chris McKenna 2013-07-25 00:20:56 UTC
Created attachment 12953 [details]
What a blocked user sees when they try to save an edit in VE
Comment 2 Chris McKenna 2013-07-25 00:22:44 UTC
Created attachment 12954 [details]
What a blocked user sees immediately they the source editor loads
Comment 3 Alex Monk 2014-02-11 00:34:54 UTC
James suggested I tackle this bug. I messed around with the API for a little bit and assuming I didn't miss anything:

I think that if we tried to fill out the 'blockedtext' message properly on the client we'd have to:
* Query the API for the user's blockinfo to determine whether or not they're blocked. If they are:
** Query the API for more info about this block which meta=userinfo&uiprop=blockinfo doesn't provide but we need to substitute into the message (expiry, user, timestamp).
** Query the API to parse the blockedtext message because it can't be done on the client (even the default message includes stuff mw.msg can't handle)
** Substitute the data we have into the message (and we still won't have $3 - the current IP)
*** Mess around with dates/times because they won't be in the right format.

Another way we could do this is return the full warning from action=visualeditor&paction=parse (therefore adding no extra API requests) which would cause the client to stop loading. I don't like this idea because obviously that paction is not intended for checking this kind of thing...

Or we could ignore the core blockedtext message and use our own "Your username or IP address has been blocked", possibly with the info that just meta=userinfo&uiprop=blockinfo provides (block ID, performer, reason).

Or we could add a new API module/paction that can be queried once and provides all the relevant info. I don't like this idea either but it seems the nicest.

Thoughts?
Comment 4 Roan Kattouw 2014-03-17 17:16:28 UTC
(In reply to Alex Monk from comment #3)
> James suggested I tackle this bug. I messed around with the API for a little
> bit and assuming I didn't miss anything:
> 
> I think that if we tried to fill out the 'blockedtext' message properly on
> the client we'd have to:
> * Query the API for the user's blockinfo to determine whether or not they're
> blocked. If they are:
> ** Query the API for more info about this block which
> meta=userinfo&uiprop=blockinfo doesn't provide but we need to substitute
> into the message (expiry, user, timestamp).
> ** Query the API to parse the blockedtext message because it can't be done
> on the client (even the default message includes stuff mw.msg can't handle)
> ** Substitute the data we have into the message (and we still won't have $3
> - the current IP)
> *** Mess around with dates/times because they won't be in the right format.
> 
> Another way we could do this is return the full warning from
> action=visualeditor&paction=parse (therefore adding no extra API requests)
> which would cause the client to stop loading. I don't like this idea because
> obviously that paction is not intended for checking this kind of thing...
> 
> Or we could ignore the core blockedtext message and use our own "Your
> username or IP address has been blocked", possibly with the info that just
> meta=userinfo&uiprop=blockinfo provides (block ID, performer, reason).
> 
> Or we could add a new API module/paction that can be queried once and
> provides all the relevant info. I don't like this idea either but it seems
> the nicest.
> 
We already put random junk in the paction=parse response, I wouldn't be opposed to adding blocked-ness to that. Another paction would be OK too, but then we'd have to make two API requests.

There are significant speed benefits in combining everything into one API request. I think we should stop kidding ourselves that paction=parse is a clean, only-does-one-thing action, and perhaps rename it if we want, rather than trying to split it into separate actions, because the latter would just make client-side performance worse.
Comment 5 Alex Monk 2014-03-17 17:29:31 UTC
(In reply to Roan Kattouw from comment #4)
> We already put random junk in the paction=parse response, I wouldn't be
> opposed to adding blocked-ness to that. Another paction would be OK too, but
> then we'd have to make two API requests.
> 
> There are significant speed benefits in combining everything into one API
> request. I think we should stop kidding ourselves that paction=parse is a
> clean, only-does-one-thing action, and perhaps rename it if we want, rather
> than trying to split it into separate actions, because the latter would just
> make client-side performance worse.

Yes, since writing that comment I decided to just add it in to paction=parse, especially since talking to James - he wants this to be an edit notice like the others. I probably should have left a new comment about it.

The problem now is coming up with a nice way to fit the autoblockedtext message (blockedtext is okay) in to the edit notices popup.
Comment 6 Gerrit Notification Bot 2014-03-17 21:25:21 UTC
Change 119204 had a related patch set uploaded by Alex Monk:
Show blockedtext message in edit notices

https://gerrit.wikimedia.org/r/119204
Comment 7 Gerrit Notification Bot 2014-03-26 23:02:26 UTC
Change 119204 merged by jenkins-bot:
Show blockedtext message in edit notices

https://gerrit.wikimedia.org/r/119204

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links