[go: nahoru, domu]

Page MenuHomePhabricator

Logged-out user doesn't have timely warnings in editing mode ("View source" button still opens editor)
Closed, ResolvedPublic

Description

Scenario 1:

  • anon user clicks on Edit source button on a page, e.g. title=Z10147&action=edit
  • a user can type/change some of the fields - the Publish button becomes active
  • upon clicking on it a user is presented with a dialog to enter the info

Screen Shot 2023-02-17 at 2.11.44 PM.png (846×1 px, 103 KB)

  • a user types some text and clicks the Publish button only to be informed that edits cannot be saved.

Screen Shot 2023-02-17 at 2.11.56 PM.png (1×1 px, 116 KB)

What should have happened instead?:

  • users without permissions to edit should be informed immediately.
  • entering text/changing text in the fields should not be allowed
  • sufficient explanation of who can edit should be given. Currently the page informs that "Everyone can edit the labels." and "Only users with special permissions" has not yet been implemented as a link.

Event Timeline

The button is now called "View source" but goes to action=edit; we should show a message but load the regular view not the editor in this case, I guess?

Jdforrester-WMF renamed this task from Anon user doesn't have timely warnings in editing mode to Logged-out user doesn't have timely warnings in editing mode ("View source" button still opens editor).Apr 10 2023, 8:08 PM

Probably best for now to just hide the view-source button.

Re-checked in wikifunctions betalabs

  • anon users see "View source" and can click on it
  • "Publish" button is displayed as active and can be clicked without making any edits
  • upon clicking on it, anon users will see:

Screen Shot 2023-07-12 at 3.37.50 PM.png (1×1 px, 134 KB)

Change 937558 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/WikiLambda@master] Hide 'view source' links, they're pointless for our content type

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

Change 937558 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Hide 'view source' links, they're pointless for our content type

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

OK, if you go as a logged-out user to an uncached page you'll got no "View source" link, so there's no primary way to edit. Next step is to disable the 'edit' pencil when logged out. There's still a problem if you manually got to ?action=edit, but I think that's fine.

Change 938951 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/WikiLambda@master] About widget: Tie disabled state of edit pencil button to canEdit prop

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

Change 938951 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] About widget: Tie disabled state of edit pencil button to canEditObject method

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

DVrandecic subscribed.

Yep, no Edit link visible anymore. Works for me!

Change 941849 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/WikiLambda@wmf/1.41.0-wmf.19] About widget: Tie disabled state of edit pencil button to canEditObject method

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

Change 941849 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@wmf/1.41.0-wmf.19] About widget: Tie disabled state of edit pencil button to canEditObject method

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