Skip to content

Commit

Permalink
Merge branch 'release/1.7.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Oct 8, 2020
2 parents 1fa18a7 + a472979 commit 15748fd
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 4 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# OS Generated
.DS_Store*
ehthumbs.db
Icon?
Thumbs.db
*.swp

# phpstorm
.idea/*
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# v1.7.1
## 10/08/2020

1. [](#bugfix)
* Fixed error page being cached, fixes issue with non-existing resources which later become available

# v1.7.0
## 07/01/2020

1. [](#new)
* Require Grav v1.6
1. [](#bugfix)
* Added trnaslated title programmatically [#40](https://github.com/getgrav/grav-plugin-error/pull/40)
* Added translated title programmatically [#40](https://github.com/getgrav/grav-plugin-error/pull/40)

# v1.6.2
## 05/09/2019
Expand Down
2 changes: 1 addition & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Error
version: 1.7.0
version: 1.7.1
description: Displays the error page.
type: plugin
slug: error
Expand Down
9 changes: 7 additions & 2 deletions error.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,13 @@ public function onPageNotFound(Event $event)

// Try to load user error page.
$page = $pages->dispatch($this->config->get('plugins.error.routes.404', '/error'), true);

if (!$page) {
if ($page) {
// Set default expires for error page.
$header = $page->header();
if (!isset($header->expires)) {
$page->expires(0);
}
} else {
// If none provided use built in error page.
$page = new Page;
$page->init(new \SplFileInfo(__DIR__ . '/pages/error.md'));
Expand Down
1 change: 1 addition & 0 deletions pages/error.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ http_response_code: 404
twig_first: true
process:
twig: true
expires: 0
---

{{ 'PLUGIN_ERROR.ERROR_MESSAGE'|t }}
Expand Down

0 comments on commit 15748fd

Please sign in to comment.