Page MenuHomePhabricator

When creating a newsletter, the default newsletter page should be offered as Main Page
Open, MediumPublic

Description

When creating a new newsletter, defining a new page is required. If there is no newsletter page, one needs to be created manually.

However, when the newsletter is created, a new special page is created for that newsletter automatically. That page contains the title, description, a subscribe button... It also comes with a Talk page. For many newsletters, that might be all what they need.

Imagine that by default, the newsletter Main Page will be the new special page about to be created. If the publisher doesn't introduce any information, this will be it. If the publisher adds another page (as we do now), then the Main Page will be that one instead.

Event Timeline

I have created a newsletter that has the newsletter page as its main page. I have cheated:

https://www.mediawiki.org/w/index.php?title=Tech_Showcase&redirect=no

well - this can affect the logic a bit as we require the page to exist during the time of Newsletter creation. Can be changed, of course.

I like @QuimGil's cheat to it. Could we use that as the fallback behaviour if the page does not exist? I can write the patch if this sounds like a good idea.

To clarify, the behaviour would be if the chosen page does not exist create it with a redirect to the Newsletter: page

At least from a UX point of view, I see the behavior differently: the Newsletter page is by default the Special page about to be created, unless the user defines an existing wiki page.

In terms of UI, the field would be optional (now is required) and by default it would show the title of the page to be created, in gray letters. The label would still say "Wiki page with information about the newsletter", no changes there.

In terms of UI, the field would be optional (now is required) and by default it would show the title of the page to be created, in gray letters. The label would still say "Wiki page with information about the newsletter", no changes there.

Looks good. We can put the to-be-created newsletter page as a placeholder text, .shaded grey. Like this:

image.png (222×501 px, 11 KB)

Looks like a good Google-Code-in-2018 task. @Chicocvenancio feel free to add yourself as a mentor once I have this on the GCI app.

Change 477122 had a related patch set uploaded (by LukBukkit; owner: LukBukkit):
[mediawiki/extensions/Newsletter@master] Use the newsletter special page as main page when not set

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

Hello @Bawolff @Legoktm @hoo,
it would be nice, if you've got time to look at my change.

Here a short explanation of the problem which I'm trying to solve with this change:

We need a pageid for a newsletter database entry.
But we can only get the pageid for the Newsletter: special page if the page has been created.
Before this patch the behavior was to insert our custom data about the newsletter into the database and then to create the special page.
But this doesn't work anymore with our requirements as we want to use the exact same with we create in the database.
So we have create the special page before the database insert and delete it again if something goes wrong.

I tested it locally and it works fine but maybe there is a better way?

Change 477122 abandoned by LukBukkit:
[mediawiki/extensions/Newsletter@master] Use the newsletter special page as main page when not set

Reason:
No review was performed

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