Fixed default collection ordering in pages admin

This commit is contained in:
Matias Griese 2022-04-25 18:27:21 +03:00
parent 4464f29169
commit 26e4768bc5
2 changed files with 2 additions and 1 deletions

View File

@ -6,6 +6,7 @@
2. [](#bugfix)
* Fixed missing changes in yaml & markdown files if saved multiple times during the same second because of a caching issue
* Fixed XSS check not detecting onX events without quotes
* Fixed default collection ordering in pages admin
# v1.7.32
## 03/28/2022

View File

@ -612,7 +612,7 @@ class PageIndex extends FlexPageIndex implements PageCollectionInterface
/** @var Header $header */
$header = $page->header();
if (!$field && $header->get('admin.children_display_order') === 'collection' && ($orderby = $header->get('content.order.by'))) {
if (!$field && $header->get('admin.children_display_order', 'collection') === 'collection' && ($orderby = $header->get('content.order.by'))) {
// Use custom sorting by page header.
$sortby = $orderby;
$order = $header->get('content.order.dir', $order);