diff --git a/templates/error.twig b/templates/error.twig
index 8a15542fa7d29e6b1cf33e4e2f38b8fe3d6abcac..580300c78764f85f5c6fe546c2b19efd1dfd0064 100644
--- a/templates/error.twig
+++ b/templates/error.twig
@@ -10,7 +10,7 @@
        e.g. "core:no_state.tpl.php". The format is "<module>:<template name>"
     #}
     {% if includeTemplate -%}
-        {% set parts = includeTemplate|replace({'.tpl.php':'.twig'})|split(':') %}
+        {% set parts = includeTemplate|split(':') %}
         {% set namespacedTemplate = "@" ~ parts[0] ~ "/" ~ parts[1] %}
         {% include(namespacedTemplate) %}
     {%- endif %}