Page MenuHomePhabricator

Red links to templates should be in class "error"
Closed, DeclinedPublic

Description

Author: rene.kijewski

Description:
Currently you have to use #ifexist to test if a given template exists. But it would be quite more easy and intuitive to simply wrap the actual call in #iferror without any further branches.


Version: unspecified
Severity: enhancement

Details

Reference
bz15729

Related Objects

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 10:23 PM
bzimport added a project: MediaWiki-Templates.
bzimport set Reference to bz15729.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Sep 26 2008, 4:16 AM

rene.kijewski wrote:

I think it had to be changed in line 02969 (next to "# If the title is valid but undisplayable, make a link to it") of includes/parser/Parser.php (r41837):

  • $text = "[[:$titleText]]";

+ $text = "[[:$titleText|<span class=\"error\">$titleText</span>]]";

or something alike.

mike.lifeguard+bugs wrote:

Don't redlinks already have a class? If so, do we want to add another one/replace it?

<a href="..." class="new" title="Template:Doesn'texist (does not exist)">Template:Doesn'texist</a>

Hmm, the semantics of 'error' and 'new' are quite different IMO.

happy.melon.wiki wrote:

The error class is for just that, messages indicating an unambiguous error in page rendering. There is nothing necessarily wrong with a redlink; it's entirely possible that that was the intention. WONTFIX.