Thread Starter
cgzaal
(@cgzaal)
I fixed it myself, by editing the database.
Just edited the table wp_term_taxonomy, I reset the count in the relevant row.
@cgzaal,
Thanks for raising this.
You don’t define the specfic set-up you have, so I’ll describe how it works.
If, under Terms Control, you select the default Standard, then this plug-in does nothing; standard WP processing is used.
If you select either of the other options, then a plug-in routine is called to count the terms. This then calls the standard WP processing – but before calling it adds a process to modify the SQL query from (essentially)
SELECT COUNT(*) FROM wp_posts WHERE post_status = 'publish' into
SELECT COUNT(*) FROM wp_posts WHERE post_status IN ( <list of statuses> )
So, if you’re using the standard option, then it cannot be a plug-in problem.
It *may* be relevant to note that there is a ticket 40351 to be delivered in 5.6 that relates to improving the performance of this count process. In it, there is reference to wrong counts. Whether this is the case here, I cannot say.
If the problem remains, please can you let me have more information on the specific taxonomy.
Thanks,
Neil James
Thread Starter
cgzaal
(@cgzaal)
Hi James,
Thanks a lot for your extensive and instructive answer.
I think you are right: the problem seems to be in the WP-counting process.
The posts I made are set to be published in future, so they
start off as being unpublished (uncounted), and after a certain moment they
are automatically set to published. Somehow WP fails to (re)set the
count of these posts. It may indeed be that this is due to a WP-update.
I’ll check the references you mentioned.
Thanks a lot, Chris
Hi James,
You instructions worked, however to see the counts I had to create a dummy test post first (so I already had 2 + the new posts properly displayed a count of 3, once I deleted the post the count correctly displayed 2) The final test was to recreate another test2 dummy post with that term and it indeed displayed a count of 3.
Thanks!