Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize route and raw_route, fix empty route as values #3184

Merged
merged 9 commits into from
Feb 8, 2021
Next Next commit
Initialize route and raw_route, fix empty route as values
  • Loading branch information
pierrejoye committed Jan 29, 2021
commit cb2c9616d7d19aecdad9a64c581068bdc0ac8e2a
3 changes: 2 additions & 1 deletion system/src/Grav/Common/Page/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,8 @@ public function translatedLanguages($onlyPublished = false)
if ($exists) {
$aPage = new Page();
$aPage->init(new SplFileInfo($path), $languageExtension);

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