Extension talk:Popups/2021

Images not displayed or displayed without text

edit

Checking the page info (?action=info) of pages with images I do not see "Page image" appearing anywhere. However, when I add an image in a page, I can see it. In both cases however, links to pages with images often do not display in the links. Sometimes I can see the image occupying the right half, but on the left half just three dots, when there is plenty of text in the page. For example the first link here: https://lsj.gr/wiki/Ajuga_chamaepitys

Image: [1]

Before adding the image I could see the text popup. After adding the image, only the image appears on the popup. MW 1.31 Spiros71 (talk) 14:12, 3 January 2021 (UTC)Reply

I don't know why, but as of now I can see both the text and the image in this popup.
As for the first question: The so called "page image" is stored as a page property. But not all page properties are displayed on the ?action=info page. The most reliably way to check if the PageImages extension works for a specific page is to use the API. Thiemo Kreuz (WMDE) 10:41, 7 January 2021 (UTC)Reply
It seems to be that if the image is not at the top section of the page, it will not get picked up for some reason.
Also, there appears to be some background job updating excerpts, so when a page (or part of a template which is included in that page) is edited, it may take time for both the image and text to appear in links. Now sure what are the mechanics behind that. Spiros71 (talk) 12:29, 7 January 2021 (UTC)Reply
There is a configuration $wgPageImagesLeadSectionOnly which is enabled by default. You can disable it in your LocalSettings.php if you want.
Calculating the text extracts is a little expensive. The extension caches the extracts because of this. It might take a few minutes before this cache invalidates. Another possible reason is that your browser caches the API requests. Thiemo Kreuz (WMDE) 14:09, 7 January 2021 (UTC)Reply
Ah, I see, I thought the $wgPageImagesLeadSectionOnly settings was false by default. Spiros71 (talk) 15:32, 7 January 2021 (UTC)Reply

Disable the option to enable and disable for non-logged in

edit

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


How can I disable the option to enable and disable the non-logged in? 41.254.66.222 (talk) 12:43, 11 February 2021 (UTC)Reply

I'm not sure I get the question. Do you want to force unregistered users to always (or never) get page previews, without a way to change this? As far as I can tell this is currently not possible. Thiemo Kreuz (WMDE) 12:49, 11 February 2021 (UTC)Reply
thank you 41.254.66.222 (talk) 13:13, 11 February 2021 (UTC)Reply
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Popups decapitate tall portraits

edit

Extension:Popups works wonderfully on the wiki I contribute to, aside for one visual quirk. Sometimes, for taller portraits, it tends to cut off a little bit of the top and the bottom. Is there a way to set the y offset to zero for mwe-popups-is-tall class images to avoid portrait decapitation and to have it only crop the bottom of the image? Lordhelpus (talk) 18:56, 19 February 2021 (UTC)Reply

I believe this is because of a known issue related to portrait images, see phab:T255549. Thiemo Kreuz (WMDE) 20:00, 22 February 2021 (UTC)Reply

Fully Installed, but No Popups Generating

edit
Upgrading to 1.35 and doing a fresh extension install bypassed installation/operation issues from a wiki running on 1.33.1.

Absolutely losing my mind about why this doesn't work. I'm running Mediawiki 1.33.1 with PHP 7.2.34 and MySQL 5.6.51-cll-lve; installed version 1.31 of Popups and its dependencies as the 1.35 version throws up incompatibility errors.


All three extensions (PageImages, Popups, and TextExtracts) installed successfully and appear on the Version page. However, absolutely no pop-ups are appearing for either logged-in users or casual visitors. Here's my LocalSettings code:


wfLoadExtension('TextExtracts');

wfLoadExtension('PageImages');

wfLoadExtension('Popups');

$wgPopupsOptInDefaultState = '1';

$wgPopupsOptInStateForNewAccounts = '1';

$wgPopupsHideOptInOnPreferencesPage = true;

$wgPopupsReferencePreviewsBetaFeature = false;


With opt-in set to default so that it SHOULD work for all users and visitors, with no option to disable.


I dug through all the previous reports below, but it doesn't seem to be a cache issue (tried clearing and testing, nothing) and I'm not getting any messages via debugging. I'm not running any of the other extensions mentioned as potential conflicts - the only other extensions being loaded are CategoryTree, InputBox, and WikiEditor, and disabling them has no effect. 184.96.112.152 (talk) 19:35, 6 March 2021 (UTC)Reply

UPDATE: after trying everything I could come up with, gave up and upgraded the wiki to 1.35 and installed the 1.35 versions of the extensions, which now work. I'm guessing either an old 1.33 extension or other code somewhere was the problem. 138.86.105.128 (talk) 15:27, 9 March 2021 (UTC)Reply

Hide '...' from popup windows

edit

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Dear Everyone!

I've installed Popups extension to my MediaWiki (1.35). At this point, it's not public. It is working well.

My question: can I hide the '...' from the popup windows? If an article has less than two sentences (in front of the first paragraph), it put three dots (...) to the end of the last word. With longer summaries (~40 words) there is no dots.

Thanks your answer! Jzbekeswiki (talk) 09:04, 13 March 2021 (UTC)Reply

There is a known bug in the TextExtracts extension that might be the reason for this behavior. Unfortunately it's not fixed yet, see gerrit:655015. Thiemo Kreuz (WMDE) 10:07, 13 March 2021 (UTC)Reply
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Popups are generated with time delay?

edit

Hi all,

First of all, thank you for this brilliant piece of software! As a Mediawiki noob it took me some time to understand how this wiki works. And I'm still learning...

I'm using the Popups extension on my local/private Mediawiki installation:

  • Mediawiki v1.35.2
  • PHP v7.3.27 (litespeed)
  • MariaDB v10.3.28
  • ICU v50.2

Here are my issues:

  1. Whenever I edit/change an article, it takes aprox. 3-4 minutes for the Popups extension to realize that the article has been updated/changed. After editing the article, Popups still shows me the "old" version, not the updated one. Even after refreshing the browser cache (CTRL+F5 in Chrome) several times, the Popups "sees" the changes only after a few minutes. Is this expected behaviour? Some kind of security? Any chance to get rid of it?
  2. An article that contains several lines of text, all separated by paragraphs, are being shown in the Popups window as one single line. How can I change this?

Thanks in advance. Servus! Joonchen (talk) 18:46, 29 April 2021 (UTC)Reply

  1. I am not sure, but this might be related to the Manual:Job queue. Another place to start reading is Manual:Cache.
  2. This is how it is designed right now. I'm not aware of an easy way to change this. Thiemo Kreuz (WMDE) 08:30, 30 April 2021 (UTC)Reply
Thanks Thiemo, for taking your time! Will try and keep "studying"... Cheers! 212.63.102.30 (talk) 12:17, 30 April 2021 (UTC)Reply
You can also look at the network console of the browser's developer tools (hit F12 to open), and see the requests that come from your server if they're cached. Sometimes, there's an indicator in each request saying if the response is coming from the browser's cache (usually with a 302 response, or grayed out) or from the server Ciencia Al Poder (talk) 12:59, 30 April 2021 (UTC)Reply
Thanks buddy, will try this too! Thumbs up! 212.63.102.30 (talk) 18:13, 30 April 2021 (UTC)Reply

Popups not rendering

edit

Hi, so I wanted to install Popups on my wiki, I installed all the extensions needed, and when I hover over a interwiki link, it doesn't render. How can I fix that?


Quick note: My wiki is hosted using Miraheze. JackyBorderCollie (talk) 14:35, 19 May 2021 (UTC)Reply

Hard to tell. Things you can check:
That's what I can think of with the information given. Thiemo Kreuz (WMDE) 15:05, 19 May 2021 (UTC)Reply
I had this problem and sort of fixed it with git checkout origin/REL1_34 instead of master. You could choose whichever branch you want. Make sure to refresh the pages.
(I say "sort of" because it can't extract summaries from most of my pages!) EDIT: configuring TextExtracts got it working. Jonathan3 (talk) 21:41, 31 May 2021 (UTC)Reply

How to hide popups which ONLY show "..."

edit

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Most of my website pages are created from template calls (using Extension:Cargo) and the popups show only "..."

The popups work well for other pages.

Is there any way to disable the popups if they would only show "..."? Jonathan3 (talk) 23:07, 27 May 2021 (UTC)Reply

Popups that only show "…" should not appear any more with the fix gerrit:655015. Instead they appear empty or with an error message. This was done a while ago and should be part of more recent releases. However, it doesn't fix your problem.
The reason is probably that your articles don't have any text before the first headline, or no text at all. It's currently not possible to suppress such popups. Parts of the issue are discussed in phab:T272394.
One config change you can try is to disable $wgPopupsTextExtractsIntroOnly. But this changes all popups. Thiemo Kreuz (WMDE) 10:05, 31 May 2021 (UTC)Reply
Thanks.
Initially it didn't work at all so I checked out the REL1_34 branch. Probably it was something else that got it to work so I'll try master again, to solve the "..." problem at least.
Most of the offending pages have no headers and no text outside the template call at all.
I'll read that Phabricator page and will see what that config setting does. Jonathan3 (talk) 12:24, 31 May 2021 (UTC)Reply
I am caught between two stools: the master branch doesn't show any popup for any page (I'm on MW1.34.4) and the REL1_34 and REL1_35 branches work but still show the "..." instead of the error message you mentioned when no summary can be extracted.
I would be very grateful if you would look at my question on the TextExtracts talk page (Extension talk:TextExtracts#h-Return_value_of_template_parameter_as_summary-2021-05-31T14:09:00.000Z) about getting it to return the value of a specified template parameter. Jonathan3 (talk) 21:38, 31 May 2021 (UTC)Reply
The answer to the TextExtracts question above answered this Popups question too: removing "div" from $wgExtractsRemoveClasses meant that extracts could be obtained from nearly all my wiki content pages, which got round the inability to suppress empty popups. On MW1.34 I am unable to use the latest code which avoids the "[empty]..." popup but I'll upgrade soon and it's no longer a big problem anyway! Thanks for all the help. Jonathan3 (talk) 19:22, 1 June 2021 (UTC)Reply
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Extension:Popups configuration

edit

I just enabled this on my wiki. I have noticed that the default configuration of the popups will seem to only read text from pages and not categories. It may not have been good practice but 15 years ago, many content pages were created as a category page.

Example: https://dardpi.ca/wiki/index.php?title=Category:Locomotives

Secondly, the majority of pages and categories use the NOTITLE magic word to hide whether it was a page or category and the first line on the page was a heading followed by text. Popups is not reading anything from these types of pages and I can't possibly change 1000s of pages. I have been either unable to find or understand how I might configure my way around these obstacles.

Example: See main page link to Apple Industry in the first paragraph:

https://dardpi.ca/wiki/index.php?title=Main_Page

https://dardpi.ca/wiki/index.php?title=Apple_Trains STEM (talk) 16:16, 29 May 2021 (UTC)Reply

  1. See Extension:Popups#Why don't I see Popups outside of content namespaces?. The fact that links to category pages don't show popups is currently hard-coded. The only way to change it is to modify your wiki's $wgContentNamespaces setting – which may cause unwanted side-effects.
  2. See Extension talk:TextExtracts#c-Thiemo_Kreuz_(WMDE)-2021-05-31T08:23:00.000Z-STEM-2021-05-30T20:09:00.000Z. The extension expects text before the first headline. You need to disable $wgPopupsTextExtractsIntroOnly if this is not the case on your wiki. Thiemo Kreuz (WMDE) 08:39, 31 May 2021 (UTC)Reply
In relation to point 2 above - I've asked a question in Extension talk:TextExtracts#h-Return_value_of_template_parameter_as_summary-2021-05-31T14:09:00.000Z (on the TextExtracts talk page) about whether it would be possible to get the summary instead from a specified template parameter value - I'd be really grateful to know about that! Thanks. EDIT: I think I've sorted that one out :-) Jonathan3 (talk) 21:20, 31 May 2021 (UTC)Reply

Hide "gear" icon on popups

edit

Is it possible to hide this? I can't find a setting for it and can't work out the CSS either. Thanks. Jonathan3 (talk) 19:16, 1 June 2021 (UTC)Reply

If you want to hide it for all users, you can use this in your wiki's Common.css:
.mwe-popups .mwe-popups-settings-icon {
	display: none;
}
Note the gear icon does two different things for anonymous and registered users. Thiemo Kreuz (WMDE) 06:41, 2 June 2021 (UTC)Reply

Show bold text in popup

edit

I'm using Extension:TextExtracts and see that Popups uses its plaintext option (though if the page title appears in the extract it is in bold text). Would it be possible to retain any <b>...</b> formatting in the extract shown by Popups? Jonathan3 (talk) 19:18, 1 June 2021 (UTC)Reply

I'm not sure I understand the question. The bolding is done in the Popups extension, but only if the text contains the title. If you want to remove it, you can use this in e.g. your wiki's Common.css:
.mwe-popups-extract b {
	font-weight: inherit;
}
The formatting from the article is intentionally removed in the popup. Thiemo Kreuz (WMDE) 06:41, 2 June 2021 (UTC)Reply
It wasn't very clear. When there is bold text in the wiki page I'd like the extract to retain this bold text.
I can see that Popups gets plain text from TextExtracts, so I guess I'm wondering whether changing TextExtracts not to strip just B tags would be enough to change what Popups shows. I guess Popups would have to know to display it as bold text rather than plain text with a html tag showing.
The next question would be how :-) Jonathan3 (talk) 07:54, 2 June 2021 (UTC)Reply
This is currently hardcoded in the Popups extension. You would need to patch the extension or add a new configuration switch to the code. Thiemo Kreuz (WMDE) 10:32, 2 June 2021 (UTC)Reply
Thanks! I can get TextExtraxts to convert B tags to an otherwise unused string. (It can remove all tags or remove particular tags, but I can't see anything to "remove all tags except B", so I thought maybe just converting it before the "remove all tags stage" might be the answer.)
Where is the bit in Popups that emboldens the page title text? Maybe I could add to that, to convert the string back to bold.
Maybe that's a stupid way to go about it? Jonathan3 (talk) 11:14, 2 June 2021 (UTC)Reply

There was an issue displaying this preview

edit

I get the annoying popup message in any article with no content in the lead section.

On my vragwiki I prefer dividing into sections and starting with a section. Is there a workaround?

Its no problem when using gadget Navigation popups, only at extension Popups. Ribewiki (talk) 12:41, 12 August 2021 (UTC)Reply

What the Popups extension internally does is a TextExtracts API call like this one. Technically these articles don't have an intro when they start with a section heading. This is a limitation of the TextExtracts extension. As far as I'm aware of there are currently no resources to improve the code that is responsible for this. We "..."-2021-05-27T23:07:00.000Z discussed some workarounds in a previous thread. You can try if these work for you. Thiemo Kreuz (WMDE) 06:50, 13 August 2021 (UTC)Reply
I finally disabled $wgPopupsTextExtractsIntroOnly and after moving pictures before the heading everything works fine if not beeing logged in and using the popup-gadged instead. Thanks! Ribewiki (talk) 05:45, 18 November 2023 (UTC)Reply

How do I display a preview of the text from the forms?

edit

My entire wiki is filled in by participants through forms (text and photos), but when I try to make a preview, nothing is displayed (when the text is written in the usual way on the page, it is displayed). Is there a way to display Popups data from forms on the pages? Mdyug (talk) 06:00, 23 September 2021 (UTC)Reply

edit

There seems to be a different behavior of the extension with links put on images (with the syntax [[File:xxx|link=yyy]])

See this test page :

  • the interwiki links do not show Popups (since the extension does not work with interwiki links)
  • the interwiki links on images try to show Popups and so display an error message Varlin (talk) 15:21, 23 September 2021 (UTC)Reply
Return to "Popups/2021" page.