Template talk:Address restricted

Latest comment: 9 years ago by Ipoellet in topic Troubleshooting

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)Reply

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)Reply
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:

Examples edit

Plain template, |spell_archaeology= not present

Address restricted[1]

  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]

  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]

  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

Address restricted[a][1]

  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.
  1. ^ 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

Address restricted[a][1]

  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.
  1. ^ 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

Address restricted[a][1]

  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.
  1. ^ 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)Reply

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)Reply