Jump to content

Wikipedia talk:Tools/Navigation popups

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Quiddity (talk | contribs) at 22:09, 2 August 2023 (Revisit a popup: Reply). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

This page is for discussing Navigation popups and reporting bugs you encounter with it. Please be aware that the original author of Popups (Lupin) is no longer active on Wikipedia. All issues are handled at the discretion of other experienced editors. Note that this project has an associated Phabricator project where implementation-related discussion happens.

Not sure how to explain your problem clearly? Read How to Report Bugs Effectively for some general pointers.

Some common questions are answered in the FAQ.


Hint/tooltip glitches

Good day,

The altering of the action object property in the getPrintFunction function, in these two cases (lines 5679 and 5688):

	case 'unwatch': case 'watch':
		this.print=magicWatchLink; this.action=this.id+'&autowatchlist=1&autoimpl=' + popupString('autoedit_version') + '&actoken='+autoClickToken(); break;
	case 'delete':
		this.print=wikiLink; this.action='delete';
		if (this.article.namespaceId()==pg.nsImageId) {
			var img=this.article.stripNamespace();
			this.action+='&image='+img;

and its use for retreiving the i18n tooltip in the wikiLink function (line 6174):

	var hint=popupString(l.action + 'Hint'); // revertHint etc etc etc

result in tooltips with url code between the action term and 'Hint', like: un|watch for any watch/unwatch, and delete for images (hover to see). I guess the altering of action needs to be moved to the switch statement in the wikiLink function (starting at line 6178).

Another one is email user – the i18n key 'EmailuserHint' (line 7049) needs a capital U.

With kind regards — Mar(c). 12:20, 7 January 2019 (UTC)

IPv6 /64 ranges

It would be useful if links for IPv6 addresses (in contributions and watchlists), when moused over, could have an option to produce a list of contributions for the /64 range to which the address belongs instead of just the specific /128 address.[1]

One way to do this would be by splitting the link into two pieces, like this:

2A02:C7F:202:7500:14B3:9AA7:46A3:B9E0

When you mouse over the left side, you should get the contribs for the 2A02:C7F:202:7500::0/64 range (which currently doesn't work). When you mouse over the right side, you get the contribs for just the specific 2A02:C7F:202:7500:14B3:9AA7:46A3:B9E0/128 address.

References

  1. ^ As I understand it, IPv6 addresses are typically allocated in /64 blocks for each user by the provider. E.g., instead of your ISP allocating you a single IPv4 address of 189.201.223.245 (/32), and your router doing network address translation to your internal network of about 256 addresses in a block like 192.168.1.0/24 in a private use range, for IPv6 they will allocate 2A02:C7F:202:7500::0/64 to you and your internal network devices are assigned their addresses from that block (2A02:C7F:202:7500::0 through 2A02:C7F:202:7500:FFFF:FFFF:FFFF:FFFF).

There have been multiple requests to expand the User menu to include a link to Special:CentralAuth. This is really important to editors who do cross-wiki work, such as global sysops and anti-spam folks. Could we please have this one link added? WhatamIdoing (talk) 19:09, 23 August 2022 (UTC)[reply]

+1. —MarcoAurelio (talk) 18:17, 8 February 2023 (UTC)[reply]

conflicts with kartographer

the navigation popups for links to pages starting with a <mapframe> of kartographer only shows a single '[', see the link on de:Benutzer:Herzi Pinki/kartographer-popups. best --Herzi Pinki (talk) 08:25, 16 January 2023 (UTC)[reply]

Issue with vector 2022

Due to the changed layout of vector, it seems that navpopups now show for the action tabs, as they are inside the content. This is determined in the function defaultPopupsContainer. The question now, is how to fix this.. There is no quick an dirty way that doesn't effect vector legacy.. The only thing i can think of is adding: document.querySelector('.skin-vector-2022 .vector-body') into the block before. I think that is safe, as browsers not supporting querySelector should no longer be supported as far as I can tell... diff. There are probably some other options, but this seems like the quickest fix. —TheDJ (talkcontribs) 22:30, 18 January 2023 (UTC)[reply]

@TheDJ this doesn't seem to have worked for me, did your test work? — xaosflux Talk 01:36, 19 January 2023 (UTC)[reply]
Caching, it seems to be working now. — xaosflux Talk 01:37, 19 January 2023 (UTC)[reply]
Fwiw, I thought this was a feature! I've really appreciated having direct access to the recent History via NavPopups, over the months I've been using/testing vector-2022. "Bug or Feature: Yes!" Quiddity (talk) 03:42, 29 January 2023 (UTC)[reply]
I also considered this a feature (although I knew it was technically a regression). By the way, Timeless is still “broken”, i.e. popups appear when I hover over the “tabs” (which are visually even less tabs than in Vector 2022). —Tacsipacsi (talk) 00:35, 30 January 2023 (UTC)[reply]
I did not realize that was a "bug", on Timeless I love being able to quickly see history so please put me in the "it's a feature" camp :) Legoktm (talk) 04:46, 9 February 2023 (UTC)[reply]
I’m pretty sure there is a config option to have pop-ups apply to the entire page! But that is not the default. —TheDJ (talkcontribs) 07:48, 10 February 2023 (UTC)[reply]
Aha, yes! window.popupOnlyArticleLinks=false; adds this back (and adds it to links in the personal-bar and site-sidebar). Thanks! (FYI @Legoktm, Certes, and Tacsipacsi:.) Quiddity (talk) 18:54, 10 February 2023 (UTC)[reply]
I love this feature. It saves me lots of time loading pages, and probably reduces server load too. Please, please don't "fix" it. Certes (talk) 12:40, 9 February 2023 (UTC)[reply]

Two wishlist proposals

I've proposed two wishlist entries related to NavPopups, for things that have been discussed a lot over the last 10+ years:

Please edit/improve the proposals directly or comment there, before 6 February. (Voting starts 10 Feb). Thanks! Quiddity (talk) 03:40, 29 January 2023 (UTC)[reply]

Hello. The "edit counter" link uses https://tools.wmflabs.org/supercount/index.php?user=$user_name&project=$project_domain which redirects to https://xtools.wmflabs.org/ec/$project_domain/$user_name. Could you please update it at MediaWiki:Gadget-popups.js#L-8695 (although there are other lines that mention "supercount"). Thank you. —MarcoAurelio (talk) 18:26, 8 February 2023 (UTC)[reply]

@MarcoAurelio See: MediaWiki_talk:Gadget-popups.js#rvslots_and_edit_counter_fixesTheDJ (talkcontribs) 11:39, 12 April 2023 (UTC)[reply]

Display block reason

Hello. Can you add the display of block reason if a user is blocked?
Previous is below
User:Partha Chakraborty ⋅ actions ⋅ user ⋅ popups
BLOCKED, 19 edits since: 2023-02-18, last edit on 2023-02-19

Now it could be:
User:Partha Chakraborty ⋅ actions ⋅ user ⋅ popups
BLOCKED:Undisclosed paid editing in violation ..... , 19 edits since: 2023-02-18, last edit on 2023-02-19 Lemonaka (talk) 19:55, 19 February 2023 (UTC)[reply]

This script has no activ3 maintainer, but if you write the patch, someone might be willing to deploy it. —TheDJ (talkcontribs) 18:24, 27 February 2023 (UTC)[reply]

The tool is almost useless for links to content model CSS, flow-board, Scribunto, json, javascript - pretty much everything that isn't wikitext. Rather than showing true content, the following appears:

{"batchcomplete":true,"warnings":{"main":{"warnings":"Subscribe to the mediawiki-api-announce mailing list at for notice of API deprecations and breaking changes. Use Special:ApiFeatureUsage to see usage of deprecated features by your application."},"revisions":{"warnings":"Because \"rvslots\" was not specified, a legacy format has been used for the output.

It seems that one parameter has to be added to the API query for it to be happy. Can it be fixed, please? Thanks! אוהב חכמה (talk) 12:16, 13 March 2023 (UTC)[reply]

Yeah those aren't really supported. However the deprecation warning makes it worse, as it replaces whatever it would have otherwise displayed. I'm fixing the deprecations with MediaWiki_talk:Gadget-popups.js#rvslots_and_edit_counter_fixesTheDJ (talkcontribs) 11:41, 12 April 2023 (UTC)[reply]

Since some weeks in german WP the visual diff view is active. But there the navigation popups dont work. They works only if I switch to the old wikitext mode. Is there a bug, or must I do some settings? Technical (I am web developer): It seems to me, there exists no event listeners for mouse movement.--Hlambert63 (talk) 17:42, 18 April 2023 (UTC)[reply]

It’s not implemented. Patches welcome —TheDJ (talkcontribs) 18:09, 18 April 2023 (UTC)[reply]
I think it should be implemented in visual diffs, not NavPopups, so I reported it at phab:T335199. —Tacsipacsi (talk) 16:28, 21 April 2023 (UTC)[reply]
@Tacsipacsi Yes, I would think so.
BTW: Today in 2 Diffs it worked, but at other didnt work. Dont know why.--Hlambert63 (talk) 14:13, 22 April 2023 (UTC)[reply]
It might be a race condition: if the visual diff loads first, by the time NavPopups loads, the diff is there and therefore the popups are added; however, if NavPopups loads first, it doesn’t find the visual diff on load, and later it doesn’t check it again (due to visual diffs not notifying it by firing the hook). —Tacsipacsi (talk) 00:43, 23 April 2023 (UTC)[reply]

I have found a 2nd bug: In Visual Diff the links to references leads to the article diff, I'd expect a link to the ref in ref-section (but it may be a collision with other popup-tools / -settings! – sorry *streichel* – I know a bulk of incoming bugs! ;-) )--Hlambert63 (talk) 18:04, 4 June 2023 (UTC)[reply]

Bug with redirect fixes

There appears to be a bug with the Redirect bypass feature from the Popup window if the link is piped. The available options are "Fix target or target & label", yet both of them perform the same function (for piped links). My expectation was that if I use Fix target, then the target link would be fixed, yet the piping of the link would remain unchanged. On the other hand, if I use Fix target & label, then the piping would simply be eliminated, and the new link would be an unpiped link directly to the new target.

Note that the behavior is as expected on redirects where there is no piped link involved. I have used the Draft sandbox with the Redirect example from Wikipedia:Tools/Navigation popups/About fixing redirects to illustrate this:

  • This is the result of Fix target
    • Green tickY The piped link remains piped, as I would expect.
    • Green tickY The unpiped link becomes piped in order to retain the original text, as I would expect if only changing the target.
  • This is the result of Fix target & label
    • Red XN The piped link remains piped, and only the target is changed when I would expect the target AND label to change (effectively eliminating the piped link).
      • This is the buggy use case.
    • Green tickY The unpiped link remains unpiped, and displays the new label, as I would expect if changing the target and label.

Now, in the example I'm using, having a disambiguated/anchored link display in normal text is a bit unruly for prose, but I would expect that the user should be using "Fix target" only option if they are trying to preserve the prose text and correct the target link.

I am coming across this since this Popups feature is pretty nice when performing WP:POSTMOVE cleanup. Sometimes a page is moved from a title with a parenthetical or WP:QUALIFIER dab to one with a WP:NATURAL dab that might be entirely different when subjects are renamed. I recognize that these redirects are WP:NOTBROKEN, but there are some cases where the new title can provide more appropriate context to the reader, and some should be selectively updated. -2pou (talk) 18:01, 5 May 2023 (UTC)[reply]

Let’s assume Morphosyntax was redirected to Morphological syntax instead of Morphology (linguistics)#Paradigms and morphosyntax. (Probably no such term exists, but that’s irrelevant in this example.) Let’s assume you want to fix the redirect in the first sentence of Nafsan language#Indirect/general possession, which currently sounds Indirect possession is morphosyntactically represented through […]. If not only the target, but also the label was changed, it sounded Indirect possession is morphological syntax represented through […], which is grammatically incorrect. This is why non-default labels shouldn’t be replaced automatically (and even default labels should be preserved, i.e. the Fix target mode should be used, if the redirect is a different part of speech than the target). —Tacsipacsi (talk) 11:29, 6 May 2023 (UTC)[reply]
That's a good example of when "fix target" should be used, and it works correctly. "Fix target & label" wouldn't do what we want here, with or without bugs. It's for other cases. Suppose I write [[David Williams|Williams]] when I meant [[David Walliams|Walliams]]. Then, we'd want to change both misspellings. However, the old label will almost always differ from the old target, and the new label should probably differ from the new target in a similar way. In this case, it's by omitting the given name, but in general it's by no means obvious what it should be changed to and not the script's job to guess. Certes (talk) 12:05, 6 May 2023 (UTC)[reply]
Forgot all about this... I see your point for not making an assumption. What I'm struggling with now is when anyone should be using Fix target & label. It seems like the two behave the same. Maybe I misinterpreted the intention, but I was always reading "label" as the displayed text of a piped link. Is that incorrect? So when would we need to Fix target & label? If I did understand correctly, then the "fix" would have to become more complex as Certes points out, where the UI would have to prompt the editor to input a new label that should be used. -2pou (talk) 15:41, 16 May 2023 (UTC)[reply]
"Fix target & label" is useful as-is for unpiped links. It's for when we want to change [[David Williams]] to [[David Walliams]], changing the displayed text in the same way as the link target (by default, because there's no pipe). For it to become useful for piped links, we'd have to work out the new displayed text, either by letting the editor type it in or by calculating it implementing a vague specification such as "obtain the new display by modifying the new target in the same way that the old target was modified to obtain the old display". The problem is that seeing one piece of text modified into another provides an example rather than a general algorithm. Certes (talk) 10:17, 18 May 2023 (UTC)[reply]

Disabling popups for references/citations

I just started using this tool (really useful!) but I noticed it also opens popups for citations/references in a page. Example, if I visit a page and hover over one of the citations, example "[32]", it uses a popup. How do I disable it? I only want to use this tool for Wikilinks inside an article and not for citations/references/notes. Here's my current settings User:WikiLinuz/vector.js (I even explicitly set popupOnlyArticleLinks to true), I see popupOnlyArticleLinks is by default set to true so I'm not sure why it's still showing popups for citations. Am I missing something? --WikiLinuz {talk} 01:11, 18 May 2023 (UTC)[reply]

Error when the article title contains the percent sign

When attempting to display the contents of an article that contain the percent sign "%" (e.g. 1% rule), it fails with a message The requested page title contains invalid characters: "%25" (inside JSON).

An example of a full message displayed: {"batchcomplete":true,"query":{"pages":[{"title":"1%25_rule","invalidreason":"The requested page title contains invalid characters: \"%25\".","invalid":true}]},"limits":{"images":500,"categories":500}} Naruyoko (talk) 22:51, 28 May 2023 (UTC)[reply]

I see now* that previews, of sections(!), are available from the ToC, gated by an option. However, linking to a section of another page does not show previews of that section, just the linked page's overview preamble. This seems feasible to improve. Mcint (talk) 05:36, 2 June 2023 (UTC)[reply]

Persisting parent popups in a chain?

When previewing popups, it's convenient recurse into popups of embedded pages, or via the actions menu. However, when mousing-over onto other pages, ending mouse-over of the original popup's (obscured) area causes the original to close. I would like have the path to root visible. It looks like there's not a setting for this. Anyone else also interested? I would put in some time to use this on other wikis in the future. Mcint (talk) 06:25, 2 June 2023 (UTC)[reply]

Section preview

Hi! Kind regards. I wanted to ask if the gadget allows to preview specific section in articles. Pinging @Tesugi:, who had the original question. NoonIcarus (talk) 07:50, 27 July 2023 (UTC)[reply]

Revisit a popup

I'm delighted with what appears when I hover over a link. However, when I hover over the same link again later, I sometimes see just the article title and no content. It happens mainly (perhaps exclusively) when I hover over a redirect then slide the pointer onto the target to see the start of the target article. Do other users also see this? If so, would it be easy to change the behaviour so the start of the article text appears again? Certes (talk) 19:35, 2 August 2023 (UTC)[reply]

I can reproduce that bug. For example: The WP:POPFAQ link initially shows the redirect-target's content, but the 2nd mouseover doesn't. Quiddity (talk) 22:09, 2 August 2023 (UTC)[reply]