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 2e8be3c commit 2e6c223
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 @@ -214,6 +214,7 @@ public function translatedLanguages($onlyPublished = false)
if ($exists) {
$aPage = new Page();
$aPage->init(new \SplFileInfo($path), $languageExtension);
$aPage->parent($grav['page']->parent());

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

0 comments on commit 2e6c223

Please sign in to comment.