Page MenuHomePhabricator

It should be possible to view source on protected pages in Minerva
Open, NormalPublic

Description

When a page is protected, on Minerva, there is no way to view the source of the article. A toast is shown telling the user it is protected, with no way to view the article wikitext. Sometimes the source is important (for example copying and pasting the content into a draft/user space).

e.g. visit https://en.m.wikipedia.beta.wmflabs.org/wiki/Selenium_protected_test_2 in an incognito window and try to view the source of that article.
Constrast this with https://en.m.wikipedia.beta.wmflabs.org/wiki/Selenium_protected_test_2?action=edit

Original bug report


I tried clicking the locked pencil multiple times, but it did not work.

Surprisingly, it works on https://en.m.wikipedia.org/w/index.php?title=Module:Location_map

Developer notes

Related: T106943
We could show a drawer similar to the drawer we show for blocked users; the one we show for clicking a red link; and the one to prompt users to login who click the watchstar.

The drawer could provide the explanation that the page is protected but offer an option to "view source" that opens the existing editor.

We'd probably need to make some updates to the logic for the editor, to allow it to operate in read only mode.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 6 2018, 3:36 AM

Hi @Capankajsmilyo I'm going to need some more information here!

  • What browser are you using (preferably a browser user agent!)
  • What happens when you try to look on desktop?
  • Do you see the following message when you click the edit icon at the bottom of the screen?

Jdlrobson updated the task description. (Show Details)Nov 6 2018, 8:51 PM

Hi @Capankajsmilyo I'm going to need some more information here!

  • What browser are you using (preferably a browser user agent!)
  • What happens when you try to look on desktop?
  • Do you see the following message when you click the edit icon at the bottom of the screen?

I'm using Chrome

When I try in desktop view, the button view source


It shows me the source correctly

I did not see any message while tapping the button in mobile view.

Jdlrobson renamed this task from View source not working for some pages in mobile view to It should be possible to view source on protected pages in Minerva.Nov 7 2018, 6:30 PM
Jdlrobson updated the task description. (Show Details)
Jdlrobson added a project: MinervaNeue.
ovasileva triaged this task as Normal priority.Nov 13 2018, 9:14 PM
Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptMar 12 2019, 9:34 AM

FYI @iamjessklein — this kinda sits in-between reading and editing

Have known this issue for a while. The workaround is to click and hold the lock icon until menu appears. Then choose to open the page in a new tab, that will show the source text. But it'd be great to fix this.

To clarify: is this only the case for logged-out users? When logged in I am able to view the source of (and edit) https://en.m.wikipedia.org/wiki/Barack_Obama. When logged out I get the toast message "This page is protected to prevent vandalism." If this is only an issue for logged-out users we should update the task title and description.

(from Developer notes in description)
We could show a drawer similar to the drawer we show for blocked users; the one we show for clicking a red link; and the one to prompt users to login who click the watchstar.
The drawer could provide the explanation that the page is protected but offer an option to "view source" that opens the existing editor.

That sounds like a good idea to me:

Jdlrobson added a comment.EditedApr 23 2019, 12:53 AM

This is a problem for both logged in and out users. It is useful to view source of pages protected from vandalism regardless of login status. Some protection levels only apply to anons and some only apply to logged in.

@Jdlrobson thanks for clarifying. Can you give an example or two of a page that this issue occurs on for logged-in users? I was unable to find any.

@Capankajsmilyo does the mockup in T208827#5127816 look good to you? If so I would like to move this out of the design column.