Changes
add a template link when generating the subst error message
.addClass('error')
.wikitext(format(
'Template <code>%s[[Template:%s|%s]]%s</code> has been incorrectly substituted.', mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}')
))
end