Template talk:Address restricted
This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||
|
Troubleshooting
[edit]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 {{#if:}} 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 {{{spell_archaeology}}} or {{{spell_archaeology|}}}. 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. — 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 <ref></ref> tags to {{#tag:ref|}} 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:
- I think it's working now. I'm still not sure exactly what the problem was, but I changed the <ref></ref> tags to {{#tag:ref|}} and moved the
Examples
[edit]- Plain template,
|spell_archaeology=
not present
Address restricted[1]
- ^ Federal and state laws and practices restrict general public access to information regarding the specific location of this resource. In some cases, this is to protect archeological sites from vandalism, while in other cases it is restricted at the request of the owner. See: Knoerl, John; Miller, Diane; Shrimpton, Rebecca H. (1990), Guidelines for Restricting Information about Historic and Prehistoric Resources, National Register Bulletin, National Park Service, U.S. Department of the Interior, OCLC 20706997.
|spell_archaeology=
present but blank
Address restricted[1]
- ^ Federal and state laws and practices restrict general public access to information regarding the specific location of this resource. In some cases, this is to protect archeological sites from vandalism, while in other cases it is restricted at the request of the owner. See: Knoerl, John; Miller, Diane; Shrimpton, Rebecca H. (1990), Guidelines for Restricting Information about Historic and Prehistoric Resources, National Register Bulletin, National Park Service, U.S. Department of the Interior, OCLC 20706997.
|spell_archaeology=
some non-blank value
Address restricted[1]
- ^ Federal and state laws and practices restrict general public access to information regarding the specific location of this resource. In some cases, this is to protect archaeological sites from vandalism, while in other cases it is restricted at the request of the owner. See: Knoerl, John; Miller, Diane; Shrimpton, Rebecca H. (1990), Guidelines for Restricting Information about Historic and Prehistoric Resources, National Register Bulletin, National Park Service, U.S. Department of the Interior, OCLC 20706997.
|notes=
set,|spell_archaeology=
not present
- ^ Federal and state laws and practices restrict general public access to information regarding the specific location of this resource. In some cases, this is to protect archeological sites from vandalism, while in other cases it is restricted at the request of the owner.
- ^ Knoerl, John; Miller, Diane; Shrimpton, Rebecca H. (1990), Guidelines for Restricting Information about Historic and Prehistoric Resources, National Register Bulletin, National Park Service, U.S. Department of the Interior, OCLC 20706997.
|notes=
set,|spell_archaeology=
present but blank
- ^ Federal and state laws and practices restrict general public access to information regarding the specific location of this resource. In some cases, this is to protect archeological sites from vandalism, while in other cases it is restricted at the request of the owner.
- ^ Knoerl, John; Miller, Diane; Shrimpton, Rebecca H. (1990), Guidelines for Restricting Information about Historic and Prehistoric Resources, National Register Bulletin, National Park Service, U.S. Department of the Interior, OCLC 20706997.
|notes=
set,|spell_archaeology=
set
- ^ Federal and state laws and practices restrict general public access to information regarding the specific location of this resource. In some cases, this is to protect archaeological sites from vandalism, while in other cases it is restricted at the request of the owner.
- ^ Knoerl, John; Miller, Diane; Shrimpton, Rebecca H. (1990), Guidelines for Restricting Information about Historic and Prehistoric Resources, National Register Bulletin, National Park Service, U.S. Department of the Interior, OCLC 20706997.
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!! — Ipoellet (talk) 02:37, 27 June 2014 (UTC)