• Chris

    (@christianmuellerdhv)


    Hi,
    we have a strange problem with sorting a custom posttype by an ACF-date-field, unfortunately on our productive site here:

    https://hanfverband.de/presseechos

    The posttype is called “presseecho”, the datefield “quelldatum”, our AQL-configuration you can see on the image:

    99% of the posts are sorted correct, but some posts with specific dates are not sorted correct. Please watch the two posts on the page behind the first post on 07.11.2023 (position 16), with the dates 18.10.2023 and 24.082023. Behind them the list is sorted correct again and continues with 07.11.2023?!

    I’ve tried to find a logic behind this, but:

    • The AQL-Block is sorting by the right field “quelldatum” (I first thought that AQL takes the creation-date or last-change-date, but this is not the case)
    • It has nothing to do with the Frontend or paste&copy-fails
    • The wrong-sorted posts and their fields are OK (also in DB), I can create new posts with the same quelldatum and they are also sorted wrong. And if I can change the date from a wrong-sorted posts to an completly other date, than they are sorted correct.
    • Other Plugins like Sheer-Editor are able to sort all posts by quelldatum
    • I’ve created new AQL-blocks, deactivated all ohter plugins, still happening…
    • I’ve downgraded WP, ACF-PRO and AQL, still happening…
    • I’ve deactivated the pagination, still happening…
    • I’ve created a new clean child-theme, still…

    There had be another post with the date 24.08.2023 which was sorted correct. When I do any change on this and save it, afterwards the post is not sorted correct any longer. So it definetly has something to do with the date (quelldatum) itself and the time, the posts was saved last time. But I can’t say, when the problem started.

    We are using
    WP 6.4.3
    ACF Pro: 6.2.6.1
    AQL: 2.1.0
    Theme: TT3 Child

    For me this is strange and makes absolutly no sense. Anyone has a theory what could cause such a problem?

    Best regards
    Chris

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Ryan Welcher

    (@welcher)

    I have found that sometimes using Meta Value Num instead of Meta Value solves number related issues. Give that a try and let me know if the issue persists. This issue is going to be with the underlying WP_Query that is being generated and perhaps there is something we can augment to get this working

    Thanks for using the plugin!

    Thread Starter Chris

    (@christianmuellerdhv)

    Hi Ryan,

    I’ve allready tried this before, but with “Meta Value Num” the sorting is also strange. If you look to our staging-site:

    https://hanfverband.de/1701877441780/?query-4-page=8&cst&page_id=16238

    It seems to sort, but the posts are grouped in a way I don’t understand. On page 7 of the pagination you can see what is happening. So unfortunately this causes other problems…

    best regards

    Christian

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Order by ACF date field – some exceptions’ is closed to new replies.