Jump to content

Module talk:Excerpt/Archive 1

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Lowercase sigmabot III (talk | contribs) at 05:18, 16 July 2018 (Archiving 6 discussion(s) from Module talk:Excerpt) (bot). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
Archive 1Archive 2Archive 3Archive 4

Paragraph selection not working

I have tried using this template in Portal:Earth sciences/Selected article/2, selecting for the first two paragraphs, and it is transcluding all of them. RockMagnetist(talk) 17:08, 27 April 2018 (UTC)

Fixed in Portal:Earth sciences/Selected article/2. The paragraph selection option is a named parameter, so the template needs paragraphs=1-2 rather then just 1-2. I'll see if I can make the documentation clearer. Certes (talk) 17:41, 27 April 2018 (UTC)
Thanks! RockMagnetist(talk) 23:36, 27 April 2018 (UTC)

A hidden template breaker

I ran into a curious problem with Portal:Earth sciences/Selected article/8. In a previous revision of Climate of India, there was a break in the middle of the caption of the third figure, and the transclusion displayed the figure as well as a badly formatted chunk of the caption in the lead. I didn't request a figure in the template. After I fixed the caption (this revision), it worked fine. RockMagnetist(talk) 23:36, 27 April 2018 (UTC)

Thanks for the report. File: and Image: can contain nested wikilinks and I've been a bit lazy in parsing them (which speeds the module up). I'm assuming that they take up the rest of the line, which is usually but not always the case. I should probably fix that soon, but it's good that you've patched things up for now. Certes (talk) 00:11, 28 April 2018 (UTC)
Yes, it's not urgent but I'll let you know if there are any more issues. RockMagnetist(talk) 02:05, 28 April 2018 (UTC)
Fixed. Certes (talk) 14:02, 28 April 2018 (UTC)

"Bad argument #1 to 'title.new' (number or string expected, got nil)"

I keep seeing the error above (clicking on it links to line 16) on some of the selections at User:Waggers/sandpit/portal selection random. (If you don't see the error at first, click "purge" to select a different article). Annoyingly the error doesn't always occur - but seems to more often than not.

It seems to be indicating that the pagename variable is not populated, yet the same page name is fed to {{more about}}, which always seems to display correctly, and the supposed lack of a pagename is not captured and handled by line 7, which looks like it's testing for pagename=nil. Am I doing something wrong? WaggersTALK 13:04, 3 May 2018 (UTC)

Thanks for the report. Whisper it quietly, but function lead (for Transclude lead excerpt) and function random (for Transclude random excerpt) are identical. They pick one of their unnamed parameters at random and treat it as an article title. In this case you're passing three unnamed parameters to lead. If your random number is 3 then these are article3, paragraphs3 and leadimages3, which evaluate to "Jane Austen", "" and "" respectively. One time in three you show part of Jane Austen; two times in three you try to show the article "" and get an error message. I can change the module so lead ignores all unnamed parameters except the first (making it differ from random), and I'll see if I can put out a more helpful error message. I should probably also make random ignore blank parameters and possibly try a different random number if it hits a missing article. Certes (talk) 13:35, 3 May 2018 (UTC)
I see, thanks. My bad - I've now named those parameters in the call to {{Transclude lead excerpt}} (they should be |paragraphs= and |files= instead of unnamed. Thanks v much for the quick response. WaggersTALK 15:06, 3 May 2018 (UTC)
Module changed as above. Choosing a random excerpt from "cat" and a bunch of invalid titles now always tells you what a cat is. I've also added errors= to show conventional Lua error messages rather than a blank excerpt. Certes (talk) 16:30, 3 May 2018 (UTC)

Bug fix request

I would like to request a small bug-fix if possible. The Transclude Lead Excerpt template leaves out the Template:Rp. An example below (note the superscript “:11” after “integral part of the airline's business”):

Biman Bangladesh Airlines, commonly known as Biman (/bmɑːn/ bee-mah-n, Bengali: [ˈbimaːn]), is the national flag carrier of Bangladesh. With its main hub at Hazrat Shahjalal International Airport in Dhaka, the airline also operates flights from its secondary hubs at Shah Amanat International Airport in Chittagong and as well as Osmani International Airport in Sylhet. The airline provides international passenger and cargo services to multiple destinations and has air service agreements in 42 countries. The headquarters of the airline, Balaka Bhaban, is located in Kurmitola, in the northern part of Dhaka. Annual Hajj flights, transporting tourists, migrants, and non-resident Bangladeshi workers and the activities of its subsidiaries form an integral part of the corporate business of the airline.

Created in February 1972, Biman enjoyed an internal monopoly in the aviation industry of Bangladesh for 24 years, until 1996. In the decades following its founding, the airline expanded its fleet and destinations but it was adversely affected by corruption and mismanagement. At its peak, Biman operated flights to 29 international destinations, extending from New York City in the west to Tokyo in the east. The airline was wholly owned and managed by the government of Bangladesh until 23 July 2007, when it was transformed into the country's largest public limited company by the Caretaker Government of Bangladesh. Since becoming a public limited company in 2007, the airline has reduced staff and begun to modernize its fleet. The airline had signed a deal with Boeing to buy ten new aircraft and options for ten more in 2008. After taking delivery of the new planes, Biman expanded its destinations and added in-flight amenities such as onboard internet, WiFi, mobile telephony and live TV streams.

During his visit to Dhaka in September 2023, French President Emmanuel Macron and then Bangladesh Prime Minister Sheikh Hasina announced the order of ten Airbus A350 aircraft for Biman. The Airbus order consists of the purchase by Biman Bangladesh Airlines of two A350F cargo aircraft and eight A350 passenger aircraft. The aircraft will be delivered in stages with two passenger A350 aircraft joining the Biman fleet first. Biman Bangladesh Airlines is certified as safe to fly in Europe by the European Union Aviation Safety Agency. In addition, Biman has also successfully passed the IATA Operational Safety Audit and since then, the airline has resumed flights to some of its previous destinations in Asia and Europe. In recent times, Biman Bangladesh Airlines has seen a marked improvement in punctuality, as well as in on-time flight performance, under its new management team. (Full article...)

Regards, Arman (Talk) 09:48, 6 May 2018 (UTC)

 Done in Module:Excerpt. @Armanaziz: thanks, good catch. Certes (talk) 18:50, 6 May 2018 (UTC)

Bug?

Default for parameter files appears to be no files rather than all files as stated on the description page. · · · Peter (Southwood) (talk): 04:51, 7 May 2018 (UTC)

I see that the description varies in different places. I will fix it to comply with reality. · · · Peter (Southwood) (talk): 04:54, 7 May 2018 (UTC)

issue

On the CKB Wikipedia nothing seems to be happening when I use the Transclude lead excerpt template. It doesn't display any text from the main article. Do you think this is because it doesn't support RTL languages or I'm doing something wrong? I used it here.--◂ ‎épine 01:01, 2 May 2018 (UTC)

I don't know! To be honest, I wrote the alpha draft of the module with English Wikipedia in mind and didn't think very hard about internationalisation at this early stage. I am quite surprised that the module has been taken up so widely and so quickly. Please can you provide links to the module and the template on CKB Wikipedia? I've not seen Sorani before and I can't actually work out how Excerpt was being used in the Evanescence portal. Arabic Wikipedia seems to be using the module ar:وحدة:Excerpt with RTL text in ar:بوابة:تشريح. Hope that helps, Certes (talk) 01:29, 2 May 2018 (UTC)
@Certes: this is the template and this is the module. Note: @مصعب: has edited the coding today. Also please ping me for future responses.--◂ ‎épine 16:55, 13 May 2018 (UTC)
@Épine: It works on Kurdish wiki. Look here brother. I am happy to help.-مصعب (talk) 17:08, 13 May 2018 (UTC)
@مصعب: I see, it seems I wasn't using the template quite correctly, however, in my defense, the documentation for the template is not really clear. That's understandable since it's still being worked on.--◂ ‎épine 19:54, 13 May 2018 (UTC)
@Épine: Please feel free to suggest what is unclear in the documentation, or just go ahead and improve it. But as you say, although several portals are already using the templates, this is an alpha module and is still being developed. The module was specifically aimed at a current initiative to improve English portals, but if other wikis are using the software then perhaps we should think more seriously about making it work better in other languages, including RTL text. Certes (talk) 20:46, 13 May 2018 (UTC)
You should definitely keep the other wikis in mind. We rely on these types of modules more than you think.--◂ ‎épine 21:15, 13 May 2018 (UTC)