diff --git a/templates/web/edugain/errors.html.tt2 b/templates/web/edugain/errors.html.tt2
index 9fc9c760aa1331956f80d6279524716425644b4b..5dd4f96b7dbdd7e9435781982a71ae7c0698cff4 100644
--- a/templates/web/edugain/errors.html.tt2
+++ b/templates/web/edugain/errors.html.tt2
@@ -28,7 +28,7 @@
         [% ELSIF error == 'no_displayname_attribute' %]
         [% c.loc("your identity provider doesn't provide displayName attribute, required for this application") %]
 
-        [% ELSIF (matches = err.match('missing_(\w+)')) %]
+        [% ELSIF (matches = error.match('missing_(\w+)')) %]
         [% c.loc("missing parameter '[_1]'", matches.0) %]
 
         [% ELSE %]
diff --git a/templates/web/renater/errors.html.tt2 b/templates/web/renater/errors.html.tt2
index 2071ec71e880dc32671fbf7297a850ef93417dbb..a9ad75fc92c3243476dbb8397aa95aa6ffae9253 100644
--- a/templates/web/renater/errors.html.tt2
+++ b/templates/web/renater/errors.html.tt2
@@ -25,7 +25,7 @@
         [% ELSIF error == 'unauthenticated' %]
         [% c.loc("you need to authenticate to access this page") %]
 
-        [% ELSIF (matches = err.match('missing_(\w+)')) %]
+        [% ELSIF (matches = error.match('missing_(\w+)')) %]
         [% c.loc("missing parameter '[_1]'", matches.0) %]
 
         [% ELSE %]