Page MenuHomePhabricator

Inconsistent arguments comment/reason/summary for edit messages
Open, HighPublicFeature

Description

Author: pyfisch

Description:
When editing, deleting or protecting a page you can add a message. This message is passed to the methods of the Page object or one of its subclasses. The name of the argument is always different, when editing a page or changing a category it is "comment" when protecting, moving or deleting it is "reason". In site.py it is always "summary", like in the MediaWiki api.

In some scripts like for example category.py they use "editSummary" internall, eg. in category.py.

Scripts that have a commandline parameter for an edit summary (always?) call it "-summary".

I propose to change all "reason" and "comment" arguments to "summary" because this is the term used in site.py, in script commandline parameters and by MediaWiki itself.


Version: core-(2.0)
Severity: enhancement

Details

Reference
bz60442

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:03 AM
bzimport set Reference to bz60442.
bzimport added a subscriber: Unknown Object (????).

This messy behavior originates in the MediaWiki API:

  • "reason" is used to make actions that will be logged: [[mw:API:Delete#Parameters]], [[mw:API:Protect#Parameters]], etc.
  • "summary" is used when editing: [[mw:API:Edit#Parameters]]
  • "comment" is used when getting data (both revisions and logs): [[mw:API:Properties#Revisions:_Parameters]], [[mw:API:Logevents#Parameters]]

Definitely a big +1 for making this area more consistent.

MediaWiki uses "comment" in its database schema as well as several data retrieval entry points, and we are generally using "comment" in RESTBase, including the HTML save API discussed in T101501. If there is broad agreement (based on an RFC, say) to generally move to one of the other names instead, then we'd be happy to follow that as well.

Xqt triaged this task as High priority.May 28 2017, 11:53 AM
Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 12:23 PM
Aklapper removed a subscriber: GWicke.