-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Date sorting working improperly on production server #1910
Comments
Oh the irony!!!! :) I think it probably makes sense to have a config option to toggle between these two sorting types. It seems you are running on some specific filesystems that are tripping up PHP sorting. |
@rhukster You said it, especially as I waited until 1.4.0 released to deploy the website :-) Having investigated further I'm thinking the issue is related to 32-bit vs 64-bit PHP: AMPPS (which I use for local dev) is 32-bit, and my web hosting server is 64-bit. If this is the issue then rather than having a settings toggle (which is another thing to re-set when deploying, and then handle in version control) it may be better to switch out the sort flag dependent on platform bitness:
As a fallback, I'd say the default setting of the sort flag should be |
@rhukster After having a play with the
Then, lines 1279-81:
I don't know how this would effect other sorts however. |
I've just deployed a new site running Grav 1.4.0 and have experienced issues when sorting Page Collections by date.
When developing the site locally (on AMPPS 3.7), I ran into a different date sorting problem, which I reported (#1810) and has been fixed in 1.4.
However, once I moved the site onto the production server, the same sorting operations were producing very erratic results, for which I couldn't ascertain a pattern (it seemed like blocks of items were sorting correctly, but the blocks were out of order).
The fix for the production server was to undo the change made in #1810: switching date sorting from
SORT_NUMERIC
back toSORT_REGULAR
. I'm sorting using the standardpage.collection()
method and also by runningorder()
on an already retrieved page collection in Twig.I assume this is a server configuration issue, but I don't know what to look for. Can you provide any guidance?
The text was updated successfully, but these errors were encountered: