Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-sales domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-click-to-tweet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-amazon domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-stats domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114 sorting by categorie and date | Event Espresso - Staging Server
Hello, i try to sort my list view by date with this shortcode:
[EVENT_LIST category_identifier=catnamexyz show_expired=true order_by=start_date sort=DESC]
The DES or ASC attribut has actullay an influence but the dates are totaly mixed up… How can i solve this?
Hi, i found out that due to a modification to the date picker to european format (dd-mm-yyyy) the dates became mixed up. I revertred that for now, but i am sure its possible to fix it in a different way. Is thete a special reason why the mysql field type of the date field is not set to format “date” in the db ?
The reason is legacy code. For us to go in and change it now would cause a lot of breakage for our customers that have EE running production sites. We recognised the problem of legacy code over a year ago and began work on EE 4.0, which is totally rewritten from the ground up (uses unix timestamps instead of dates in the db).
One solution would be to modify insert_event.php and update_event.php to take the modified date format the date picker is producing and change it to the Y-m-d format before storing it in the DB, so that it is again sortable as a string. That would be my preference, since there may be places in the rest of the code that depends on the date being stored in the db in that format.
Another solution would be to do a custom array sorting on the results of the db query, ie. convert the custom time format stored in the db into a unix timestamp and use that as the key to build a new array of the events. That way when the new array of events is iterated over, it will be in order.
The support post ‘sorting by categorie and date’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.