Template talk:Spoilers
From Guild Wars 2 Wiki
Jump to navigationJump to search
Unnamed parameters[edit]
There is an issue with using unnamed parameters after the spoiler content, mainly sometimes the spoiler content will have "|" (mostly galleries) which this template will interpret as the next parameter. See this Parameter check. To fix this, unnamed parameters 2 and 3 should be given parameter names. --BuffsEverywhere (talk) 22:13, 4 August 2020 (UTC)
- This seems to me to be a dpl bug. Since
Sand Sandbox. |
- notably the "Spoiler alert: The hidden text contains spoilers relating to dpl appearing to be buggy." text appears fine; implying that the template indeed receaves the correct value.
- The wiki code parser will probably interpret the galery tags as a contained unit and parse it like a gallery and not as wikitext untill the gallery definition is over; which the dpl query might not do, ending up interpreting the |'s as wikicode and then incorrectly claiming the text between them to be the parameter value. But this is no more but a mere guess of mine. Nightsky (talk) 03:31, 5 August 2020 (UTC)
- Exactly, it would be appreciated if you, BuffsEverywhere, present a bugged page instead of a dpl query that isn't parsed correctly.
- If there are actually vertical bars outside any gallery tag, then the major problem would be omitted content and not the missing width. Hence, these pages should be checked and fixed individually instead of the template itself. Note that using the template {{!}} is a valid workaround for such cases.
- Any current problems may relate to the last edit (yesterday), which renamed the unnamed parameter 3 to unnamed parameter 4, e.g. Aurene#The Icebrood Saga with specified width 100 now uses the default width 75%.
- Regarding your suggestions:
- Unnamed parameter 2: no need to rename this one, as this is the first optional parameter.
- Unnamed parameter 3: two optional unnamed parameters don't really work together, we could actually rename this parameter to width, in order to use in cases where unnamed parameter 2 isn't specified (or the editor doesn't want to specify it). Summing up: renaming yes, but for other reasons.
- --Tolkyria (talk) 08:06, 5 August 2020 (UTC)
- Ah, I hadn't considered the parameter check to be buggy lol. I saw the last edit and thought it was a bug with this template. --BuffsEverywhere (talk) 17:42, 5 August 2020 (UTC)