Template talk:Transclude selected current events

Always "no recent news" for Arabic Wikipedia
Hi. Thanks for creating that template. I transferred it to arabic wikipedia but it doesn't work properly and always give me "no recent news". Any ideas about the reason?. Kind regards--مصعب (talk) 14:29, 25 May 2018 (UTC)
 * I think it's to do with the date format on line 84 of the module. The date code  (with lang code  ) produces output like "25 مايو 2018", but the actual current event pages on arwiki are named like ar:بوابة:أحداث_جارية/23_مايو_2018.  I'm not sure what date code should be used, but the codes are the same as for the   parser function, so the documentation at  mw:Help:Extension:ParserFunctions might be able to help you. - Evad37 &#91;talk] 15:24, 25 May 2018 (UTC)


 * thanks for help. In ar.wiki we use dmy like : 25 مايو 2018 (parallel in English is 25 may 2018 but it appears here as dym because arabic is written from right to left) pattern so what is best order for the date code? Regards--مصعب (talk) 15:33, 25 May 2018 (UTC)
 * Okay, so the display language affects the where arabic text displays relative to numbers... good to know. So I was completely off track with the dates thing, that part of the code is fine. What actually needs to be changed in the module is line 52, to 		if string.sub( v, 0, 1 ) == '*' then since the news items on arwiki only have a single  at the start of the line, not two. Evad37 &#91;talk] 23:22, 25 May 2018 (UTC)


 * Thanks. Much appreciated! I accepted your modification for the module and now it works in fantastic way. Kind Regards--مصعب (talk) 23:37, 25 May 2018 (UTC)

Problem with Template?
There currently appears to be a problem with the template output which has been generating the following error message on Portal:Scotland for a while now Lua error: bad argument #1 to 'find' (string expected, got nil)

It seems to be connected with the "days=" parameter because when I remove that, the error message disappears. Quite why, I don't understand because the days= param presumably passes an integer but it's complaining about expecting a string, yet the first argument is the string "Scotland". I had 3 search string parameters and the "days=" parameter set to a fairly high value:

.

I've implemented a temporary fix by omitting the "days=" parameter, but the number of results drops fairly drastically. It would be good to set the days to a realistic value. Your thoughts would be greatly appreciated. Cheers, Cactus.man   &#9997;  16:02, 30 July 2018 (UTC)
 * That's weird, and definitely not an error I was expecting. It also is affecting some of the template testcases, which were previously working. If lower values are working (like the default of 30 days), there's a good chance the problem is from one (or maybe more) subpages of Portal:Current Events with unexpected formatting or page name, in the last couple of months or so. (The code executed is the same regardless of the number of days specified - that just tells the template how many subpages to check for matching items) - Evad37 &#91;talk] 17:11, 30 July 2018 (UTC)
 * . You can now set high values for days again, but still be careful not to set it too high. Up to a year or two should be alright, depending on how much Lua is used in the rest of the portal. - Evad37 &#91;talk] 18:38, 30 July 2018 (UTC)


 * Thanks for the speedy fix. Seems to be working fine now and returning a decent set of reults, brilliant work. Cactus.man   &#9997;  19:21, 30 July 2018 (UTC)

Double bolding
Over at Help desk, has noted that parts of the "In the news" box at Portal:Peru have double bolding. In the HTML source, I see that the 2019 Abancay landslide link is inside a pair of  tags, which are inside a pair of  tags. The formatting comes from Module:Selected current events. Could someone more familiar with these templates and modules take a look? -- John of Reading (talk) 08:30, 16 February 2019 (UTC)

Can't subst?
I tried to subst this template, but that fails. Is there a way to create an editable wikitext version of the output of  ? I'd like to use the template to find candidates for Portal:Germany/Germany news and then manually remove those that I think are not appropriate, fix the formatting to suit the portal, and add a suitable image. It would greatly aid maintenance of the news section while encouraging human edits. —Kusma (t·c) 20:09, 4 March 2019 (UTC)
 * Fixed. Substing this template should now work. &#123;&#123;3x&#124;p&#125;&#125;ery (talk) 05:03, 5 March 2019 (UTC)
 * , brilliant, thank you! —Kusma (t·c) 07:29, 5 March 2019 (UTC)

Requested move 31 July 2019

 * The following is a closed discussion of a requested move. Please do not modify it. Subsequent comments should be made in a new section on the talk page. Editors desiring to contest the closing decision should consider a move review after discussing it on the closer's talk page. No further edits should be made to this discussion. 

The result of the move request was: Not moved (closed by non-admin page mover) Wug·a·po·des​ 00:11, 10 August 2019 (UTC) Wug·a·po·des​ 00:11, 10 August 2019 (UTC)

– Modules should have the same name as the templates they implement * Pppery * it has begun... 22:49, 31 July 2019 (UTC)
 * Module:Selected current events → Module:Transclude selected current events
 * Module:Selected recent additions → Module:Transclude selected recent additions
 * Module:Excerpt slideshow → Module:Transclude excerpts as random slideshow
 * Comment: Module:Excerpt slideshow implements three templates (Transclude excerpts as random slideshow, Transclude linked excerpts as random slideshow and Transclude list item excerpts as random slideshow) and is also invoked from Portal templates navbox.  As it is impossible to name the module after all of its templates, "Excerpt slideshow" seems a concise summary of the features common to the templates it implements.  Certes (talk) 23:36, 31 July 2019 (UTC)
 * All three templates are named "Transclude excerpts as random slideshow. I thus feel that "Transclude excerpts as random slideshow" is a suitably generic name. * Pppery * it has begun... 23:45, 31 July 2019 (UTC)
 * "Modules should have the same name as the templates they implement" Is this a policy, guideline or personal opinion? – Ammarpad (talk) 06:17, 8 August 2019 (UTC)
 * A personal opinion that numerous other RMs have shown consensus in favor of. * Pppery * it has begun... 17:07, 8 August 2019 (UTC)
 * Thank you for clarifying it's your personal opinion -- and not mandated, or even recommended by any policy or guideline. You should have make that clear from the onset though. Or maybe in future nominations. – Ammarpad (talk) 20:12, 8 August 2019 (UTC)
 * The field of module naming is, as far as I can tell, almost entirely void of policy. * Pppery * it has begun... 01:35, 9 August 2019 (UTC)


 * The above discussion is preserved as an archive of a requested move. Please do not modify it. Subsequent comments should be made in a new section on this talk page or in a move review. No further edits should be made to this section.

Problem with Transclude Template

 * and - There is a problem with the template output which has been generating the following error message on Portal:Catholic Church and possibly additional portals.

The time allocated for running scripts has expired. This is way beyond anything that I could fix so asking for help here. Regards, JoeNMLC (talk) 21:58, 6 January 2021 (UTC)
 * Pages are allowed ten seconds to render. The HTML source shows that the portal takes 10.378 seconds in Transclude selected current events, so you've come to the right place.   That's called from Portal:Catholic Church/News, where I've reduced the days scanned from 365 to 180.  That brings the time down to 6.860 seconds and should solve the problem.  As we're limiting the event count to four and there are four in the last quarter, we might be able to reduce further without removing content.  Certes (talk) 22:13, 6 January 2021 (UTC)
 * Thanks for this info. I also made same change at Portal Scotland for Transclude selected current events. Wondering if there may be other portals with same issue?
 * When I click on "Template" tab, is still shows "time allocated" error. Would it help if I upgraded my internet connection speed? Last year I went from 5Mb to 10Mb and lately internet seems slower. Or is bottleneck the wikipedia servers?
 * Documentation: Is there a documentation page for Transclude selected current events? Would be helpful explaining how to correctly use/setup. JoeNMLC (talk) 15:55, 7 January 2021 (UTC)
 * (partial answer) The "time allocated" is all to do with the Wikimedia servers; changing your connection speed won't help. There is documentation at Template:Transclude selected current events/doc; it's not showing on the template page currently because the error message stops the rest of the page being displayed. -- John of Reading (talk) 16:08, 7 January 2021 (UTC)
 * I've edited the examples to reduce the timespan so the template itself renders. Filtering current events is very time-consuming; any page which uses the template more than a couple of times is in danger of timing out.  Certes (talk) 16:33, 7 January 2021 (UTC)
 * These portals have Lua errors, mainly timeouts.  There are currently 20 but I'll see how many I can fix.  Subpages aren't always a problem; sometimes they transclude dozens of sub-subpages of which only a few are rendered in the main portal.  Certes (talk) 16:38, 7 January 2021 (UTC)


 * and :: - Thank you so much for your timely followup and "getting it done"! Very much appreciated! Regards, JoeNMLC (talk) 17:34, 7 January 2021 (UTC)

Issue: Portal Catholic Church, only 2 entries instead of 4
Reporting that today, at Catholic Church, News section, the template has "max=4" and only 2 entries are showing. Don't know why or how to fix. The Archive has recent entries for January 7 and January 4 that should appear in News section and are not. Regards, JoeNMLC (talk) 15:03, 11 January 2021 (UTC)
 * I should own up to but it shouldn't affect news more recent than July 2020. Certes (talk) 15:25, 11 January 2021 (UTC)
 * - I just went in there to (News Section) to "play with" settings, and not save. It looks like this template is "counting" number of external links, not dates/days of current event postings. When I changed "max" from 4 to 5, or to 6, the number of entries does increase. Looking at what shows in News section, there are exactly 4 external links. Hope this helps. JoeNMLC (talk) 18:30, 11 January 2021 (UTC)
 * There seem to be four items, of which three are grouped under the subheading "COVID-19 pandemic" because that's how they're organised on the source page Portal:Current events/2021 January 9 (most of which has nothing to do with the Church). Certes (talk) 19:12, 11 January 2021 (UTC)
 * Okay, I see that now. That sub-head for COVID counts as one of the four. Visually it just looks small. Going forward in days ahead, there may be 4 seperate dates & entries will look more "normal". Thanks for 'splainin to me. JoeNMLC (talk) 19:19, 11 January 2021 (UTC)

Is the template working properly?
Is the template working properly? It seems the portal news sections were last updated in Match 2022. For example Portal:Asia and Portal:Bangladesh. - please help check the issue.  Arman  ( Talk ) 09:02, 4 August 2022 (UTC)


 * The portals use Template cache.  Is this related to User talk:Trialpears? Certes (talk) 11:54, 4 August 2022 (UTC)