Page MenuHomePhabricator

Transclude the new user landing page instead of redirecting
Closed, ResolvedPublic

Description

Original:

Currently when non-confirmed users in English Wikipedia trying to create an article (including using action=edit), they are redirected to https://en.wikipedia.org/wiki/Wikipedia:New_user_landing_page. This page is very not user friendly:

  1. No deletion log is shown. Therefore the links does not make sense in some pages, e.g. https://en.wikipedia.org/wiki/Wikipedia:List_of_hoaxes_on_Wikipedia.
  2. No search button is shown.
  3. No links to other Wikimedia project is shown.
  4. No reason that they (non-confirmed users) can not create article is shown (only apply to action=edit).
  5. The langing page only encourage users to create new articles, not to search existing articles.
  6. When using Article Wizard, user must type article name again, and there're no easy way to retrieve article name (other than URL of landing page).

Possible solution:

  1. Install Extension:UrlGetParameters on English Wikipedia. This does not resolve issue 1.
  2. Do not redirect users to a landing page, instead using a new MediaWiki message similar to MediaWiki:Noarticletext/MediaWiki:Noarticletext-nopermission and MediaWiki:Nocreatetext. This solves issue 1-5 (but not 6).

Event Timeline

All these issues can be resolved on wiki. But you've to talk to the enwiki community first to even see whether they agree those perceived problems exist.
If they do, the landing page can be revamped. That's easily doable via templates or js. The extensions main purpose is to intercept and redirect without defining what that landing page contains. It does that job perfectly, and I don't think hardcoding is a good idea here.

My question is why to redirect the page instead of showing a message? And why we need a specific extension? The landing page can be easily transcluded into any MediaWiki messages.

All these issues can be resolved on wiki. But you've to talk to the enwiki community first to even see whether they agree those perceived problems exist.
If they do, the landing page can be revamped. That's easily doable via templates or js. The extensions main purpose is to intercept and redirect without defining what that landing page contains. It does that job perfectly, and I don't think hardcoding is a good idea here.

Adding the search results to this page such as are on all of the other "followed a redlink" pages was the recent ask -- as T8883 was refused and T63007 hasn't been done for 7 years is your "easily doable via js" suggesting running a "If on page X" in something like common.js?

My question is why to redirect the page instead of showing a message?

My guess is that it was just easier to do. Changing the editing interface to not actually display an editing interface is tricky.

We've managed to do that in DiscussionTools, but it took several tries to get it right. You can see an example at https://test.wikipedia.org/w/index.php?title=Talk:Page325&action=edit&redlink=1. Our solution could probably be adapted to ArticleCreationWorkflow easily enough now. Relevant code: https://codesearch.wmcloud.org/search/?q=shouldDisplayEmptyState

Change 904865 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/ArticleCreationWorkflow@master] Transclude the landing page instead of redirecting

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

Bugreporter renamed this task from ArticleCreationWorkflow should be improved to Transclude the new user landing page instead of redirecting.Apr 1 2023, 8:27 AM
Bugreporter updated the task description. (Show Details)

Note I have renamed this task to fit what is going on. It will only be enwiki's matter to redesign new user landing page to fix #1 to #5. (to fix #6 article wizards may be redesigned as single page application, which is also matter of enwiki).

There are other possible improvements of ArticleCreationWorkflow (in low priority) which I will split to dedicated task.

Change 904865 merged by jenkins-bot:

[mediawiki/extensions/ArticleCreationWorkflow@master] Transclude the landing page instead of redirecting

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

@matmarex Should the Wikipedia:New_user_landing_page be transcluded when trying to create a page which has previously been deleted?

For example, https://en.wikipedia.beta.wmflabs.org/w/index.php?title=Xmmxcmvxc&action=edit

acw_deleted.png (805×1 px, 185 KB)

If I try to create a new article with VisualEditor (I have done this by going to https://en.wikipedia.beta.wmflabs.org/w/index.php?title=Uitruirueirueoiw&veaction=edit) it does not transclude the Wikipedia:New_user_landing_page page. Instead, it opens VE (although you cannot edit).

This is in contrast to production, which redirects https://en.wikipedia.org/wiki/Uiruwrioweuriweruio?veaction=edit.

We also don't intercept action=submit, for example https://en.wikipedia.beta.wmflabs.org/wiki/jsfkljsdlf?action=submit just says You do not have permission to create new pages.

We do intercept currently on production.

@matmarex Should the Wikipedia:New_user_landing_page be transcluded when trying to create a page which has previously been deleted?

For example, https://en.wikipedia.beta.wmflabs.org/w/index.php?title=Xmmxcmvxc&action=edit

Yes. This works as expected for me:

image.png (2×3 px, 410 KB)

Make sure you're testing with a non-autoconfirmed account.

If I try to create a new article with VisualEditor (I have done this by going to https://en.wikipedia.beta.wmflabs.org/w/index.php?title=Uitruirueirueoiw&veaction=edit) it does not transclude the Wikipedia:New_user_landing_page page. Instead, it opens VE (although you cannot edit).

This is in contrast to production, which redirects https://en.wikipedia.org/wiki/Uiruwrioweuriweruio?veaction=edit.

Thanks, that's an interesting edge case I didn't consider. However, it looks like this only happens if you manually navigate to &veaction=edit or &veaction=editsource, which can already be used to force the editor to open on pages where it's not normally available (e.g. protected pages, or pages in the wrong namespaces). When you just follow a red link, or navigate to &action=edit, you correctly get the landing page, and the editor does not open (even if you select "Always give me the visual editor if possible" in preferences). This seems acceptable to me.

We also don't intercept action=submit, for example https://en.wikipedia.beta.wmflabs.org/wiki/jsfkljsdlf?action=submit just says You do not have permission to create new pages.

We do intercept currently on production.

This is intentional, so that when a user starts an edit and then loses the ability to create the page while previewing (e.g. their autoconfirmed status is revoked by an abuse filter), they will be able to retrieve the wikitext of their edit, instead of losing it because the editor is replaced by the landing page. (Editing tools like VE also do not take over action=submit for similar reasons.)

@matmarex Should the Wikipedia:New_user_landing_page be transcluded when trying to create a page which has previously been deleted?

For example, https://en.wikipedia.beta.wmflabs.org/w/index.php?title=Xmmxcmvxc&action=edit

Yes. This works as expected for me:

It works for me now as well. Not sure what was happening before. Perhaps caching?

EDIT: Indeed, I deleted https://en.wikipedia.beta.wmflabs.org/wiki/Sandbox and initially my non-confirmed user saw what I was seeing in T204234#8846704. However, after a couple of minutes and a few refreshes I saw the New_user_landing_page.

I think I am done testing this.

You can see examples on beta of the new user landing page being transcluded (you may need to create a new account first):

image.png (2×3 px, 410 KB)

Example shows use of {{PAGENAME}} in new user landing page.

We changed the hooks on which ArticleCreationWorkflow is fired, so I tested some of the extensions and features which also use the old[1] and new[2] hooks in case there was any interference. Found the issue in T204234#8846849.

I also wanted to work out when/where the new and old hooks were being fired[3] in case there were circumstances where the new user landing page was not being transcluded when it could be. Found the issue in T204234#8847459.

Test environment: https://en.wikipedia.beta.wmflabs.org

Ref:

  1. Old hooks:
  2. New hooks:
  3. Where hooks are fired (probably not exhaustive):