Page MenuHomePhabricator

Show block notices on mobile visual editor
Closed, ResolvedPublic

Description

On mobile visual editor, if a blocked user tries to edit a page (or a partially blocked user tries to edit a page they are blocked from), they are not told that they are blocked until after attempting to save the page.

On desktop visual editor, an edit notice appears as soon as the editor opens, warning them that they are blocked.

Event Timeline

Restricted Application added a project: VisualEditor. · View Herald TranscriptNov 15 2018, 3:55 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
JTannerWMF moved this task from To Triage to FY 19-20 on the VisualEditor board.Dec 19 2018, 7:00 PM

This is actually not a big problem because if you're blocked, then the mobile site doesn't let you open the editor at all. When clicking on the "Edit" icon, a popup like this opens instead of the editor:

However, this can be bypassed by viewing a veaction=edit URL (e.g. https://en.m.wikipedia.org/wiki/The_Fighting_Temeraire?veaction=edit), which is probably a separate bug.

Change 506467 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/MobileFrontend@master] Show block notice in VE

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

This is actually not a big problem because if you're blocked, then the mobile site doesn't let you open the editor at all. When clicking on the "Edit" icon, a popup like this opens instead of the editor:

However, this can be bypassed by viewing a veaction=edit URL (e.g. https://en.m.wikipedia.org/wiki/The_Fighting_Temeraire?veaction=edit), which is probably a separate bug.

Only if you haven't loaded the editor before and made VE your default.

Esanders claimed this task.Apr 29 2019, 2:56 PM
Esanders moved this task from Incoming to Code review on the VisualEditor (Current work) board.

Change 507375 had a related patch set uploaded (by Bartosz Dziewoński; owner: Esanders):
[mediawiki/extensions/VisualEditor@master] ApiVisualEditor: Return structured block info as well as formatted notice

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

Change 507375 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] ApiVisualEditor: Return structured block info as well as formatted notice

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

Change 506467 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Show block notice in VE

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

If I try to load visual editor on a page from which I am blocked, I get:

Error loading data from server: HTTP 500. Would you like to retry?

For a brief time yesterday, when I did the same thing the error was something like: "Call to private method ApiQueryUserInfo::getBlockInfo from ApiVisualEditor", but not today.

Change 508915 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] ApiVisualEditor: Fix use of getBlockInfo()

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

Change 508915 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] ApiVisualEditor: Fix use of getBlockInfo()

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

Change 508941 had a related patch set uploaded (by Jforrester; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@wmf/1.34.0-wmf.4] ApiVisualEditor: Fix use of getBlockInfo()

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

Change 508941 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@wmf/1.34.0-wmf.4] ApiVisualEditor: Fix use of getBlockInfo()

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

Mentioned in SAL (#wikimedia-operations) [2019-05-08T21:58:03Z] <jforrester@deploy1001> Synchronized php-1.34.0-wmf.4/extensions/VisualEditor/includes/ApiVisualEditor.php: UBN T209599 ApiVisualEditor: Fix use of getBlockInfo() (duration: 00m 57s)

@dom_walden Thank you for noticing this! It should be displaying an appropriate message again now (on both desktop and mobile).

matmarex moved this task from Inbox to Low Priority on the Editing QA board.Jun 12 2019, 4:13 PM
matmarex removed Ryasmeen as the assignee of this task.Aug 22 2019, 10:50 PM
matmarex moved this task from QA to Product owner review on the VisualEditor (Current work) board.
matmarex edited projects, added Skipped QA; removed Editing QA.

This has been in production for a long time now and works as expected for me.

ppelberg closed this task as Resolved.Sep 17 2019, 12:25 AM
ppelberg claimed this task.
Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptSep 17 2019, 12:25 AM

@matmarex for future reference, how do you go about testing patches that apply to contributors who are blocked?

I tested it on my local MediaWiki installation, where I created and blocked a user account. If you'd like to test it, I can give your account on https://en.wikipedia.beta.wmflabs.org/ the ability to block users (or I can just block it), just message me and tell me the username.