Hovercards disables itself when a gadget called Navigation_Popups is loaded, but there is no reason for the NavPopups gadget to be called that: the people copying it to another wiki might localize the name (e.g. on the Hungarian Wikipedia it's called Latszer). That results on both popups being shown, which can be somewhat jarring:
Description
Details
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Resolved | Jdlrobson | T135630 Hovercards and NavPopups conflict | |||
| Resolved | phuedx | T135628 Hovercards overrides NavPopups; should be the other way around |
Event Timeline
I'm not 100% sure but the recent occurrence might have been something like:
- open a page with both enabled
- disable navpopups in another tab
- hover
Maybe Hovercards checks whether NavPopups is enabled at the moment of hovering, not whether it was enabled at the time of the page load?
This is about the two showing up at the same time. That suggests some error in the logic that is likely to remain even if you flip the priorities.
This seems to be happening all the time now. Steps to reproduce:
- visit huwiki in incognito browser
- register account
- visit preferences, enable Hovercards and NavPopups, save
- visit recent changes (or whatever)
- hover over some article
Both popups will show.
(Chrome 50.0.2661.86 on Ubuntu 14.04)
Change 292487 had a related patch set uploaded (by Bmansurov):
Do not show Hovercards when NavPopups gadget is enabled on huwiki
Temporary fix has been created. A long term proper fix is still needed. Some suggestions from IRC:
17:41 tgr: in general, I think using wikidata is neat if the WD community is up for it
17:43 tgr: iw-link the gadget definition pages (e.g. https://en.wikipedia.org/wiki/MediaWiki:Gadget-Navigation_popups ) to each other and that gives you the RL module name
@Tgr please feel free to add your other suggestions here.
Change 292487 merged by jenkins-bot:
Do not show Hovercards when NavPopups gadget is enabled on huwiki
Change 292497 had a related patch set uploaded (by Dereckson):
Do not show Hovercards when NavPopups gadget is enabled on huwiki
Change 292497 merged by jenkins-bot:
Do not show Hovercards when NavPopups gadget is enabled on huwiki
@bmansurov @Tgr What about having a config variable like $wgPopupsDisableWhenGadget = "latszer"; with a default of "Navigation_popups"?
It will mean checking the gadget name on every wiki we want to deploy, but it is flexible to change per wiki.
I don't like adding more config variables, but I also don't like an extension checking adhoc for gadgets and we're doing it, so this seems like a sensible solution.
Thoughts?
It's probably more scalable to use a system message: define a message key like poups-navpoup-gadget-name with Navigation_popups as the English text and {{notranslate}} in qqq, ask editors (e.g. on the wikitech-ambassadors list) to put the gadget name on the corresponding MediaWiki page, and use $msg->inContentLanguage() to load it.
What would happen when we want to enable Popups for all wikis? I think this approach maybe one of the last resorts.
Can someone update the description. I'm a little confused with why this wasn't fixed.
This shouldn't be possible - the Hovercards code is not invoked when the gadget is enabled.
Thanks @Tgr
The logic for checking if Hovercards is enabled is here:
https://github.com/wikimedia/mediawiki-extensions-Popups/blob/master/resources/ext.popups.targets/desktopTarget.js#L7
I don't see any check against Navigation_Popups - it seems strictly feature detection. What am I missing?
Yes, although not perfect, it solves the problem. The solution is not good because we need to check whether the NavPopups gadget is enabled each time the user hovers over a link. @Tgr, do you think we should find an alternative solution and repurpose this task or can we close it as invalid/fixed?
If you want to avoid loading the Hovercards JS when NavPopups is enabled, you need a better way to detect it, but that should probably have its own task. If you don't care about that, I don't see much disadvantage to checking on every hover.
This appears to still be happening, at least on the Italian Wikipedia.
Steps to reproduce:
- Visit it.wikipedia.org
- Log in
- Enable Popup di navigazione (NavPopups) in user preferences
- Visit an article and hover over a link.
Both features appear, sometimes overlapping.
Expected behavior: After enabling NavPopups gadget, Page Previews should be suppressed.
I reopened this task as it appeared to be the most recent. Happy to open a new task if desired.
Thanks! I've opened up T178438 with more specifics to avoid confusion with the Hungarian case.

