Title: Population bug
Last modified: December 4, 2019

---

# Population bug

 *  Resolved [mdxclr](https://wordpress.org/support/users/mdxclr/)
 * (@mdxclr)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/population-bug/)
 * Hi,
    There is a problem when the order was setted and after that the new post
   was added to a category – it will not be displayed for Reorder in that category.
   Only after “Reset order” it will be possible to use and visible.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Aurovrata Venet](https://wordpress.org/support/users/aurovrata/)
 * (@aurovrata)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/population-bug/#post-12207374)
 * I just checked on my own server and it is working as expected. When I create 
   a new post, it is added to the term and is visible at the end of the ranked list
   in the reorder page.
 * Similarly, if an existing post has its terms changed (quick-edit or post edit)
   the ranked lists are updated accordingly.
 * > Only after “Reset order” it will be possible to use and visible.
 * it is possible that there is some other code that is creating a conflict with
   the ‘save_post’ filter that the plugin uses to detect a change in post terms.
 * Could you enable your WP_DEBUG mode and check if you get any errors.
 *  Thread Starter [mdxclr](https://wordpress.org/support/users/mdxclr/)
 * (@mdxclr)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/population-bug/#post-12208198)
 * there is no any errors in debug mode. also in the slider where is the maximum
   count of the posts displayed correct count.
    I maded some debugs from the code–
   in `wp-content\plugins\reorder-post-within-categories\admin\partials\reorder-
   post-within-categories-admin-display.php` $total variable showing 32 posts but
   count($ranking) returns only 9.
 * So looks like a problem is in the
    `_get_order` function – when it making query`
   WHERE pm.meta_key ='_rpwc2'`, but the new CPT didnt have it before I reset order.
 * I’m using ACF Pro plugin for adding taxonomies for CPT, with the “Save Term” 
   option enabled in. Possibly, ACF making some conflict with creating post_meta
   and its not queried by your plugin.
 *  Plugin Author [Aurovrata Venet](https://wordpress.org/support/users/aurovrata/)
 * (@aurovrata)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/population-bug/#post-12246456)
 * Sorry for the delayed response, I was sick.
 * So in the file `wp-content/plugins/ReOrder-posts-within-categories/admin/class-
   reorder-post-within-categories-admin.php` on line 365 you have
 *     ```
       // debug_msg($wpdb->last_query);
       // debug_msg($ranking, $term_id.':'.$start.'->'.$length);
       ```
   
 * you can uncomment these lines to print out the sql query your ranking results
   are coming from.
 * You will need to
    1. enable WP_DEBUG mode in your wp-config.php file, 2. add 
   the following line to your wp-config.php file `define('WP_GURUS_DEBUG', true);`
 * Use the sql query to test in your phpMyAdmin to see if it returns the correct
   number of posts.
    -  This reply was modified 6 years, 5 months ago by [Aurovrata Venet](https://wordpress.org/support/users/aurovrata/).
 *  Plugin Author [Aurovrata Venet](https://wordpress.org/support/users/aurovrata/)
 * (@aurovrata)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/population-bug/#post-12810622)
 * with several bugs fixes in recent releases and having not heard back from you,
   I am assuming this issue now resolved.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Population bug’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/reorder-post-within-categories_c18d38.
   svg)
 * [ReOrder Posts within Categories](https://wordpress.org/plugins/reorder-post-within-categories/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/reorder-post-within-categories/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/reorder-post-within-categories/)
 * [Active Topics](https://wordpress.org/support/plugin/reorder-post-within-categories/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/reorder-post-within-categories/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/reorder-post-within-categories/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Aurovrata Venet](https://wordpress.org/support/users/aurovrata/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/population-bug/#post-12810622)
 * Status: resolved