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

Function .sort() issue #87

Closed
ricardo118 opened this issue Dec 1, 2020 · 1 comment
Closed

Function .sort() issue #87

ricardo118 opened this issue Dec 1, 2020 · 1 comment
Assignees
Labels
bug Something isn't working fixed Issue has already been fixed

Comments

@ricardo118
Copy link
Collaborator

ricardo118 commented Dec 1, 2020

I created a test site with 400 randomly generated flex objects, They are all labeled "testXXXX" where XXXX is a random number between 1000 and 9999

There is also a couple objects added as control, such as "ABC" "DASD" "ZYX".

When using:

{% set contacts = grav.get('flex').collection('contacts') %}
{% set contacts = contacts.filterBy({'published': true}).sort({nome: 'ASC'}) %}

As you can see, one would not expect "Laura" to be first, but rather ABC.

image

Sometimes the sorting is even weirder depending on the query result.

@mahagr
Copy link
Contributor

mahagr commented Dec 2, 2020

It looks like the sorting is case sensitive, ordering looks correct though. Try out my fix in Grav core.

@mahagr mahagr self-assigned this Dec 2, 2020
@mahagr mahagr added bug Something isn't working fixed Issue has already been fixed labels Dec 2, 2020
@mahagr mahagr closed this as completed Dec 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed Issue has already been fixed
Projects
None yet
Development

No branches or pull requests

2 participants