Thread:Project:Support desk/How do I create a link to the login page with(!) special parameters?/reply

That happens when the URL contains a "=" sign. This tells the template that the text before it is the parameter name, and the text after it is the parameter value.

So basically, MediaWiki is seeing it as:

Parameters:
 * name: [/Special:UserLogin?returnTo
 * value: &action=edit Login and contribute]

To fix this, you need to explicitly use named parameters. Since your template doesn't use those, you can use the parameter index as the name. For example, try this (note the 1= ):