Page MenuHomePhabricator

Provide some method to blank messages like MediaWiki:Excontent
Closed, ResolvedPublic

Description

Author: mike.lifeguard+bugs

Description:
There is currently no way to have the following messages blank (in all likelihood, all messages are similarly affected):
excontent
excontentauthor
exblank
exbeforeblank
With the introduction of the MediaWiki:Deletereason-dropdown, there is little or no need for these automatic reasons. Having them blank should be an option regardless.


Version: unspecified
Severity: minor
See Also: T52124: Difficult to create blank MediaWiki message

Details

Reference
bz12647

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:02 PM
bzimport set Reference to bz12647.
bzimport added a subscriber: Unknown Object (MLST).

(In reply to comment #0)

(in all likelihood, all messages are similarly affected)

All messages that are treated as wikitext can be easily blanked by just changing them to <!-- This message is empty on purpose -->

mike.lifeguard+bugs wrote:

For these messages (at least), such a comment (along with &nbsp; or anything else I've tried, including END) gets put into wpReason as a literal string. A single space results in MediaWiki using the default message.

skizzerz wrote:

(In reply to comment #1)

(In reply to comment #0)

(in all likelihood, all messages are similarly affected)

All messages that are treated as wikitext can be easily blanked by just
changing them to <!-- This message is empty on purpose -->

Unfortunately, these messages are NOT treated as wiki text and instead are treated as literal strings, no matter what gets put into them. I browsed around the source but I can't seem to find why having an empty message or a message containing a single space are going back to being the default message in these instances.

I'm assuming all messages that are interpreted this way (literal strings that are used to auto populate input fields of forms) have the same issue as well.

All messages fall back to the default value when the page is blank.

These particular messages are not meant to be blank.

*** Bug 16493 has been marked as a duplicate of this bug. ***

mike.lifeguard+bugs wrote:

(In reply to comment #4)

All messages fall back to the default value when the page is blank.

These particular messages are not meant to be blank.

Given that there seems to be support to allow this, I'm re-opening.

Isn't this about $wgUseAutomaticEditSummaries?

happy_melon wrote:

No, that variable controls *edit* summaries, not things like this. At least I can't see anywhere in source for the delete autoreasons to be affected by that variable.

The general standard is putting "-" into a UI message to blank it, but this requires explicit support from the code that creates that element.

r44127 should handle this; Article::generateReason() (the internal function which creates these autosummaries) will now return a blank string if the message came out as '-'.