Wiccle.com in Facebook Wiccle.com in Twitter Wiccle.com in LinkedIn Wiccle.com in Youtube RSS from Wiccle.com Wiccle.com in Atom
 
 
 

Thread: No posts, negative posts, bug?

Started: August 31, 2010, 07:55 PM  ⋅  Zone: Public Forums  ⋅  Category: Bugs & Troubleshooting  ⋅  Posts: 5  ⋅  Views 767
Started by: US-WebDesigner  ⋅  Description: Forum shows threads and a negative number of posts when there are actually no posts
Post #1
Member: US-WebDesigner  ⋅  Date: August 31, 2010, 07:55 PM  ⋅ Subject: "No posts, negative posts, bug?"

In preparation for launching a site, I went through and deleted the test posts I created.  Having done so, there now lists in some cases on a per category and per zone basis unusual counts for existing threads and posts.  For example for one category it lists 3 threads and -4 posts.  Inreality there are no more posts or threads left in the whole forum.

As I suspect this will help, what I did was go to the Latest Posts tab and start to delete posts, then I went to the Updated Threads tab and deleted all threads.  I have no reason for doing it that way and having thought about it I should have just deleted the threads - but I didn't.  I just started deleting on the page I was on when I thought of it.  

Anyways, not a huge deal but thought I would point it out, and if it is a quick fix to fix it, that would be nice but not the end of the world if not.

Thanks.

Post #2
Member: Markus  ⋅  Date: August 31, 2010, 10:07 PM  ⋅ Subject: "Re: No posts, negative posts, bug?"

Sometimes the counts get out of sync when you test around enough; if someone can point to situations that still trigger miscount, please let me know.

To normalize the counts to reflect current database state, please use the WWB Content Calculator (ZIP, 1.58 KB). The current version recalculates the following totals:

  • Posts and threads per category
  • Posts and threads per parent
  • Posts per thread
  • Posts per member
  • Comments per post

You can open up the script and choose which of the operations you want to perform, and which to omit (change the variables in the beginning of the file). While it's basically safe to leave this online, it may not be too resource-friendly if it keeps getting called over and over!

Please be aware that since this script was made for exactly the need you also have, namely doing counter cleanups after finishing up development work, it isn't optimized for larger sites (where this should be done in batches). For example, when run on Wiccle.com, the query statistics are: Total Update Queries: 3509 | Total Queries: 7018... (The comments per post operation cranks the count up by a fair 1000%, because it loops individually through each post and checks the comment count.)

Post #3
Member: US-WebDesigner  ⋅  Date: August 31, 2010, 10:48 PM  ⋅ Subject: "Re: No posts, negative posts, bug?"

Hey that is a nifty tool.  thanks.

Post #4
Member: US-WebDesigner  ⋅  Date: September 21, 2010, 04:08 PM  ⋅ Subject: "Re: No posts, negative posts, bug?"

With the WWB Content Calculator, you said "basically safe to leave this online, it may not be too resource-friendly if it keeps getting called over and over!"

Is it "called" when I visit its URL in my browser?  So I can leave the script there on-line as you say, and "call it" to work by just going to its URL but otherwise it sits inactive?

Thanks.

PS - and in response to your request for feedback on what triggers it to get off-count:

If you start a new thread and then delete it, the record shows 1 thread and 0 posts although at that point there is no content left.  That is one way it gets triggered at least.

Post #5
Member: Markus  ⋅  Date: October 11, 2010, 09:58 PM  ⋅ Subject: "Re: No posts, negative posts, bug?"

The script is only called when you visit the URL, and it's otherwise inactive. However, it is conceivable that someone with malicious intent may use it in an attempt to slow down your site.

Thank you for the note on counter confusion scenarios; if you see it happening in any other contexts, please let us know. Tagged for investagation and fixing.

 

Bugs & Troubleshooting

Add to Favorites
Public Forums
Category  ⋅  Please report all bugs and discuss any problems in this forum.
 

Public Forums

Add to Favorites
Public Forums
Zone  ⋅ Public forum sections for support and discussions. Available for everyone.
 

Zone Categories

 
Questions? Ask us!
Back to Top