Issue using ReOrder Post within Categories
-
Hi,
We are having an issue with the ReOrder plugin where from time to time the content producer creates a post, assigns the post to a category and the new post does not appears in the page. When we go to the “Plugin Dashboard” and select the category to reorder. We have the Use the manual sorting for this category? Yes and Override ‘orderby’ query attribute. But the new post does not show up, until the content producer clicks on the Reset Order.
We have between 3000 to 10000 posts in each category. It is happening the categories with the upper and lower limit.
We are using V2.12.5
-
This topic was modified 4 years, 1 month ago by
davidarago.
-
This topic was modified 4 years, 1 month ago by
-
Did you upgrade from v1.X? If so did you delete the old custom table used by v1.x?
I just tested this on my server, and new posts show up as expected. So something in your setup is causing the
save_postfilter to fail to trigger the new post addition to the manual rank.continued from the github repo…
Hi. What is the name of the old table. I think that we purchase your plugin when it was version 2, but I am not sure.
Also, I notice that you have some debug code on your plugin, is there a way that I can set the debug flag from within your plugin configuration? I would like to do some more debugging myself before we consider your suggestion to help us debug. Thanks.
the code is open source and has always been, so if you purchased it from someone then they swindled you π
you can trigger the debug mode with the following lines in your wp-config.php file,
define('WP_DEBUG', true); define('WP_GURUS_DEBUG', true); if ( WP_DEBUG ) { define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false ); @ini_set( 'display_errors', 0 ); define('AUTOSAVE_INTERVAL', 600 ); //seconds }I am wondering if your code to replace all of the meta_id on the table post_meta for the terms that the post is assigned to could be causing our issue. In our case if we add a post to three categories is trying to rearrange 15,000 rows/posts. Now imagine that several users are updating stories. I wonder if we could be running into a record locking issue. What happens in two years when we have 25000 rows/posts.
The function _save_order() is trying to replace
are you trying to place new post at the start of the ranking?
If so, switch it off and let the plugin default place new posts at the end to see if it works, as _save_order() is only invoked when trying to place them at the start.
This is the plugin that we have installed, it seems to be coming from you. `ReOrder Posts within Categories
This is a short description of what the plugin does. It’s displayed in the WordPress admin area.
Version 2.12.5 | By Aurorata V. | View details`Thanks for the debug info.
Yes, we are trying to add the new post to the beginning of the list.
Yes, we are trying to add the new post to the beginning of the list.
can you switch that off and let me know if the issue persists?
so there is one rather simple solution I can see to the problem, that is it is confirmed that it is due to LIFO re-ranking on large number of posts.
Whichever way you attemp to setup a manual LIFO order, a table re-write or thousands of posts will cause issues …unless we use a custom table, something I am not keen on due to plugin extensibility issues.
On the other hand, if you can confirm that the issue disappears with a LILO order, then we can explore the following solution,
- rank your posts in reverse order in the admin interface
- allow new posts to be added to the end of the queue (LILO), which requires only a single isnertion in the meta table
- force the front-end post query to return the query in reverse order
I will talk to the web manager to try your suggestion to reverse the order on our test environment. We are live, so it may not be possible to do in production.
The challenge is that it is not happening all the time, but we can try to replicate.
Is this what your mean?
function order_posts_asc( $query ) {
if ( is_admin() ) return;
$query->set( ‘orderby’, ‘post_date’ );
$query->set( ‘order’, ‘ASC’ );
return;
}
add_action( ‘pre_get_posts’, ‘order_posts_asc’, 1 );`Is this what your mean?
that’s the idea but not quite right.
I would use the plugin to handle the query mod
are you part of the ktsp team https://wordpress.org/support/users/kstpdigital/ ?
Yeah. I was just in a meeting with her and she told me that she is talking to you too. So I think that we can drop this threat and keep the conversation on the other.
Thanks.
Hey it seems that I found another user reporting the same issue that we are seeing a while a go. Check this link: https://wordpress.org/support/topic/new-posts-dont-show-in-reorder-page/. Did you ever figured out what the issue was?
the user never replied to my suggestion, it could be that he missed the new posts at the end (the last post are not loaded on the reorder grid if there are more than 20 posts in the term)…either way no way to tell.
Your issue is quite different and likely related to the large number of posts you are trying to reorder.
On the other hand, if you can confirm that the issue disappears with a LILO order,
did you follow my instructions and test if a LILO order makes the issue disappear?
I do not know enough of your plugin to understand your statement “I would use the plugin to handle the query mod”. If you point me to the file and the code that you want me to change I can do that.
I do not know enough of your plugin to understand your statement βI would use the plugin to handle the query modβ.
thsi is the 2nd step, the first step is,
On the other hand, if you can confirm that the issue disappears with a LILO order,
pelase confirm this before we look for solution. Its no use trying to solve a problem we do not understand
Hi,
I think that I may be misunderstanding what you asking. Are you asking us to change the default order of WP from LiFo to LiLo? If so, that may not be possible because the website is live and if we make that change, we may display old stories in our website.No that’s not quite what I am asking.
LILO will display newly added stories last…momentarily. You can then go to the reorder page and move them back to the front (if they are indeed being correctly added to the reorder stack). In any case I understand that this is what you have to do now because new stories are not showing up, you have to reset the stack.
This will confirm if the issue with forcing the new stories at the start of the stack (LIFO).
The topic ‘Issue using ReOrder Post within Categories’ is closed to new replies.