Fixed the list of pages not showing up in admin [#3280]

This commit is contained in:
Matias Griese
2021-03-19 09:59:15 +02:00
parent 1c24f9f473
commit 9082cd5b17
2 changed files with 3 additions and 1 deletions

View File

@@ -14,6 +14,7 @@
* Fixed method `$pages->find()` should never redirect [#3266](https://github.com/getgrav/grav/pull/3266)
* Fixed `Page::activeChild()` throwing an error [#3276](https://github.com/getgrav/grav/issues/3276)
* Fixed `Flex Page` CRUD ACL when creating a new page (needs Flex Objects plugin update) [grav-plugin-flex-objects#115](https://github.com/trilbymedia/grav-plugin-flex-objects/issues/115)
* Fixed the list of pages not showing up in admin [#3280](https://github.com/getgrav/grav/issues/3280)
# v1.7.8
## 03/17/2021

View File

@@ -522,12 +522,13 @@ class PageIndex extends FlexPageIndex implements PageCollectionInterface
$tmp = $child->children()->getIndex();
$child_count = $tmp->count();
$count = $filters ? $tmp->filterBy($filters, true)->count() : null;
$route = $child->getRoute();
$payload = [
'item-key' => basename($child->rawRoute() ?? $child->getKey()),
'icon' => $icon,
'title' => htmlspecialchars($child->menu()),
'route' => [
'display' => $child->getRoute()->toString(false) ?: '/',
'display' => ($route ? ($route->toString(false) ?: '/') : null) ?? '',
'raw' => $child->rawRoute(),
],
'modified' => $this->jsDate($child->modified()),