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

Collection ordering ignored in the column-based Flex Pages UI #3441

Open
parcand opened this issue Sep 14, 2021 · 6 comments
Open

Collection ordering ignored in the column-based Flex Pages UI #3441

parcand opened this issue Sep 14, 2021 · 6 comments
Assignees
Labels

Comments

@parcand
Copy link

parcand commented Sep 14, 2021

It appears that the children_display_order: collection setting is being ignored in the column-based Flex Pages UI.

admin:
    children_display_order: collection
content:
    items: '@self.children'
    order:
        by: date
        dir: desc

collection-sorted-by-date
pages-sorted-alphabetically

Affected version
Grav 1.7.21
Admin 1.10.21

Related issue:
#2881

@mahagr
Copy link
Member

mahagr commented Sep 21, 2021

I just tested this and the ordering works just fine for me. If I save an entry, it moves to the top of the list.

@parcand
Copy link
Author

parcand commented Sep 21, 2021

@mahagr : It appears to be working, but only on pages located at the _root level.

For example, this seems to work:

  • _root (with the admin.children_display_order: collection. sorted by date, desc)
    • /bbb (2021-01-01)
    • /ccc (2020-01-01)
    • /aaa (2019-01-01)

but this does not:

  • _root
    • /contact
    • /product
    • /news (with admin.children_display_order: collection. sorted by date, desc)
      • /aaa (2019-01-01)
      • /bbb (2021-01-01)
      • /ccc (2020-01-01)

@mahagr
Copy link
Member

mahagr commented Sep 22, 2021

I tried by using /home/blog, and it was using there. The question is, though, which date it is using. Are you setting the time from the page header or by touching the file?

@parcand
Copy link
Author

parcand commented Sep 22, 2021

@mahagr: The date is is set in the page header like this: date: "00:00 21-09-2018"

After retesting the whole thing in a fresh new install, I realized something quite interesting: the problem only occurs on multi-language pages.

multi-language-page
normal-page

I'm attaching a zip file with the folder structure if you want to have a look at it.

pages.zip

Thanks for your help!

@mahagr
Copy link
Member

mahagr commented Sep 23, 2021

Ok, that helps a lot! I was wondering last night if it may be related to multi-language support.

@mahagr mahagr added bug and removed question labels Sep 23, 2021
@mahagr mahagr self-assigned this Sep 23, 2021
@JNestudi
Copy link

Any news?? I also have this problem with the admin flex-object ordering, and I'm using grav for several sites with multilanguage environment.

Do you have an easy fix or patch while it is fixed in the next releases?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants