Module talk:Excerpt slideshow: Difference between revisions

Content deleted Content added
Line 54:
 
== Template:Transclude list item excerpt causes Bogus file options lint errors ==
{{Moved discussion to|Module talk:Excerpt#Bogus file options lint errors}}
 
[[Template:Transclude list item excerpt]] causes [[Special:LintErrors/bogus-image-options|Bogus file options]] lint errors in probably about 80 articles in the Portal namespace. For example, in [[Portal:Milan]] is the code
:<code><nowiki>{{Transclude list item excerpt | 1=Outline of {{PAGENAME}} | section= Environment of {{PAGENAME}} | paragraphs=1-2 | files=1 | fileargs= | more= | errors= }}</nowiki></code>
which reduces to
:<code><nowiki>{{Transclude list item excerpt | 1=Outline of Milan | section= Environment of Milan | paragraphs=1-2 | files=1 | fileargs= | more= | errors= }}</nowiki></code>
which causes a Bogus file options lint error, viz: "A typical foggy day in central Milan." The bogus file option text comes from [[Milan#Climate]], which begins,
:<code><nowiki>[[File:Milan foggy panorama with Velasca Tower.jpg|thumbnail|A typical foggy day in central Milan.]]</nowiki></code>
So, [[Template:Transclude list item excerpt]] is sucking up valid Caption parameters from articles and stuffing them into file markup, but followed by a pipe, or in some way not in the final position, so the Caption parameter becomes bogus. —[[User:Anomalocaris|Anomalocaris]] ([[User talk:Anomalocaris|talk]]) 18:50, 27 August 2018 (UTC)
:The presence of an empty <code>| fileargs=</code> causes [[Module:Excerpt]] to add a pipe at the end of the image code: <code><nowiki>[[File:Milan foggy panorama with Velasca Tower.jpg|thumbnail|A typical foggy day in central Milan.|]]
</nowiki></code>. Either the module should be modified or the calls should omit the parameter when it's empty. Modifying the module is best but I'm not a Lua coder. [[User:PrimeHunter|PrimeHunter]] ([[User talk:PrimeHunter|talk]]) 19:48, 27 August 2018 (UTC)
::Yeah, this a [[Module:Excerpt]] issue. Though this module does already trim whitespace and remove empty parameters (via the function {{tt|cleanupArgs}}) before passing any through to Module:Excerpt, so what PrimeHunter describes might not be the only issue - <u>'''[[User:Evad37|Evad]]''37'''''</u>&nbsp;<span style="font-size:95%;">&#91;[[d:w:User talk:Evad37|talk]]]</span> 01:10, 28 August 2018 (UTC)