Page MenuHomePhabricator

Hovercards: doesn't show popup for [[Special:MyLanguage/Some page]] links on mw.org
Closed, DuplicatePublic

Description

Lots of links on mw.org are of the form [[ Special:MyLanguage/Some page ]] for i18n.

Hovercards doesn't show a popup for these. It makes its API request, but gets back e.g.

"pages": {
    "-1": {
        "ns": -1,
        "title": "Special:MyLanguage/Data and developer hub",
        "special": ""
    }
}

instead of useful information.

Either the Popups extension or the API query needs to "push through" Special:MyLanguage HTTP/1.1 302 forced.302 to the page in the user's language. FWIW Popups' API request specifies redirects=true.

This Sandbox edit shows the problem

Event Timeline

Spage raised the priority of this task from to Needs Triage.
Spage updated the task description. (Show Details)
Spage added a subscriber: Spage.

The "push through" would probably apply to all RedirectSpecialPage subclasses when redirects=true. The annoying part being having to go through the list of special pages and find which ones are.

The "push through" would probably apply to all RedirectSpecialPage subclasses when redirects=true. The annoying part being having to go through the list of special pages and find which ones are.

by the inheritance tree of RedirectSpecialPage that are for core: https://doc.wikimedia.org/mediawiki-core/master/php/html/classRedirectSpecialPage__inherit__graph.png

I think you misunderstood. The problem isn't in identifying that a particular special page is a subclass of RedirectSpecialPage, instanceof or is_subclass_of() handles that fine.

The problem is that the API code having a possibly-large list of special page titles would need to fetch the class implementing each one and check each one individually, which could turn out to be slow. And Gerrit change 152755 made it so we'd have to instantiate each special page, which would be even slower.

And we would have to consider what to do if the target of the RedirectSpecialPage is itself a redirect.

Jdlrobson triaged this task as Lowest priority.Sep 23 2015, 6:59 PM
Jdlrobson added a subscriber: Jdlrobson.

Isn't this fixed? Hovercards should not run on special pages and in your sandbox when I hover over the link nothing happens as expected.

I don't think investing time in making them work cross language is a worthy investment at this time (if that's what's being asked for we should convert this bug into an epic)

Isn't this fixed? Hovercards should not run on special pages and in your sandbox when I hover over the link nothing happens as expected.

This task is precisely about making Hovercards follow RedirectSpecialPages in addition to 'standard' redirects. Popups are otherwise quite useless on mediawiki.org.