Skip to content

Commit

Permalink
Instantiate parent in Page->translatedLanguages()
Browse files Browse the repository at this point in the history
  • Loading branch information
OleVik authored Oct 27, 2019
1 parent 8678f22 commit 623d81f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions system/src/Grav/Common/Page/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ public function translatedLanguages($onlyPublished = false)
if (file_exists($path)) {
$aPage = new Page();
$aPage->init(new \SplFileInfo($path), $language . '.md');
$aPage->parent($grav['page']->parent());

$route = $aPage->header()->routes['default'] ?? $aPage->rawRoute();
if (!$route) {
Expand Down

0 comments on commit 623d81f

Please sign in to comment.