Page MenuHomePhabricator

Wrong error message "This page is protected" in mobile view
Open, LowPublic


In Speedypedia one has to login or register to edit or create articles. When a user is not logged in in the mobile view, if he clicks on the "Edit" of any page he receives the message: "This page is protected to prevent vandalism." But the page is not protected, logged in users can edit it. I want the user to see the message "Would you like to edit this page? Login or register to edit articles.", unless the page is really protected (which is not the case in the page I tested). In the desktop view it's fine, if I'm not logged in I can view source, or create account or log in. But in the mobile view I receive this message if I try to edit the page.

If you want to know my version of MediaWiki, go to (MediaWiki 1.25.1).

Event Timeline

urievenchen raised the priority of this task from to Needs Triage.
urievenchen updated the task description. (Show Details)
urievenchen added a subscriber: urievenchen.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 25 2015, 1:22 PM
urievenchen updated the task description. (Show Details)Jul 25 2015, 1:26 PM
urievenchen set Security to None.
Restricted Application added a project: Readers-Web-Backlog. · View Herald TranscriptJul 25 2015, 1:36 PM
Nnemo awarded a token.Jul 25 2015, 4:11 PM
Nnemo added a subscriber: Nnemo.
Aklapper renamed this task from Wrong error message in mobile view. to Wrong error message "This page is protected" in mobile view.Jul 25 2015, 9:04 PM
KLans_WMF added a subscriber: KLans_WMF.

Assigning to @bmansurov to investigate

The underlying problem is, that MobileFrontend checks, if a page is editable[1] on the base of wgIsProbablyEditable[2], which uses Title::quickUserCan(). If it is false, MF always thinks it's because the user is blocked from editing. That can be true in wikis, who allow to not logged in users to edit (like wmf wikis), but doesn't work, if a user has to register to edit (Title::quickUserCan() will always be false for not logged in users). As a result, MF uses the "blocked from editing" message, instead of investigate further, why the user can't edit this page.

Now, a solution could be to simply remove this code. Why?

  • the variable is cache related[3], so it isn't a good indicator in wmf wikis, anyway
  • it sounds nicer to let the user register a new account and edit (possibly) hundreds of pages, instead of saying, that he can't even edit one article, because it could be the one, he's blocked from (I hope you understand, what I mean :))

Another way would be to add a new configuration option (e.g. in wgMFEditorOptions) which let an wiki administrator say "Don't rely on wgIsProbablyEditable, if the user isn't logged in, always show the register/login CTA".


Thanks for looking into this @Florian.

No problem, I would upload a change myself, but I'm a bit busy today :]

Thanks @Florian yeh we should move away from wgIsProbablyEditable - I think in this case we should show them the login/signup buttons but not the anon button in the interstitial for the editor.

Could wgIsProbablyEditable be more informed in its heuristic and take into account this setting?

this setting

Which setting? I think the easiest way would be to ignore anonymousEditing, if wgIsProbablyEditable is set to true (for whatever reason), so that the login/register Cta is shown?

Jdlrobson moved this task from Backlog to Bugs on the MobileFrontend board.Aug 4 2015, 6:34 PM
Jdlrobson triaged this task as Low priority.Sep 16 2015, 6:58 PM
Jdlrobson added a project: Contributors-Team.
bmansurov removed bmansurov as the assignee of this task.Aug 12 2016, 11:03 AM
bmansurov added a subscriber: bmansurov.

Not working on this currently.