Page MenuHomePhabricator

Use CommentStore::COMMENT_CHARACTER_LIMIT everywhere
Closed, ResolvedPublic

Description

Comments used to be limited to 255 characters, a value that is hard-coded into multiple automatic edit summary truncation systems. Instead of relying on 225 (or not including a limit at all until the comment is actually saved), CommentStore::COMMENT_CHARACTER_LIMIT should be called instead.

Original proposal:
Could someone please add a global variable (eg $wgTruncatedCommentLength) for specifying the length that long summaries or auto-summaries are truncated to? There's three places in Article.php where this is done in the functions getBlankingAutosummary(), getAutosummary() and the end of delete().

Details

Reference
bz11543

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:59 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz11543.
bzimport added a subscriber: Unknown Object (MLST).

Note that they should all be truncated to the defined field length (255 bytes) fairly consistently, but it wouldn't hurt to use a global var here, per http://c2.com/cgi-bin/wiki?MagicNumber :)

DannyS712 subscribed.

The maximum comment length is set at CommentStore::COMMENT_CHARACTER_LIMIT. In cases where the old hardcoded 255 (current is 500) are used, the comment store constant should be retrieved instead. I don't think a full global variable is needed here, since all uses of the limit are based around creating edit summaries and can just retrieve the comment store value. See also T221617

DannyS712 renamed this task from Replace hard-wired auto/truncated revision-summary length with a global to Replace hard-wired auto/truncated revision-summary length with CommentStore::COMMENT_CHARACTER_LIMIT.Aug 21 2019, 11:09 PM
DannyS712 updated the task description. (Show Details)
DannyS712 renamed this task from Replace hard-wired auto/truncated revision-summary length with CommentStore::COMMENT_CHARACTER_LIMIT to Use CommentStore::COMMENT_CHARACTER_LIMIT everywhere.Sep 30 2019, 5:49 AM
DannyS712 updated the task description. (Show Details)
Aklapper subscribed.

Removing task assignee due to inactivity, as this open task has been assigned for more than two years. See the email sent to the task assignee on February 06th 2022 (and T295729).

Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be welcome.

If this task has been resolved in the meantime, or should not be worked on ("declined"), please update its task status via "Add Action… 🡒 Change Status".

Also see https://www.mediawiki.org/wiki/Bug_management/Assignee_cleanup for tips how to best manage your individual work in Phabricator.

Umherirrender subscribed.

Many work were also done in T185948, looks fixed for core. When there are still places, please open a new task against the specific special page or action