Module talk:Excerpt slideshow: Difference between revisions

Content deleted Content added
Cewbot (talk | contribs)
m Maintain {{WPBS}}: 1 WikiProject template. Create {{WPBS}}.
 
(58 intermediate revisions by 15 users not shown)
Line 1:
{{WikiProject banner shell|
{{WikiProject Portals}}
}}
{{central|text=the talk pages for all the excerpt slideshow templates redirect here:
<div style="font-size:95%">{{flatlist|
Line 38 ⟶ 40:
so the module is working. Cheers, &middot; &middot; &middot; [[User:Pbsouthwood|Peter (Southwood)]] [[User talk:Pbsouthwood|<sup>(talk)</sup>]]: 12:07, 28 July 2018 (UTC)
:This is from a limitation of the gallery syntax, where the caption can't contain any new lines, so the module changes them to {{tag|br|open}} tags. It might be possible for the module to change a wikitext list into a html list with {{tag|ul}} and {{tag|li}} tags. But allowing for sublists makes it complicated. - <u>'''[[User:Evad37|Evad]]''37'''''</u>&nbsp;<span style="font-size:95%;">&#91;[[d:w:User talk:Evad37|talk]]]</span> 03:46, 29 July 2018 (UTC)
::{{ping|Pbsouthwood}} {{Fixed}}, mostly. If different types of list are mixed together, e.g. a numbered sublist (lines beginning <code>*#</code> or similar), then the sublist will still be broken. - <u>'''[[User:Evad37|Evad]]''37'''''</u>&nbsp;<span style="font-size:95%;">&#91;[[d:w:User talk:Evad37|talk]]]</span> 04:51, 14 September 2018 (UTC)
:::I can't remember what it used to look like:-/ Current version is nearly right – I see that the return to a lesser indent is missing its bullet. Cheers, &middot; &middot; &middot; [[User:Pbsouthwood|Peter (Southwood)]] [[User talk:Pbsouthwood|<sup>(talk)</sup>]]: 05:41, 14 September 2018 (UTC)
::::{{ping|Pbsouthwood}} {{Fixed}}. (Before, the items would have the "*" characters at the start of the line instead of proper bullet points) - <u>'''[[User:Evad37|Evad]]''37'''''</u>&nbsp;<span style="font-size:95%;">&#91;[[d:w:User talk:Evad37|talk]]]</span> 07:01, 15 September 2018 (UTC)
:::::Thanks for the reminder, and latest tweak. Cheers, &middot; &middot; &middot; [[User:Pbsouthwood|Peter (Southwood)]] [[User talk:Pbsouthwood|<sup>(talk)</sup>]]: 08:58, 15 September 2018 (UTC)
 
== Option for title display ==
Line 43 ⟶ 49:
Would it be possible to extract the title of the selected excerpt and display it at the top of the rendering? Some excerpts are not very obvious about their topic, and particularly with the slideshow arrangement, it would help to identify what the excerpt is about. In the case of a section, the full section title would probably be most generally useful. &middot; &middot; &middot; [[User:Pbsouthwood|Peter (Southwood)]] [[User talk:Pbsouthwood|<sup>(talk)</sup>]]: 17:11, 28 July 2018 (UTC)
:For lead excerpts at least, it sounds more like a content issue that should be addressed at the individual articles – lead sentences should be making it obvious what the topic of the article is ([[MOS:LEAD]]). If they do that properly, than showing the page title as well is superfluous. For sections, showing the article title and section makes sense, but should probably be done at [[Module:Excerpt]] rather than here. - <u>'''[[User:Evad37|Evad]]''37'''''</u>&nbsp;<span style="font-size:95%;">&#91;[[d:w:User talk:Evad37|talk]]]</span> 03:40, 29 July 2018 (UTC)
:True, but most portals created using the new structure are going to include ''some'' articles with badly formed leads, and having the title displayed may reduce confusion in the reader. It is not reasonably practicable to check every lead, and new articles will be added which will be included automatically. Some of them will have poorly formed leads. &middot; &middot; &middot; [[User:Pbsouthwood|Peter (Southwood)]] [[User talk:Pbsouthwood|<sup>(talk)</sup>]]: 05:46, 14 September 2018 (UTC)
 
==Images not rendering properly==
{{u|Evad37}} - The images produced by this template at [[Portal:India]] are rendering badly (they seem to be getting cut off after a certain width). Could you check this up.{{p}} &nbsp;—&nbsp;<b class="nowrap">'''''[[User:FR30799386|F]][[User talk:FR30799386#top|R]]''&thinsp;[[Special:Contributions/FR30799386|<sup>+</sup>]]'''</b><!--{{subst:User:FR30799386/sign}}--> 05:34, 6 August 2018 (UTC)
Line 61 ⟶ 69:
 
Transclusion stops at the {{!}} character, when it shouldn't. [[User:Dreamy Jazz|Dreamy <i style="color:#d01e1e">'''Jazz'''</i>]] 🎷 <sup>''[[User_talk:Dreamy Jazz|talk to me]]'' &#124; ''[[Special:Contributions/Dreamy Jazz|my contributions]]''</sup> 10:57, 5 September 2018 (UTC)
:{{ping|Evad47Evad37}} {{ping|Certes}}. Pinging as still a present problem. [[User:Dreamy Jazz|Dreamy <i style="color:#d01e1e">'''Jazz'''</i>]] 🎷 <sup>''[[User_talk:Dreamy Jazz|talk to me]]'' &#124; ''[[Special:Contributions/Dreamy Jazz|my contributions]]''</sup> 21:29, 13 September 2018 (UTC)
::This one works with {{tl|Transclude lead excerpt}}, but with {{tl|Transclude excerpts as random slideshow}} it's stopping as described: immediately before a "|" character in the text (not wikitext in a piped link etc.) early in the source article [[Minor Earth Major Sky]]. {{ping|Evad37}} I guess that the "|" prematurely terminates a parameter, perhaps to #tag:gallery in [[Module:Random slideshow]]. Can you gsub it to {<nowiki/>{!}} or something? [[User:Certes|Certes]] ([[User talk:Certes|talk]]) 00:23, 14 September 2018 (UTC)
:::{{ping|Dreamy Jazz|Certes}} {{Fixed}}. Ended up needing to replace pipes not within links or templates with the html enitity <code>&amp;#124;</code> so that it wouldn't get expanded again by Module:Random slideshow - <u>'''[[User:Evad37|Evad]]''37'''''</u>&nbsp;<span style="font-size:95%;">&#91;[[d:w:User talk:Evad37|talk]]]</span> 02:29, 14 September 2018 (UTC)
 
== Problems when including a page with a mathematics formula ==
 
[[Portal:Tires]] uses this module via
<sourcesyntaxhighlight lang="wikitexttext">
{{Transclude list item excerpts as random slideshow | paragraphs=1-2 | files=1 | more=
| Template:{{PAGENAME}} | }}
</syntaxhighlight>
</source>
and creates maths rendering error when transcluding [[Slip angle]] which has a mathematical expression at the end of its second paragraph.
<sourcesyntaxhighlight lang="wikitexttext">
The slip angle, <math>\alpha</math> is defined as <br />
<center><math>\alpha \triangleq -\arctan\left(\frac{v_y}{|v_x|}\right)</math></center>
</syntaxhighlight>
</source>
The error message generated is
<sourcesyntaxhighlight lang="wikitexttext">
Failed to parse (syntax error): {\displaystyle
\alpha \triangleq -\arctan\left(\frac{v_y}\right)}
</syntaxhighlight>
</source>
It looks like the <code>{|v_x|}</code> part got stripped, perhaps thinking this is a table rather than part of a math's formula. --[[User:Salix alba|Salix alba]] ([[User talk:Salix alba|talk]]): 12:07, 8 September 2018 (UTC)
 
Line 92 ⟶ 102:
:Also fixed in [[Module:Excerpt]], so that {{tl|Transclude linked excerpt}} and {{tl|Transclude list item excerpt}} will work with annotated links. - <u>'''[[User:Evad37|Evad]]''37'''''</u>&nbsp;<span style="font-size:95%;">&#91;[[d:w:User talk:Evad37|talk]]]</span> 10:36, 13 September 2018 (UTC)
::Good work mate, Thanks, &middot; &middot; &middot; [[User:Pbsouthwood|Peter (Southwood)]] [[User talk:Pbsouthwood|<sup>(talk)</sup>]]: 12:09, 13 September 2018 (UTC)
 
== This module is not rendering numbered lists or tabs using colons ==
 
Pinging {{ping|Evad37}} and {{ping|Certes}}
 
This module does not render numbered lists or tabs using colons. It is this module that has the problem, as [[Special:Diff/859557392|this test]] on my sandbox confirms it works as normal for [[Module:Excerpt]]. See [[Portal:Sandgrouse]] and [[Order (biology)]]. Thanks, [[User:Dreamy Jazz|Dreamy <i style="color:#d01e1e">'''Jazz'''</i>]] 🎷 <sup>''[[User_talk:Dreamy Jazz|talk to me]]'' &#124; ''[[Special:Contributions/Dreamy Jazz|my contributions]]''</sup> 20:14, 14 September 2018 (UTC)
:{{Fixed}} numbered lists. Colon markup is going to be more difficult, since it can be also be used with semi-colons as [[MOS:DEFLIST|definition list markup]]. - <u>'''[[User:Evad37|Evad]]''37'''''</u>&nbsp;<span style="font-size:95%;">&#91;[[d:w:User talk:Evad37|talk]]]</span> 07:50, 15 September 2018 (UTC)
 
== Use with navboxes ==
 
This template is being used with navboxes to semi-automate portal construction, but as far as I can tell, only for the whole content of the navbox. Is it possible to extract a group from a navbox template, and ideally use the group title in the header and to select the group with its subgroups for a random slideshow? This way several selected article boxes could be populated from the same navbox. &middot; &middot; &middot; [[User:Pbsouthwood|Peter (Southwood)]] [[User talk:Pbsouthwood|<sup>(talk)</sup>]]: 19:15, 19 September 2018 (UTC)
 
== Missing image ==
 
{{ping|Evad37}} [[Portal:Buffalo Braves]] transcludes [[1972–73 Buffalo Braves season]] which has {{tlx|NBA_season|2=logo = [<nowiki/>[Image:Buffalo Braves logo.png{{!}}200px]]…}}, but [[:Image:Buffalo Braves logo.png]] doesn't exist. Can {{tl|Transclude list item excerpts as random slideshow}} ignore the {{para|logo}} parameter here? (Also, the image would also probably be non-free if it did exist, though that's hard to guess without an image.) Thanks, [[User:Certes|Certes]] ([[User talk:Certes|talk]]) 10:42, 21 September 2018 (UTC)
:{{ping|Certes}} This is a [[Module:Excerpt]] problem, per [[Template:Transclude_lead_excerpt/testcases#1972–73_Buffalo_Braves_season]]. Lua can access file data such as existence, but it is expensive. So its probably better to fix the articles where these occur. - <u>'''[[User:Evad37|Evad]]''37'''''</u>&nbsp;<span style="font-size:95%;">&#91;[[d:w:User talk:Evad37|talk]]]</span> 05:29, 22 September 2018 (UTC)
::{{ping|Evad37}} Oops, you're right on both counts. I've fixed the article. Thanks for adding the test case. [[User:Certes|Certes]] ([[User talk:Certes|talk]]) 11:00, 22 September 2018 (UTC)
 
== Page layout error ==
 
{{ping|Evad37}} The [[Template:Transclude excerpts as random slideshow]] when used in the [[Portal:Sexuality]] presents a page formatting error.
See the erro [[User:Guilherme Burn/sandbox|here]]
<syntaxhighlight lang="text">
{{ Transclude excerpts as random slideshow | paragraphs=1-3 | files=1 | fileargs=left | more= | Bisexuality | Heterosexuality | Homosexuality | Asexuality | Condom | Female condom | Kama Sutra | Female genital mutilation | Age of consent | BDSM |
Prostitution of children | Margaret Higgins Sanger | Transgender | Polyamory | Paraphilia |
Safe sex | Sexual orientation | Alfred Kinsey | Sexual intercourse | Prostitution |
Masturbation | Hypersexuality | Sexually transmitted diseases | Birth control | Orgasm |
Phallic architecture | Comfort women | Clitoris | Lesbian | Monogamy |
Vagina | Human penis | Strip club | Stripper | Biology and sexual orientation |
Sexual dysfunction | Gender identity | Pedophilia | Anal sex }}
</syntaxhighlight>
[[User:Guilherme Burn|Guilherme Burn]] ([[User talk:Guilherme Burn|talk]]) 15:01, 5 November 2018 (UTC)
:I am getting the same problem on [[Portal:Minerals]] with the following code:
:<nowiki>
{{Transclude list item excerpts as random slideshow | paragraphs=1-2 | files=1 | more=
| List of minerals
|
}}
</nowiki> [[User:RockMagnetist (DCO visiting scholar)|RockMagnetist (DCO visiting scholar)]] ([[User talk:RockMagnetist (DCO visiting scholar)|talk]]) 17:29, 13 November 2018 (UTC)
 
== Only lead images ==
 
In [[Portal:Geophysics]], this template only displays the two images in the lead of [[Geophysics]]. <span style="font-family:Comic Sans MS; color:grey;">[[User:RockMagnetist|RockMagnetist]]([[User talk:RockMagnetist|talk]])</span> 16:52, 11 November 2018 (UTC)
 
== Read more ==
 
{{ping|Evad37}} We have a few slideshow items just saying "Read more... Read more...". (Sadly, the output is being [[WP:AN#Arbitrary_break_(CSD_criterion_X3)|ridiculed]] as proof by example that all portals are "shit".)
 
I've tracked this down and made a couple of changes in the sandbox. They affect makeGalleryArgs when excerpt consists of just "Read more". Firstly, a blank lead sets readmore_start_index to 1, so <code>mw.ustring.sub(excerpt, 1, readmore_start_index-2)</code> equals sub(excerpt, 1, -1) which is the whole string, and fails to remove the "Read more". I've changed the -2 to -1, and kept the leading space in readmore_text to compensate. Secondly, #excerpt needs to be checked again after removing "Read more" in case it just dropped below 10.
 
Please can you cast your eye over the code to see that it still looks reasonable? I've added a testcase for it [[Template:Transclude excerpts as random slideshow/testcases#Blank lead|here]]. The sandbox also includes your new constants which could be a good idea, depending where the best trade-off is between run time and content.
 
Thanks, [[User:Certes|Certes]] ([[User talk:Certes|talk]]) 01:33, 22 March 2019 (UTC)
:Looks good [[User:Certes|Certes]], {{Done}} - <u>'''[[User:Evad37|Evad]]''37'''''</u>&nbsp;<span style="font-size:95%;">&#91;[[d:w:User talk:Evad37|talk]]]</span> 02:23, 22 March 2019 (UTC)
 
== Bizarre behavior ==
 
In [[Portal:Earth sciences]], this template is broken in a very strange way. It is supposed to select from one of the links on [[Portal:Earth sciences/Selected articles]], but always loads [[Geography of Indonesia]], even though that article is not one of the links (although it used to be). No amount of twiddling with parameters or page reloading makes any difference. I use exactly the same syntax in [[Portal:Geophysics]], and it works fine there. <span style="font-family:Comic Sans MS; color:grey;">[[User:RockMagnetist|RockMagnetist]]([[User talk:RockMagnetist|talk]])</span> 22:56, 23 May 2019 (UTC)
:{{ping|RockMagnetist}} It's actually picking [[List of volcanoes in Indonesia]], which is the last entry on the ''Selected articles'' list. Removing that entry fixes things, though I'd prefer not to do that as it's a featured list. The volcano list starts with an &lt;onlyinclude> section, instructing any transcluding page to hide the rest of the article. Constructing the portal puts this wikitext onto the same page as the other selected articles, so the portal duly hides the rest of the page, including the other selected articles. If you think that this portal stands any chance of not being killed off then I'll look into enhancing [[Module:Excerpt]] to deal with this syntax. [[User:Certes|Certes]] ([[User talk:Certes|talk]]) 23:17, 23 May 2019 (UTC)
::Thank you, Certes. This portal is very likely to survive: I maintain both it and [[Portal:Geophysics]], and the latter just survived an MfD. Indeed, some of the most active deletionists at that MfD consider Portal:Geophysics a model for how to use the new tools. Earth sciences is a broader subject and I have modified it using the same tools to get rid of one of the biggest problems with the old portals - content forking. <span style="font-family:Comic Sans MS; color:grey;">[[User:RockMagnetist|RockMagnetist]]([[User talk:RockMagnetist|talk]])</span> 23:41, 23 May 2019 (UTC)
:::{{fixed}}, thanks for the report. [[User:Certes|Certes]] ([[User talk:Certes|talk]]) 00:10, 24 May 2019 (UTC)
::::And thank you for fixing it so quickly! <span style="font-family:Comic Sans MS; color:grey;">[[User:RockMagnetist|RockMagnetist]]([[User talk:RockMagnetist|talk]])</span> 15:13, 24 May 2019 (UTC)
 
== Move discussion in progress ==
 
There is a move discussion in progress on [[Template talk:Transclude selected current events#Requested move 31 July 2019 |Template talk:Transclude selected current events]] which affects this page. Please participate on that page and not in this talk page section. Thank you. <!-- Template talk:Transclude selected current events crosspost --> —[[User:RMCD bot|RMCD bot]] 23:03, 31 July 2019 (UTC)
 
== Change default "Read more..." link text ==
 
You are invited to join the discussion at {{section link|Wikipedia_talk:WikiProject_Portals|Change_default_"Read_more..."_link_text}}. —⁠[[User:Andrybak|andrybak]] ([[User talk:Andrybak|talk]]) 12:09, 6 November 2020 (UTC)
 
== Why use Module:Excerpt/portals? ==
 
Hey! During some recent testing after a portal page was coming up under a tracking category due to a page being edited in a weird way, I noticed that this module explicitly used a /portal version of the Excerpt module. My question is - why? After some investigating (see [[Special:Diff/1094308845|this page]] <small>(will break at some point, if it has, use [https://web.archive.org/web/20220621211538/https://en.wikipedia.org/wiki/User:Aidan9382/SafeEnvironmentTesting this])</small>), and I noticed that the module covers less edge cases, trips up easier, and is even considered "deprecated", so I'm unsure why its still in use for these templates. Is there something this sub-module covers thats critical to these templates but not found in the main module? If so, what? If a conversion to the main module is possible, that would probably be a good move. If not, then I could potentially work on sorting any issues between them. [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 21:19, 21 June 2022 (UTC)
:If you can make the slideshow work with [[Module:Excerpt]] then I don't see any reason not to. As you're probably aware, the history is that [[Module:Excerpt]] was created for portals (I wrote much of the code) then extended for articles (mainly by {{u|Sophivorus}}). The two namespaces have conflicting requirements – for example, portals strip references but articles retain them – and it proved more practical to develop their functionality separately. If one module can do both jobs, so much the better. I wasn't aware that [[Module:Excerpt/portals]] was "deprecated". Is that simply because it's used in portals which some editors would like to delete, or is there something specific about the code that needs attention? [[User:Certes|Certes]] ([[User talk:Certes|talk]]) 23:11, 21 June 2022 (UTC)
::Well, I'm not particularly sure ''why'' its deprecated, but thats what it was saying within the code of [[Module:Excerpt/portals]]. I'd imagine its more akin to "out of date" than "deprecated", but I don't know. Features like stripping references are currently implemented within [[Module:Excerpt]], so a swap may be possible, however I'm not gonna guarantee anything until I've read the entire thing and what its used for. If it is possible to convert, I probably will, but if not, it's not like /portals is falling apart, so its fine. [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 05:02, 22 June 2022 (UTC)
:::{{tq|''why'' its deprecated, but thats what it was saying within the code of [[Module:Excerpt/portals]]}} – that's a question to [[User:Sophivorus]], who've added the deprecation comment when [[Module:Excerpt/portals]] was created: [[Special:Permalink/975118421]]. It's not clear from the edit summary: {{tq|Merge [[Module:Excerpt]], [[Module:Excerpt/templates]] and [[Module:Excerpt/i18n]]}}. —⁠[[User:Andrybak|andrybak]] ([[User talk:Andrybak|talk]]) 12:09, 22 June 2022 (UTC)
::::Hi guys! Sorry for the delay, I'm kind of on holidays right now, will resume next week. @[[User:Certes|Certes]] I thought you'd seen the deprecation notice since I made it conspicuous, my bad. If I recall correctly, I put the notice based on [[Module talk:Excerpt/Archive 2#New version|this talk]] where you expressed that "I'm happy to treat my work as a proof of concept which I hope has provided some useful ideas for the more generic modules which can replace it." Still if you'd rather remove the notice, by all means do it! :-) @[[User:Aidan9382|Aidan9382]] Merging /portals into the main module would require adding an extra method or two to reproduce the missing behavior, for example the slideshows. If you feel like giving it a try, it would be a very valuable next step! Sorry if I can't give a more detailed or thoughtful reply right now, but as I mentioned, I'll resume properly next week, cheers! [[User:Sophivorus|Sophivorus]] ([[User talk:Sophivorus|talk]]) 00:29, 25 June 2022 (UTC)
:::::To me, deprecated means "use something else instead", and we don't quite have anything else that does the job completely yet. If someone can enhance the main module to do everything that /portals does, then we can deprecate the /portals variant and perhaps even replace it by a <code>require</code> statement. Until then, I think we need it. [[User:Certes|Certes]] ([[User talk:Certes|talk]]) 09:59, 25 June 2022 (UTC)
::::::@[[User:Certes|Certes]] Fair enough, I just removed the notice. @[[User:Aidan9382|Aidan9382]] Thinking a bit more about this, perhaps rather than adding methods to the main module, a better approach may be to write a new module that does what /portals does but using Module:Transcluder as much as possible. This would keep each module more modular, smaller and easier to understand, develop, maintain and update. [[User:Sophivorus|Sophivorus]] ([[User talk:Sophivorus|talk]]) 16:39, 25 June 2022 (UTC)
:::::::{{ping|Sophivorus}} That sounds like a better idea. The /portals version does seem to contain a lot of functions used for specifically this, and the use of transcluder would probably help clear up a few of the minor problems with it just fine. I'll start taking a look, see what there is to this and what can be improved. [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 16:49, 25 June 2022 (UTC)
:::::::Yes, if Module:Transcluder had existed when I worked on /portals (then called Module:Excerpt), I would certainly have used it rather than reinventing several wheels. We have extensive testcases that should give us confidence that a replacement does the job properly, and we may even fix a few bugs no one has spotted. [[User:Certes|Certes]] ([[User talk:Certes|talk]]) 17:48, 25 June 2022 (UTC)
 
== [[Template:Transclude list item excerpts as random slideshow]] pulls in unwanted templates ==
 
{{To|Aidan9382|Evad37|Andrybak|Sophivorus|Jackmcbarn|BrownHairedGirl}}
 
[[Portal:Video games]] includes this markup:
<pre>
{{Transclude list item excerpts as random slideshow | paragraphs=1-2 | files=1 | limit=10 | more=
|Portal:Video games/Recognized content
|section=Featured articles
}}
</pre>
 
Among the articles listed in [[Portal:Video games/Recognized content#Featured articles]] is [[:Super Columbine Massacre RPG!]]. In that article, immediately following the infobox is the following markup:
<pre>
{{Columbine High School massacre}}
 
'''''Super Columbine Massacre RPG!''''' is a [[role-playing video game]] created by [[Danny Ledonne]] and released in April 2005. The game recreates the 1999 [[Columbine High School massacre|Columbine High School shootings]] near [[Littleton, Colorado]]. Players assume the roles of gunmen [[Eric Harris and Dylan Klebold]] and act out the [[massacre]], with flashbacks relating parts of Harris and Klebold's past experiences. The game begins on the day of the shootings and follows Harris and Klebold after their suicides to fictional adventures in [[Christian views on Hell|perdition]].
 
Ledonne had spent many years conceptualizing games, but never created one due to his lack of game design and programming knowledge. He was inspired to create a video game about Columbine by his own experience being bullied and the effect the shooting had on his life. The game represents a critique of how traditional media sensationalized the shooting (in particular the role of video games), as well as parodying video games themselves. ''Super Columbine Massacre'' was created with [[ASCII (company)|ASCII]]'s game development program [[RPG Maker 2000]] and took approximately six months to complete. Ledonne initially published the game anonymously, releasing an [[artist's statement]] about the work after his identity was revealed. ''Super Columbine Massacre'' was released for free online and attracted little attention until 2006, when widespread media coverage fueled hundreds of thousands of downloads.
</pre>
If the random transclusion happens to bring in [[:Super Columbine Massacre RPG!]], it includes this:
<pre>
<gallery class="switcher-container" mode="slideshow">
...
File:Blank.png|<span class="switcher-label" style="display:none"><span class="randomSlideshow-sr-only">Image #</span></span><div style="text-align:left;">{{Columbine High School massacre}}
...
</pre>
(where # is a number from 1 to 10), which distills further to
<pre>
<gallery>File:Blank.png|{{Columbine High School massacre}}</gallery>
</pre>
which is [[Special:LintErrors/multiline-html-table-in-list|Multiline table in list]] lint error. [[Template:Transclude list item excerpts as random slideshow]] needs to recognize templates that should not be brought in, and not bring them in. —[[User:Anomalocaris|Anomalocaris]] ([[User talk:Anomalocaris|talk]]) 08:46, 19 December 2022 (UTC)
:{{ping|Anomalocaris}} Thanks for the notice. Not too long ago I was doing related work on this module (and associated modules) to try and clear a seperate linter error ([[Special:LintErrors/bogus-image-options|bogus image options]]), as well as introducing some formatting changes to help display some wikitext. Some of the discussion can be seen at [[Module talk:Excerpt#Image caption fails to display correctly|Module talk:Excerpt]] and [[Module talk:Random slideshow#bogus file option lint errors|Module talk:Random slideshow]]. These linter issues have been happening for some time, though this one is new to me, so I'll look into fixing that (or finding what causes it at least). If this is a substantial issue in the meantime, or if I'm unable to find a satisfactory solution (I doubt this is a simple fix), It's probably safe to put it in the blacklist of [[Module:Excerpt/portals#L-43|Module:Excerpt/portals]], which should fix the issue for now. [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 09:18, 19 December 2022 (UTC)
:Note that I'm fairly sure blacklisting templates is the normal approach taken in scenarios like this anyways judging from [[Module talk:Excerpt]], so for now I've just blacklisted it anyways. [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 09:36, 19 December 2022 (UTC)
::Yes, blacklisting the template will omit the template's expansion from the portal if that's what's wanted here. [[User:Certes|Certes]] ([[User talk:Certes|talk]]) 09:50, 19 December 2022 (UTC)
 
== Handling onlyincludes ==
 
I've come back to the goal of trying to fix all the [https://en.wikipedia.org/wiki/Special:LintErrors/bogus-image-options?namespace=100 bogus file options] errors in the portal namespace caused by this module and its family, and I've managed to cut nearly every page out. However, the situation for [[Portal:Victoria]] was a little complicated. Some of the pages listed ([[2018 Geelong Football Club season|1]], [[2019 Geelong Football Club women's season|2]]) had an {{tag|onlyinclude}} tag in them, which was causing the module to try transclude something it really can't handle. Luckily, both of the articles using the tags weren't being transcluded at all, so it was safe to remove the tags. However, what's the best approach when this isn't an option? Based off my memory I don't think theres anything that can just bypass the onlyincludes in the code, and I've never seen this kind of situation before, so I'm not sure what a more proper fix would be here. Any ideas? [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 19:43, 23 January 2023 (UTC)
 
:[[Module:Excerpt/portals#L-575]] has code to handle onlyinclude, if that helps. [[User:Certes|Certes]] ([[User talk:Certes|talk]]) 20:01, 23 January 2023 (UTC)
 
::Let me clarify - that exact code ''is'' my problem. The slideshow attempts to grab some text to display for the article, but instead of getting the lead, it grabs the onlyinclude section, which isn't what we want, and also leads to linter errors in this specific scenario due to how complicated the sections are. Is there a way around that from a code side of things, or do we simply just have to re-format the article to work with the situation? [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 20:21, 23 January 2023 (UTC)
:::I suppose we need to look at why the article uses onlyinclude. I naively assumed that it would be for the rare occasions when we should only include the text within the tag and ignore the rest. We need to ask "what else transcludes the article?" and "how does onlyinclude help those transclusions?" In these examples, the answers were "nothing" and "it doesn't, so get rid of it". In general, onlyinclude may not be the best solution to whatever problem it was trying to solve. For example, [[Portal:The Simpsons]] was unable to transclude the lead of [[The Simpsons]], because the article had onlyinclude around the episode count so that other articles could just transclude the entire article to get an up-to-date number. (D'oh!) We fixed that by ripping out the inappropriate noinclude tag and using {{tlx|Template parameter value|The Simpsons|Infobox television||num_episodes}} in the transcluding pages. [[User:Certes|Certes]] ([[User talk:Certes|talk]]) 21:00, 23 January 2023 (UTC)
::::Yeah alright, that makes sense. Thanks for the example, too. I'll keep that in mind for the future. [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 21:06, 23 January 2023 (UTC)
 
== Another rendering / invalid file options error with [[Template:Transclude list item excerpts as random slideshow]] ==
 
In [https://en.wikipedia.org/w/index.php?title=User:Jonesey95/sandbox&oldid=1240141507 this version of my sandbox], I have used [[Template:Transclude list item excerpts as random slideshow]] to pull in a group of five articles. The article [[2022 Clackmannanshire Council election]] causes significant rendering errors, showing me things like <code>UNIQ--templatestyles-00000010-QINU</code> instead of an excerpt. The excerpting also causes Linter "bogus file options" errors. Can someone please look at this error?
 
This is a simplified case of a problem that is happening in Portal pages, including [[Portal:Scotland/Featured]]. I can provide a screen shot if necessary. It may appear only sometimes in the Portal pages, depending on which articles are excerpted. Pinging {{U|Evad37}}, who has been helpful in the past in tracking down these edge cases. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 19:31, 13 August 2024 (UTC)
:Note: In a [[Module_talk:Excerpt_slideshow#Template:Transclude_list_item_excerpts_as_random_slideshow_pulls_in_unwanted_templates|discussion above]], {{U|Aidan9382}} blacklisted a template that was causing trouble. In this case, it may be a table that is causing trouble. If that is the case, can we exclude tables from the excerpts? – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 19:37, 13 August 2024 (UTC)
::This seems to be the same issue that was had in {{slink||Handling onlyincludes}} above, where an <code><nowiki><onlyinclude></nowiki></code> tag is causing the module to target text that it isn't designed to handle (in this and the above case, a table, which don't work with the gallery format this creates). Unfortunately, I'm not sure what the best solution here is. I think in this module's context, it would make sense for it to ignore onlyincludes, since this module is generally just interested in extracting the lead. [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 10:37, 18 August 2024 (UTC)
:::I've implemented what I suggested above, which fixes the specific case you provide as well as 2 portals with a current linter error (unsure about the 3rd's issue). Bogus file options is very much a game of whack-a-mole when it comes to portals since the page selection tends to be randomised, but this should help a decent bit with avoiding the weirder cases. [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 11:27, 18 August 2024 (UTC)
::::Thank you. The randomization of excerpts can indeed make error-finding and error-fixing a little tricky. I'll keep an eye on the Linter error list. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 15:15, 19 August 2024 (UTC)