Page MenuHomePhabricator

Special:Changecontentmodel should explicitly tell a user they have created a new page if they have done that
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue:

  • Go to Special:ChangeContentModel, and go through the process of “changing” the content model of a non-existent page

What happens?:

The page is created as a blank page, but shows the message mw-changecontentmodel-success-text stored at MediaWiki:changecontentmodel-success-text:

The content type of [[:$1]] has been changed.

What should have happened instead?:

At the very least, the following message should've been displayed instead:

[[:$1]] has been created as a blank page with the new content model. Please add content to avoid leaving a blank page.

(Also note here that the message doesn't tell us which content model it has been changed to, but that's a different issue, probably a different ticket) Raised at T401656: Special:ChangeContentModel should tell the user the new content model in its system message. Cross-referencing the solution to that would suggest:

Created new $3 page

[[:$1]] has been created as a blank page with the content model $3.  Please add content to avoid leaving a blank page.

Details

Event Timeline

Xaosflux subscribed.

It should also explicitly say that you will be publishing a new page/revision if this workflow is being used to author a new page.

Might also want to mention its capability to create new pages with a sentence in the interface of form 1:

image.png (1,602×445 px, 45 KB)

Might also want to change the "Change" button to "Create" when the page doesn't exist for form 2:

image.png (1,663×1,037 px, 111 KB)

I was thinking of coding this up real quick, but Pppery has claimed it, so will instead post some suggested acceptance criteria:

  • form 1: add a message key with text similar to "This form can also be used to create pages with a particular content model."
  • form 2: if the page doesn't exist, change the "Change" button to say "Create"
  • form 2 success message: in the case of new page creation, change message key to say [:$1]] has been created as a blank page with the content model $3. Please add content to avoid leaving a blank page.

Feel free to steal this from me if you want to; I have lots of other things to do.

I was thinking of coding this up real quick, but Pppery has claimed it, so will instead post some suggested acceptance criteria:

  • form 1: add a message key with text similar to "This form can also be used to create pages with a particular content model."
  • form 2: if the page doesn't exist, change the "Change" button to say "Create"
  • form 2 success message: in the case of new page creation, change message key to say [:$1]] has been created as a blank page with the content model $3. Please add content to avoid leaving a blank page.

Yes, but also if these are being lumped together, then T401656: Special:ChangeContentModel should tell the user the new content model in its system message:

  • form 2 success message: in the case of changing the content model of an existing page, alter mw-changecontentmodel-success-text to mention the old and new content models: The content model of [[:$1]] has been changed from $2 to $3.
  • form 2 success message title: also in the case of changing the content model of an existing page, alter mw-changecontentmodel-success-title to content model changed.

PS:

[ ] form 2 success message title: in the case of new page creation, title should say New page created with content model

Change #1270615 had a related patch set uploaded (by Pppery; author: Pppery):

[mediawiki/core@master] ChangeContentModel: Handle creating a new page in UI

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

Change #1270615 merged by jenkins-bot:

[mediawiki/core@master] ChangeContentModel: Handle creating a new page in UI

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