mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
Fixed page redirect to the first visible child page
This commit is contained in:
parent
76e887e3fb
commit
95c4438091
|
|
@ -13,6 +13,7 @@
|
|||
* Fixed exception in `$flexPage->frontmatter()` method when setting value
|
||||
* Fixed `onBlueprintCreated` event being called multiple times in `Flex Pages` [grav-plugin-flex-objects#97](https://github.com/trilbymedia/grav-plugin-flex-objects/issues/97)
|
||||
* Fixed wrong ordering in page collections if `intl` extension has been enabled [#3167](https://github.com/getgrav/grav/issues/3167)
|
||||
* Fixed page redirect to the first visible child page (needs to be routable and published, too)
|
||||
|
||||
# v1.7.3
|
||||
## 01/21/2021
|
||||
|
|
|
|||
|
|
@ -887,7 +887,7 @@ class Pages
|
|||
// fall back and check site based redirects
|
||||
if (!$page || !$page->routable()) {
|
||||
// Redirect to the first child (placeholder page)
|
||||
if ($redirect && $page && count($children = $page->children()->visible()) > 0) {
|
||||
if ($redirect && $page && count($children = $page->children()->visible()->routable()->published()) > 0) {
|
||||
$this->grav->redirectLangSafe($children->first()->route());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user