Page MenuHomePhabricator

MediaWiki:Cascadeprotected and MediaWiki:Cascadedprotectedwarning should take the same parameters
Open, MediumPublic

Description

Author: happy_melon

Description:
These templates are mutually exclusive: [[MediaWiki:Cascadeprotectedwarning]] is displayed when the user does not have the ability to edit through the protection, [[MediaWiki:Cascadeprotectedwarning]] is displayed when they can edit.

[[MediaWiki:Cascadeprotected]] takes two parameters, $1 being the number of locking pages, and $2 being a list of links to those pages. [[MediaWiki:Cascadeprotectedwarning]], on the other hand, only takes the first parameter (number of locking pages), and hardcodes the display of the list of pages underneath.
This means that it is, for instance, impossible to apply ids or styles to the whole section. [[MediaWiki:Cascadeprotectedwarning]] should be modified to define the display of both the message and the list.

./languages/i18n/en.json:	"cascadeprotected": "This page has been protected from editing because it is transcluded in the following {{PLURAL:$1|page, which is|pages, which are}} protected with the \"cascading\" option turned on:\n$2",

./languages/i18n/en.json:	"cascadeprotectedwarning": "<strong>Warning:</strong> This page has been protected so that only users with administrator privileges can edit it because it is transcluded in the following cascade-protected {{PLURAL:$1|page|pages}}:",

Version: unspecified
Severity: minor

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:20 PM
bzimport set Reference to bz16111.

Volunteered by Amir during bug triage.

I read the relevant code and i think that i have several options for fixing this, but i wonder:

  1. Is there a reason to keep the two messages? Maybe they can be merged? They are almost identical in every regard.
  1. Is there a reason to keep the pages list as a parameter?

Happy-melon: Can you answer comment 2, please?

Happy-melon: Can you answer comment 2, please?

  1. Although the messages appear similar in the default installations, many wikis have heavily customized each of them in different ways. I don't think it would be beneficial to merge the messages.
  2. Many wikis display the list within custom code, which wouldn't be possible without it being a parameter.
Amire80 subscribed.

What is the status of this ticket? Can it go in for Google-Code-in-2017? If so, I can help mentor :).

Change 789944 had a related patch set uploaded (by Stang; author: Stang):

[mediawiki/core@master] EditPage: Unify parameters for "cascadeprotected" and "cascadedprotectedwarning"

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

Stang raised the priority of this task from Low to Medium.