Page MenuHomePhabricator

Newsletter content pages should use "Edit" and instead of "Edit source"
Open, LowPublic

Description

When you click the "Edit Source" button you are not editing the source, you are given a lovely UI to edit the details of the newsletter, so don't say "Edit source"

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 13 2017, 10:49 AM

Cannot reproduce this - as look at this one here:

ah. I see it when the user is non-admin though.

SimmeD added a subscriber: SimmeD.Oct 20 2017, 6:36 PM

Why can users that don't have any "newsletter-*" permissions even see the "View source" button? - It don't work for them. They will get a "Permission error" if trying to click there.

ArTrix added a subscriber: ArTrix.Mar 30 2019, 3:13 PM
ArTrix claimed this task.Apr 3 2019, 5:29 PM

Change 501019 had a related patch set uploaded (by Artrix; owner: Artrix):
[mediawiki/extensions/Newsletter@master] Hide View Source Tab in Newsletter namespace

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

ArTrix triaged this task as Low priority.Apr 3 2019, 5:59 PM

Change 501019 merged by jenkins-bot:
[mediawiki/extensions/Newsletter@master] Hide View Source Tab in Newsletter namespace

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

Tgr closed this task as Resolved.Jul 1 2019, 6:54 AM
Tgr reopened this task as Open.Jul 1 2019, 7:00 AM
Tgr added a subscriber: Tgr.

On a closer look, the patch and the task description seem to be about different issues - the patch removes the (disfunctional) View Source button, the task talks about Edit Source.

@Addshore do you know how to reproduce? I'd guess the user must have newsletter editing rights, and VisualEditor must be installed, and then its edit tab renaming functionality kicks in?

I would guess this has something to do with VE and the options to always show the edit source tab?
I don't remember now however and will not be in a position to try to reproduce for a few months.

Indeed the 'Edit source' tab comes from VE, we can easily change the text to 'Edit' using the hook SkinTemplateNavigation::Universal.

I noticed another bug with the tabs: View source is shown to a publisher without a 'newsletter-*' right instead of the Edit tab. The solution is to merge this patch which will sort who can edit a Newsletter page.

Change 537144 had a related patch set uploaded (by Artrix; owner: Artrix):
[mediawiki/extensions/Newsletter@master] Fix inconsistent tabs in Newsletters page.

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