Page MenuHomePhabricator

Trying to edit while blocked should act like "view source"
Closed, ResolvedPublic

Description

When trying to edit a protected page, it shows the wiki markup (the read-only
"view source" mode). The same should happen when the user is blocked, since the
end effect is the same (they cannot edit the page).


Version: 1.6.x
Severity: normal
URL: http://en.wikipedia.org/wiki/Wikipedia_talk:Blocking_policy#Violation_of_the_GFDL

Details

Reference
bz4990

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:06 PM
bzimport set Reference to bz4990.
bzimport added a subscriber: Unknown Object (MLST).

netoholic wrote:

Changing the edit tab to "View source" is a good suggestion.
Additionally, auto-blocks should not be triggered by viewing the
source. Currently, if you are logged in, your IP is auto-blocked
if you click the "Edit" link.

I believe the autoblock is supposed to trigger at the same time the message
saying you are blocked shows. If you show the message, you have to do an autoblock.

netoholic wrote:

(In reply to comment #2)

I believe the autoblock is supposed to trigger at the same
time the message saying you are blocked shows. If you show
the message, you have to do an autoblock.

Right, but you only get the message ([[MediaWiki:Blockedtext]])
saying you are blocked when you click the "Edit" button. My
point is that we can avoid many auto-blocks by showing only
the "View source" button to blocked users. If they click "View
source", you show them blockedtext and the source, but no auto-
block. If they hack the url and try to "action=edit", show them
blockedtext and autoblock their IP.

Wiki.Melancholie wrote:

*** Bug 5106 has been marked as a duplicate of this bug. ***

robchur wrote:

As bug 5106 comment 3 echoes; we can't do this for caching reasons.

Wiki.Melancholie wrote:

*** Bug 5513 has been marked as a duplicate of this bug. ***

Wiki.Melancholie wrote:

To see the wiki source maybe the following links work:
http://en.wikipedia.org/wiki/Main_Page?action=raw&ctype=text/css (only non-IE)
http://en.wikipedia.org/w/index.php?title=Main_Page&action=raw&ctype=text/css (even
IE, but leads to a download when using IE)

robchur wrote:

If a user hits edit while blocked, I see no harm in showing them the "blocked"
notice, and placing the read-only text source underneath it.

marco wrote:

then do so...it still needs a dev for this change.

robchur wrote:

(In reply to comment #9)

then do so...it still needs a dev for this change.

That would be why it's on my to-do list.

Wiki.Melancholie wrote:

Reopening this bug; see comment #8 til comment #10.

mpt wrote:

This bug is mutually exclusive with bug 2508.

apb wrote:

An "action=viewsource" would also be nice. Then we
could hand-edit the URL to change "action=edit" to
"action=viewsource" after we get a "User is blocked"
message.

A patch to show the source of the page (or edited version if block is triggered on save) under the block notice

Attached:

Actually, fixing this bug is just a side effect of this patch. The real reason
I wrote it is to stop IE users from losing their edits if their IP is blocked
while they are editing.

robchur wrote:

Applied an adapted version to SVN trunk, r15013.