Page MenuHomePhabricator

Take the reader gender when the user is missing in the magic word GENDER
Closed, DeclinedPublic

Description

Author: crochet.david

Description:
I would add an improvement to the magic word GENDER :

in {{GENDER:$1|$2|$3|$4}}
if $1 is missing
take the reader gender of the page ( $1 = wgUserName )


Version: 1.14.x
Severity: enhancement

Details

Reference
bz17397

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 21 2014, 10:28 PM
bzimport added a project: MediaWiki-General.
bzimport set Reference to bz17397.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Feb 7 2009, 12:05 PM

herd wrote:

For the same reason core doesn't support {{USERNAME}} (bug 4196), it won't support this. This is incompatible with caches (it either becomes broken by it, or breaks cache coherency, or forces a disabling of cache for a given page, and none of these are generally tolerated on WMF wikis), and pointless for the vast majority of pageviews (those being the anonymous viewers).

Similar is {{USERIFCODE}} (bug 2085), which is still under argument.

lambdav wrote:

The gender tag should be enhanced to enable using the current username when none is provided. Otherwise, this tag is quite useless.

Cache coherency is not a valid argument as the problem can be solved easily: When a user specific information is included in a wiki page (username, gender, other), the page identifier in the cache must include the user name (or user account identifier), and nothing for IP users.

For interface messages the parser function works like that since the begin (r46247), but it is not possible to support that inside wikitext, because that breaks cache.

This will not be resolved for the reason stated in comment 3.

(In reply to comment #2)

The gender tag should be enhanced to enable using the current username when
none is provided. Otherwise, this tag is quite useless.

GENDER is perfectly useful without the feature you request:
USERBOX: "{{PAGENAME}} is an admin on {{SITENAME}}, you may contact {{GENDER:{{PAGENAME}}|him|her|them}} for for help."

Your request is ONLY useful in a situation where the article is talking to the user. Which is an extreme rarity.

Cache coherency is not a valid argument as the problem can be solved easily:
When a user specific information is included in a wiki page (username, gender,
other), the page identifier in the cache must include the user name (or user
account identifier), and nothing for IP users.

Cache issues are a valid argument. Your suggestion on how to /fix/ the issue is absolutely ridiculous.
What you describe will fragment the cache such that we store a completely different cache for each and every user. The page will be re-parsed over and over as different users use it. This is almost the same as disabling the cache entirely. And not only that, it also carries the issue of exponentially growing the cache size. Which starts erasing good caches that can be used for everyone just to store caches that are only useful for one user and essentially worthless. That kind of thing hurts an entire wiki's performance.

And frankly, no one has even detailed a single scenario where using the reader gender in an article rather than an interface message is useful.