Last modified: 2006-07-04 12:06:28 UTC
When on Special:Undelete (as sysop) on en.wikipedia, AfD templates (which have been subst:'ed) appear as if they are not. The logic: {{#if:{{{nosubst|}}}|<div style="display:none;">}} is used, and it seems that on Special:Undelete it is stateing something isn't subst:'ed when it is. An example can be seen [http://en.wikipedia.org/w/index.php?title=Special:Undelete&target=ADEX×tamp=20060624175314 here] (sysop flag needed), and clicking preview.
That sounds pretty straightforward. It's not being substed, it's being displayed... ? Or I'm not sure I understand.
Yes - but the thing is that it is substed, the logic just seems to be returning the wrong result.
To clarify: The AfD template has a check to see if it is substed, and if it isn't it blanks the page and gives a notice (through {{#if:{{{nosubst|}}}|<div style="display:none;">}}). In what I am refering to, it has been substed, and therefore displayed fine when it wasn't deleted. However - when you look at it through Special:Undelete now it has been deleted - the logic seems to give the result of it not being substed - whereas it really is/was.
I don't understand how this logic is actually meant to detect substing. How is it meant to work?
THe full code at the top of the AfD notice is: {{#if:{{{nosubst|}}}|<div style="display:none;">}} {{#ifeq:{{NAMESPACE}}|| |{{error:not substituted|AFD}}<div style="display:none;">}}{{#if:{{{nosubst|}}}|</div></div>}} This is on a page where the notice was substed, and therefore the page and AfD notice displayed as it was meant to. For some odd reason, the logic seems broken in Special:Undelete, and it acts asif the template wasn't substed (even though it was), and returns "<template error: this template must be substituted. Please replace {{AFD}} with {{subst:AFD}}.>".
This code is completely illegible, and I don't see how it's intended to work. In what way is this supposed to detect substing? It looks at best very fragile and unreliable.
Probably a kludge to activate includeonly-subs magic for CURRENT-variables. Combining it with [[WP:HIDE]] is utter dubious. A clean substitution won't leave relics of parser functions on the page, the template appears to be broken. See [[Help:Subsititution]] on Meta, getting it right in combination with defaults and parser functions is NOT trivial.
A valid (so far) trick for checking subst is used in [[Template:Prod]]. Of course, changing [[Template:AfD]] won't fix the pages that are already deleted with the AfD template substituted.