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

Cannot reproduce this - as look at this one here:

image.png (145×441 px, 7 KB)

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

image.png (68×251 px, 3 KB)

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.

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 subscribed.

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

Change 537144 abandoned by Artrix:

[mediawiki/extensions/Newsletter@master] Fix inconsistent tabs in Newsletters page.

Reason:

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