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

Fix natural sort when > 100 pages #1564

Merged
merged 3 commits into from
Jul 12, 2017
Merged

Fix natural sort when > 100 pages #1564

merged 3 commits into from
Jul 12, 2017

Conversation

w00fz
Copy link
Member

@w00fz w00fz commented Jul 10, 2017

When there are > 100 pages, on unix the sorting is not natural and so Grav orders 1-10, 100, 101 ...
Turns out the issue is caused by the Collator that we use for sorting when intl extension is available. Collator (ref) does not support the SORT_NATURAL flag like the sort (ref) method does which is the reason this has never sorted naturally as expected.

How to reproduce

Unzip 02.cats.zip under your pages and load the frontend with and without the fix.

Note: needs to be in linux

Fixes #1524

@rhukster rhukster merged commit 287a511 into develop Jul 12, 2017
@rhukster rhukster deleted the w00fz-patch-1 branch October 1, 2018 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Folder page ordering doesn't obey 99+
2 participants