This page is within the scope of WikiProject Portals, a collaborative effort to improve portals on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.PortalsWikipedia:WikiProject PortalsTemplate:WikiProject PortalsPortals
This is from a limitation of the gallery syntax, where the caption can't contain any new lines, so the module changes them to <br> tags. It might be possible for the module to change a wikitext list into a html list with <ul>...</ul> and <li>...</li> tags. But allowing for sublists makes it complicated. - Evad37[talk]03:46, 29 July 2018 (UTC)[reply]
@Pbsouthwood: Fixed, mostly. If different types of list are mixed together, e.g. a numbered sublist (lines beginning *# or similar), then the sublist will still be broken. - Evad37[talk]04:51, 14 September 2018 (UTC)[reply]
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. · · · Peter (Southwood)(talk): 17:11, 28 July 2018 (UTC)[reply]
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. - Evad37[talk]03:40, 29 July 2018 (UTC)[reply]
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. · · · Peter (Southwood)(talk): 05:46, 14 September 2018 (UTC)[reply]
@FR30799386: I can't see any issues with the excerpt slideshows on that portal, at least on my computer.
Can you provide a screenshot of the problem? (see WP:WPSHOT for instructions)
Can you test on other browsers or other computers?
Does the same problem happen if you use {{transclude lead excerpt}}? (If so, that would indicate a problem with Module:Excerpt rather than this module.)
@Dreamy Jazz and Certes: Fixed. Ended up needing to replace pipes not within links or templates with the html enitity | so that it wouldn't get expanded again by Module:Random slideshow - Evad37[talk]02:29, 14 September 2018 (UTC)[reply]
Problems when including a page with a mathematics formula
Evad37 I think I may be repaying your helpfulness by creating more work. Sorry about that.
I have made a template {{Annotated link}} which is useful in lists to annotate the item using the short description from the linked article. This obviously changes the format and now this template does not recognise the links any more - they are now inside {{Annotated link|Article title}}, where article title represents the link.
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. · · · Peter (Southwood)(talk): 19:15, 19 September 2018 (UTC)[reply]
@Evad37: We have a few slideshow items just saying "Read more... Read more...". (Sadly, the output is being 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 mw.ustring.sub(excerpt, 1, readmore_start_index-2) 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 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.
@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 <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. Certes (talk) 23:17, 23 May 2019 (UTC)[reply]
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. RockMagnetist(talk)23:41, 23 May 2019 (UTC)[reply]
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 this page (will break at some point, if it has, use this)), 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. Aidan9382(talk)21:19, 21 June 2022 (UTC)[reply]
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 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? Certes (talk) 23:11, 21 June 2022 (UTC)[reply]
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. Aidan9382(talk)05:02, 22 June 2022 (UTC)[reply]
Hi guys! Sorry for the delay, I'm kind of on holidays right now, will resume next week. @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 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! :-) @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! Sophivorus (talk) 00:29, 25 June 2022 (UTC)[reply]
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 require statement. Until then, I think we need it. Certes (talk) 09:59, 25 June 2022 (UTC)[reply]
@Certes Fair enough, I just removed the notice. @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. Sophivorus (talk) 16:39, 25 June 2022 (UTC)[reply]
@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. Aidan9382(talk)16:49, 25 June 2022 (UTC)[reply]
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. Certes (talk) 17:48, 25 June 2022 (UTC)[reply]
{{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.
@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 (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 and 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, which should fix the issue for now. Aidan9382(talk)09:18, 19 December 2022 (UTC)[reply]
I've come back to the goal of trying to fix all the 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 (1, 2) had an <onlyinclude>...</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? Aidan9382(talk)19:43, 23 January 2023 (UTC)[reply]
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? Aidan9382(talk)20:21, 23 January 2023 (UTC)[reply]
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 {{Template parameter value|The Simpsons|Infobox television|num_episodes}} in the transcluding pages. Certes (talk) 21:00, 23 January 2023 (UTC)[reply]
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 Evad37, who has been helpful in the past in tracking down these edge cases. – Jonesey95 (talk) 19:31, 13 August 2024 (UTC)[reply]
This seems to be the same issue that was had in § Handling onlyincludes above, where an <onlyinclude> 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. Aidan9382(talk)10:37, 18 August 2024 (UTC)[reply]
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. Aidan9382(talk)11:27, 18 August 2024 (UTC)[reply]
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. – Jonesey95 (talk) 15:15, 19 August 2024 (UTC)[reply]