Help talk:Cite errors

From Safer nicotine wiki

Template:Talkheader Template:WikiProject Help Help talk:Cite errors/Centralized discussions Template:Todo User:MiszaBot/config

double pipe in {{efn}} causes non-obvious error

This is in reference to Help:Cite errors/Cite error ref no input. You'll get that error message ("There are <ref> tags on this page without content in them") if you accidentally put a double pipe in an {{efn}} template: {{efn||Oops}}. The reason isn't necessarily obvious when you get the error. You may want to mention this.

I couldn't demo it here because it only seems to happen in article space, not talk space. In talk or User space, the {{efn}} just disappears. Dan Bloch (talk) 04:30, 30 August 2021 (UTC)

The issue is not specific to this template. All templates that use unnamed parameters are susceptible to this - the parameters are position-dependent (so are sometimes called positional parameters) and each pipe marks a position. So in {{efn||Oops}} the first positional parameter is the null string, and the word "Oops" is now in the second positional parameter. --Redrose64 🌹 (talk) 06:54, 30 August 2021 (UTC)
Cookies help us deliver our services. By using our services, you agree to our use of cookies.