Template talk:Question

explain xkcd: It's 'cause you're dumb.
Jump to navigation Jump to search

(About the...) A test of the {{Question}} template (...moved here from Sandbox)[edit]

Rather than chatter about it any more in Sandbox (which I consider a 'done thing'), I'm copying the bulk of the technical discussion here. If you wish to delete it, please do, but it can also last longer here (for future reference, and maybe give a clue to future problems of the same kind) than if it remained in Sandbox. Alternatively, create the Talk page for {{Question}} and it can sit there, but I was of course unable to create this. 92.23.0.28 20:52, 27 August 2026 (UTC)Reply

(Regarding the original issue)[edit]

    • ...hmmm, I'm wondering if the problem is that effective block/div-tags are trying to be illegally rendered within inline/span-tags?
I have no idea, i created |noanchor=yes as a hotfix solution. FaviFake (talk) 17:12, 27 August 2026 (UTC)Reply
If you don't mind, I'm going to try to apply that solution to the edits of mine that you reverted away from before you made it. Because how I left it was with actual useful[actual citation needed] functionality. And better documentation with better grammar, than the 'rough copy' you took from here.
However, it does indeed seem to have negated the observed error on the lines I see on the what-if table. ...Though not in the above, I notice. Which is strange, but I'll check again after my 'redo'... 92.23.0.28 19:50, 27 August 2026 (UTC)Reply
Oh my god i'm so sorry that was a mistake! I've restored your edits, they were super useful! FaviFake (talk) 20:03, 27 August 2026 (UTC)Reply
Not a problem. I took a bit more time to document the "noanchor", and demonstrate it, so you seem to have put it back (and redone your update) before I finished with that. Which I then overwrote with my intended re-update. ;) And then found out exactly what you'd done to correct it, so... :P
Anyway, for a whole set of decisions I made that I won't go into, I chose to put the instructions about the "noanchor" in a {{notice}}-inclusion.
Anyway, I think you identified the exact problem. It was trying to use the literal Question Text as an Anchor option, and obviously the anchor-parameter text cannot contain 'nested' HTML within it (such as the offending 'raw' Question Texts had).
More permanent solutions, so as not to require the noanchor=yes at all, might be:
  • Some 'text sanitising' function upon the #1 parameter, to entirely 'deHTML' it before being made 'anchor-text'. Then the question, in a text-only form, can used as a completely valid anchor-label.
  • Just don't bother at all with the Question-anchor - because I can't imagine it's actually useful to have an anchor of anything like "Hey Randall, how about [...]", let alone "EEEEEEE[...]EEEEEE"
I'd favour the second, because a Reader-name anchor is perhaps just as unique an identifier to aim at (most times), and in every(?) case a shorter thing to 'aim at' from external links.
But the former, if possible (and I'd have to check what inbuilt/defined functions exist, to do this), could also be pre-emptively used also upon the Reader-name anchoring process. It is not inconceivable that someone might want to turn a Reader's Name into a link (maybe when the reader themselves wishes to connect the contribution they have made to their very own Wiki-homepage, here on or on wikipedia itself), or have some other awkward non-anchorable aspect to them. Proactively sanitising Reader field as well as the Question one would stop that from becoming an additional problem (without forcing an additional "noanchor2=yes" test, or similar).
...but that's just my snap thoughts on the matter. 92.23.0.28 20:42, 27 August 2026 (UTC)Reply
That's because i manually added a parameter called "noanchor" to those half dozen of error-prone rows FaviFake (talk) 20:04, 27 August 2026 (UTC)Reply

(End of cut-and-paste from the Sandbox.) 92.23.0.28 20:52, 27 August 2026 (UTC)Reply

...you're quick. Just tried adding this to my comment on your Talk page, and it didn't exist to add to!
Anyway, just to say, a very quick check for the 'sanitise' option indicates that maybe something like {{anchorencode:}} might work here. But I haven't actually tried to find out if it's implemented, yet.
And I still think it's not a priority to anchor-link the Question-text, but could still be used to sanitise the anchor-link to the Reader-name, if it's an option. 92.23.0.28 21:03, 27 August 2026 (UTC)Reply
Me again. Yup, it looks like it would work. e.g. something like {{anchorencode:Hello<br/>Hello!}} becomes: HelloHello!, which (embedded in anchor-markup) will stop it erroring as noted.
But not going to do anything with this information immediately.
My instinct is to remove all the "noanchor" modifications (sorry!) and instructions again, remove the Question-anchor entirely but then use the anchorencode upon the remaining Reader-anchor, but I appreciate that there are so many different combinations of where we could go from here.
You may wish to discuss this further. Or just do it how you like, given that it's your baby in the first place, right? 92.23.0.28 21:11, 27 August 2026 (UTC)Reply
No this sounds great, you should do it! With the new TWEFI thing and enwiki I'm swamped. FaviFake (talk) 13:03, 28 August 2026 (UTC)Reply
So, I've revamped it in line with my suggestions. And some other streamlining/rewording edits to the Usage instructions, that made me happier to do than not.
It's all a bit overengineered, compared to most templates (that don't try to capture under-/over-paramaterisations except for maybe game-breaking situations). But then (regardless of 'redirects are cheap') the fact that you felt the need for {{Unsuccessful}} to be linked to by both {{Un}} and {{un}}, and all the rest just reinforces my impression that you think that's somehow helpful... ;)
Oh, and, the "noanchor=yes" bits can now be deleted (or straight undone?) from the what-if table instances where it was added, if you want, but doesn't have to be. Because it also doesn't count as 'excessive parameters'! 92.23.0.28 20:44, 28 August 2026 (UTC)Reply
 โœ“ Done  FaviFake (talk) 20:55, 28 August 2026 (UTC)Reply