• Resolved jhtjards

    (@jhtjards)


    Hi, i’m having a bug/issue with the changed order not being visible in the admin posts list (wp-admin/edit.php) until I either manually clear my object cache or it automatically gets cleared by creating a new post (or doing any other change to posts that triggers cache clearing)

    Environment:
    nginx + redis object cache
    WP 6.2.
    Post Types Order Version 2.0.5

    Steps to reproduce:

    1. have object caching enabled
    2. create + publish some dummy posts
    3. create some dummy posts as draft
    4. change the order of a draft post and hit update

    The draft post should now still appear at the old position in the admin view.
    If you clear the cache manually or by doing any other change to posts that triggers cache clearing, like creating a new post draft, the list is updated and shows the previously moved post at the correct position.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter jhtjards

    (@jhtjards)

    Hi, so my further investigation (and support ticket with a object-cache-helper plugin developer) has confirmed, that this plugin is missing an object cache flush when changing the order of draft posts.

    The dev said the following:

    I’ve taken a look at this and I’ve confirmed the issue you are having. However, our Redis object caching is an implementation of the WordPress object-cache.php drop-in, which means that WordPress determines when the object cache is cleared, we don’t control that. So the plugin developer would need to call one of the WordPress object cache functions to clear the cache after changing the order.

    Could you take a look at this?

    Thread Starter jhtjards

    (@jhtjards)

    Hi, have you been able to take a look at this?

    I’m seeing more support requests regarding compatibility with (redis) object cache. The above mentioned class is wordpress core, so this might be worth checking, could be an easy fix 🙂

    Plugin Author Maya

    (@tdgu)

    Hi,
    Can you edit the file /post-types-order/include/clas.cpto.php and add the following code after line 407, so it become:

    wp_cache_flush();
    //trigger action completed
    do_action('PTO/order_update_complete');

    If the above works for you, i’ll include the line in the plugin core.

    Thanks

    Thread Starter jhtjards

    (@jhtjards)

    Yep, this works for me!

    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Order of a draft post not showing until object cache is cleared’ is closed to new replies.