Template talk:Address restricted

Troubleshooting
Thanks to Dudemanfellabra for being willing to help with this problem:

The problem seems to be with the spell_archaeology parameter (which is not yet mentioned in the documentation). The purpose of the parameter is to allow editors to toggle whether the template uses the spelling "archeological" or "archaeological": null (default) is "eo", any value/string is "aeo". The main template is supposed to just pass the parameter through to the Address restricted/Explanatory note subtemplate. The subtemplate then should just use the presence or absence of a value in the parameter in a simple conditional to return the desired spelling.

But it's not working. It doesn't matter whether spell_archaeology is set or not when I call Address restricted. What does seem to matter is whether I code the parameter as or. When I use the pipe, the result is "eo"; when I don't, the result is "aeo" — whether or not I set the parameter in the call.

The problem does not appear to be in the subtemplate. When I call the subtemplate directly without mediating through Address restricted, it works just fine.

Thanks for any wisdom you can offer. &mdash; Ipoellet (talk) 00:52, 25 June 2014 (UTC)


 * I looked at it for a little bit today and get the same behavior as you. I haven't quite figured it out and am out of time at the moment but I will look into it more later.-Dudemanfellabra (talk) 06:42, 25 June 2014 (UTC)


 * I think it's working now. I'm still not sure exactly what the problem was, but I changed the tags to and moved the name and group parameters to come after the content of the ref/efn instead of before like you had it. Somehow that magically made it work. Don't ask me how haha. Examples below:

Examples

 * Plain template, spell_archaeology not present:


 * spell_archaeology present but blank


 * spell_archaeology some non-blank value


 * notes set, spell_archaeology not present


 * notes set, spell_archaeology present but blank


 * notes set, spell_archaeology set

Look good to you?--Dudemanfellabra (talk) 08:56, 25 June 2014 (UTC)
 * Yes, it appears to be working exactly as I had intended. I'm really impressed at your creativity to come up with those very non-obvious solutions. And I learned something about systematic testing from your examples above. Thank you very much!! &mdash; Ipoellet (talk) 02:37, 27 June 2014 (UTC)