Page MenuHomePhabricator

Identify redirects with CSS class *everywhere*
Closed, ResolvedPublic


Since we already store is-redirect info for each entry in cur, adding a visual
feature / distinction to identify links that link to redirects, with the same
query that tests for existence, should not impose a performance hit. It would
help catch inappropriate redirects, and reduce the number of redirs alltogether.

Version: unspecified
Severity: enhancement



Related Objects

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 6:45 PM
bzimport set Reference to bz166.
bzimport added a subscriber: Unknown Object (MLST).

timwi wrote:

This bug does not depend on bug 17; removing dependency.

There is already 4 colours for links (visisted|unvisited) + (existent|nonexistent).

When redirect to an article one see a notice like:
"redirected from [[redirection article]]"

That should be enough to fix redirects :o) wrote:

I'm going to reopen this, and say that while they should not be visually identified, they should be identifi*able*, with an appropriate CSS class as we do for new/extiw/external/stub etc. The number of requests we have to do this in individual places clearly demonstrates the desirability of marking them universally, and now that we have a usable and cannonical redirect table, this should be fairly simple to implement in Linker::link().

It sounds like this was attempted in bug 12968, but I guess not completely? wrote:

*** Bug 4709 has been marked as a duplicate of this bug. *** wrote:

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

Class is already added universally to all links... except when using linkKnown().

I think this bug can be easily addressed. We use this mechanism on special:Allpages to differ between pages and redirects, so can be done the same for the rest of the pages.

rMWc66b6a1e4371: Remove 'noclasses' from Linker::linkKnown() defaults should fix all the remaining cases, unless things are bypassing LinkRenderer.

TheDJ claimed this task.
TheDJ added a subscriber: TheDJ.

No known cases remain, if you find one, simply open a new separate task, instead of reopening the tracking bug.