Skip to content

Commit

Permalink
Fix for Page::translatedLanguages() #2163
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Sep 6, 2018
1 parent 1808fd3 commit dfabceb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Added deprecation notices for features which will be removed in Grav 2.0
1. [](#bugfix)
* Allow `$page->slug()` to be called before `$page->init()` without breaking the page
* Fix for `Page::translatedLanguages()` to use routes always [#2163](https://github.com/getgrav/grav/issues/2163)

# v1.5.1
## 08/23/2018
Expand Down
2 changes: 1 addition & 1 deletion system/src/Grav/Common/Page/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public function translatedLanguages($onlyPublished = false)

$route = isset($aPage->header()->routes['default']) ? $aPage->header()->routes['default'] : $aPage->rawRoute();
if (!$route) {
$route = $aPage->slug();
$route = $aPage->route();
}

if ($onlyPublished && !$aPage->published()) {
Expand Down

0 comments on commit dfabceb

Please sign in to comment.