Skip to content

Commit

Permalink
Fixed type on template not found
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Dec 21, 2016
1 parent b5be9ee commit 364209a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v1.1.11
## xx/xx/2016

1. [](#improved)
* Fall back properly to HTML if template type not found

# v1.1.10
## 12/21/2016

Expand Down
1 change: 1 addition & 0 deletions system/src/Grav/Common/Twig/Twig.php
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ public function processSite($format = null)
// Try html version of this template if initial template was NOT html
if ($ext != '.html' . TWIG_EXT) {
try {
$page->templateFormat('html');
$output = $this->twig->render($page->template() . '.html' . TWIG_EXT, $twig_vars);
} catch (\Twig_Error_Loader $e) {
throw new \RuntimeException($error_msg, 400, $e);
Expand Down

0 comments on commit 364209a

Please sign in to comment.