Page MenuHomePhabricator

permissionserrorstext-withaction produces an erroneous message when used with action-createpage in some situations
Closed, ResolvedPublic

Description

The default English value of [[MediaWiki:Permissionserrorstext-withaction]] is "You do not have permission to $2, for the following reasons:", and the default value of [[MediaWiki:Action-createpage]] is "create pages". When a user tries to create a page but they don't have the correct permissions, these messages are used together to make "You do not have permission to create pages, for the following reasons:".

However, this message is not true for registered users who try to edit a create-protected page. They do have the permission to create pages in general, they just don't have the permission to create that particular page. (That is, unless that particular wiki disallows page creation by non-admin users, or something else funky like that.)

For example, go to this link as a registered non-admin user: https://test.wikipedia.org/w/index.php?title=This_is_just_a_test&action=edit

That will show the message above, but it is still possible to create other pages on testwiki.

Also, on most Wikimedia wikis IPs are allowed to create talk pages, and on enwiki they are allowed to create drafts, which means the message isn't really true for them either.

I see two possible fixes, depending on whether action-createpage is used in messages other than permissionserrorstext-withaction. If it isn't, we can just change action-createpage to "create this page". If it is, we may need to create a new message to use with permissionserrorstext-withaction.

I've brought this up on enwiki's village pump too, but no responses so far: [[WP:VPT#Action-createpage]].


Version: 1.23.0
Severity: minor

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:14 AM
bzimport set Reference to bz59200.
bzimport added a subscriber: Unknown Object (MLST).

What if the code on the page was something like:

{{#ifexist:{{FULLPAGENAME}}|create pages|{{#ifeq:{{PROTECTIONLEVEL:edit|{{FULLPAGENAME}}}}|sysop|create this page}}}}

So that only pages that do not exist but are sysop protected (implicitly create protected) show "create this page" and the rest show "create pages". Would that be too hacky?

(In reply to comment #1)

What if the code on the page was something like:

{{#ifexist:{{FULLPAGENAME}}|create pages|{{#ifeq:{{PROTECTIONLEVEL:edit|{{FULLPAGENAME}}}}|sysop|create this page}}}}

So that only pages that do not exist but are sysop protected (implicitly create
protected) show "create this page" and the rest show "create pages". Would
that be too hacky?

Okay, so I played with this idea on [[testwiki:]] (https://test.wikipedia.org/w/index.php?title=MediaWiki:Action-createpage&action=history) and came up with:

{{#ifeq:{{PROTECTIONLEVEL:create|{{FULLPAGENAME}}}}|sysop|create this page|create pages}}

This works. Maybe this is something that should be fixed in core at some point, but this works for me for now.

af.torkin wrote:

This bug should also be fixed for [[MediaWiki:Action-createtalk]], which has the same problem (it says 'create discussion pages'). It's been changed locally for now (https://en.wikipedia.org/w/index.php?title=MediaWiki:Action-createtalk&action=history) but it would be nice to have the default text be changed as well.

Change 295634 had a related patch set uploaded (by Amire80):
Re-word action-createpage and action-createtalk in singular

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

Change 295634 merged by jenkins-bot:
Re-word action-createpage and action-createtalk in singular

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

TTO assigned this task to Amire80.
TTO subscribed.

Seems this was fixed by Amir's patch in June.