Admin > Page > Admin Specific Overrides: Collection (not working)

Hey all,

i build a page for a client and they are using the news-feature a lot and generated 80+ news entries so far.
The frontend sorting of the pages is by date:
content:
items: ‘@self.children
order:
by: date
dir: desc
That would be the wanted sorting in the admin backend as well (so the backend view matches the frontend and the editors have a better overview).

So i set “children_display_order: collection”, but unfortunaly that does not apply to the backend order.
I researched the feature to be sure its ment for what i expect and need. And i dont see any possibiliy of a wrong configuration.

I even simulated that on my plain test-insallation localy with the same result.

Seems like a bug or is anyone successfuly using that feature?

@sbstn, I cannot reproduce the issue.

Using skeleton Blog Site:

  • Collection definition in frontmatter of blog page:

    content:
      items: '@self.children'
      limit: 6
      order:
          by: date
          dir: desc
      pagination: true
      url_taxonomy_filters: true
    
  • Using ordering by Collection:
    image

    • Result:
      image
  • Using ordering by Folder name:
    image

    • Result:
      image

Try flushing the cache.

Strange - i did install a fresh “skeleton clean blog” and it works like expected and a charme.

But i cant make it work in my test-installation or project. Even erased all caches and manualy updated system and plugins on file-level.



reihenfolge-output

I checked it in some other live-projects, but - strange enough - i does not work in all of them. All of the projects are absolutely up2date etc.

@sbstn,

  • Check date values in frontmatter of pages and expected date formats in system.yaml
  • Seek for any other differences…

1st of i want to thank you for taking the time to help with my issue!

i spare you, what i tried, just the important stuff:

My test-installation is based on the pure version of grav+admin, so i grabed a copy, replicated the situation and again - everything works fine.

Everything the same, except the plain grav-admin is one language and my test-installation (as well as my projects) is with multiple.
So i added one more language and forced the language in the file-extension (default.en.md).
Result: children_display_order: collection does not work in the admin anymore.

So that seems to cause the problem… happy to find out. And hopefully the path to a solution.

2 Likes

@sbstn, The issue is indeed reproducable using multiple languages… I suggest you create an issue at Github

I would, if i could…