Page MenuHomePhabricator

[Bug] Visiting protected article with editor link does nothing
Closed, ResolvedPublic

Description

When you visit a protected page with #/editor/0 fragment it automatically opens the editor window, for example please visit https://en.m.wikipedia.org/wiki/Garwolin#/editor/0.

This doesn't work for protected articles (as you cannot edit them e.g. https://en.m.wikipedia.beta.wmflabs.org/w/index.php?title=Selenium_protected_test_2&mobileaction=toggle_view_mobile#/editor/0).

Not showing editor is correct behavior, but the problem is that user has no feedback that article is protected,
and it looks like a bug.

Steps to reproduce

  1. Go to https://en.m.wikipedia.org/wiki/Barack_Obama#/editor/0

Expected results

A message/modal/toast with information that article is protected is shown to the user

Actual results

Nothing happens

Environments observed

All

Developer notes

Doesn't look like this needs input from @alexhollender - we can show a toast in this situation.
The logic is currently in https://github.com/wikimedia/mediawiki-skins-MinervaNeue/blob/master/resources/skins.minerva.editor/init.js#L415

The setup script in https://github.com/wikimedia/mediawiki-skins-MinervaNeue/blob/master/resources/skins.minerva.editor/init.js#L231 will need to consider the existing hash fragment on the page and send a toast notification (mw.notify) when this has happened.

QA steps

Visit https://en.m.wikipedia.beta.wmflabs.org/w/index.php?title=Selenium_protected_test_2&mobileaction=toggle_view_mobile#/editor/0 in an incognito window.

A toast should show telling you the page is protected

Event Timeline

pmiazga created this task.Sep 27 2018, 3:09 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 27 2018, 3:09 PM
Jdlrobson renamed this task from Visiting protected article with editor link does nothing to [Bug] Visiting protected article with editor link does nothing.Sep 27 2018, 4:52 PM
Jdlrobson updated the task description. (Show Details)
Jdlrobson moved this task from Incoming to Triaged but Future on the Readers-Web-Backlog board.
ovasileva triaged this task as Medium priority.Oct 2 2018, 3:45 PM
Aklapper updated the task description. (Show Details)Oct 5 2018, 11:43 AM
Jdlrobson updated the task description. (Show Details)Nov 2 2018, 10:22 PM

Change 471361 had a related patch set uploaded (by Bjornskjald; owner: Bjornskjald):
[mediawiki/skins/MinervaNeue@master] Add showing toast/drawer when visiting protected article with editor link

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

Change 471361 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@master] Add showing toast/drawer when visiting protected article with editor link

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

ovasileva closed this task as Resolved.Nov 5 2018, 11:56 PM
ovasileva added a subscriber: ovasileva.

works as expected, modal appears upon clicking on the edit icon:

moving to signoff and resolving