diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d47d15..dbb0d78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +# v1.6.0 +## 10/19/2016 + +1. [](#improved) + * Added Croatian translation + * Improved `autoescape: true` support +1. [](#bugfix) + * Fixed issue where template file for `error` page type is only available if page was not found + # v1.5.1 ## 07/18/2016 diff --git a/blueprints.yaml b/blueprints.yaml index 6ce232c..6ce715f 100644 --- a/blueprints.yaml +++ b/blueprints.yaml @@ -1,5 +1,5 @@ name: Error -version: 1.5.1 +version: 1.6.0 description: Displays the error page. icon: warning author: diff --git a/error.php b/error.php index 7e8044e..71b7d35 100644 --- a/error.php +++ b/error.php @@ -18,6 +18,7 @@ public static function getSubscribedEvents() return [ 'onPageNotFound' => ['onPageNotFound', 0], 'onGetPageTemplates' => ['onGetPageTemplates', 0], + 'onTwigTemplatePaths' => ['onTwigTemplatePaths', -10] ]; } @@ -28,10 +29,6 @@ public static function getSubscribedEvents() */ public function onPageNotFound(Event $event) { - $this->enable([ - 'onTwigTemplatePaths' => ['onTwigTemplatePaths', -10] - ]); - /** @var Pages $pages */ $pages = $this->grav['pages']; diff --git a/languages.yaml b/languages.yaml index 3e66028..fba0c48 100644 --- a/languages.yaml +++ b/languages.yaml @@ -6,6 +6,11 @@ de: PLUGIN_ERROR: ERROR: "Fehler" ERROR_MESSAGE: "Uuups. Sieht aus als ob diese Seite nicht existiert." +hr: + PLUGIN_ERROR: + ERROR: "Greška" + ERROR_MESSAGE: "Uups. Izgleda da ova stranica ne postoji." + ro: PLUGIN_ERROR: ERROR: "Eroare" @@ -21,7 +26,7 @@ it: ru: PLUGIN_ERROR: ERROR: "Ошибка" - ERROR_MESSAGE: "Упс. Похоже, эта страница не существует." + ERROR_MESSAGE: "Упс. Похоже, этой страницы не существует." da: PLUGIN_ERROR: ERROR: "Fejl" diff --git a/pages/error.md b/pages/error.md index f80c188..615b50c 100644 --- a/pages/error.md +++ b/pages/error.md @@ -6,7 +6,7 @@ routable: false http_response_code: 404 twig_first: true process: - twig: true + twig: true --- {{ 'PLUGIN_ERROR.ERROR_MESSAGE'|t }} diff --git a/templates/error.html.twig b/templates/error.html.twig index 952b68e..420702b 100644 --- a/templates/error.html.twig +++ b/templates/error.html.twig @@ -1,3 +1,3 @@
{{ page.content }}
+{{ page.content|raw }}
diff --git a/templates/error.json.twig b/templates/error.json.twig index ae2064f..27472f1 100644 --- a/templates/error.json.twig +++ b/templates/error.json.twig @@ -1 +1 @@ -{{ page.content|json_encode() }} \ No newline at end of file +{{ page.content|json_encode()|raw }} \ No newline at end of file