Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

After Spam Deletion > Discussion and Page Count wrong

phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop MVP
edited December 2013 in Vanilla 2.0 - 2.8

Hi everybody,

Tonight i had to delete 3 SPAM-Bots that posted about 500 discussions on one of my smaller forums. I deleted them via user deletion and removed all discussions of them in that operation.

The thing is... the discussions count did not take this in consideration and also the pagination shows now a lot of non existing sites at the bottom.

Any idea how clear that beautifully?

Thanx

  • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
  • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla

Comments

  • peregrineperegrine MVP
    edited December 2013

    pagination shows now a lot of non existing sites at the bottom.

    did you delete content of users. did you delete users?

    the discussions count?

    where does it display discussion count.

    vanilla version???

    did a refresh help?

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop MVP

    Sorry, i tend to forget. :)

    Vanilla 2.0.18.9

    I deleted the user with the option "Remove user content".

    Tags and too much pages in the pagination still there. I experienced this before with only one page, though of a small hickup. But is this a Vanilla immanent negligence?

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • forgetting about tags - since you started a separate discussion on tags.

    concentrate on pagination and discussion count in this discussion.

    where is the discussion count number showing up.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop MVP
    edited December 2013

    Sent you the link to the page as private message. Thanx for having a look at it.

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • file it on github, if you think there is a bug,

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • peregrineperegrine MVP
    edited December 2013

    what results do you get from these counts. it may lead you to where the problem lies.

    SELECT count( * ) AS discussioncount
    FROM `GDN_Discussion` 
    
    SELECT sum( `CountDiscussions` ) AS counter
    FROM `GDN_Category`
    

    divide the each result by discussion per page.

    see which one reflects the pages you have and which should be correct.

    could be a problem in class.discussion.model.php

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • R_JR_J Ex-Fanboy Munich Admin

    It's already on GitHub. Look at that pull request: https://github.com/vanillaforums/Garden/pull/1685/files
    It is for 2.1b2 but it should work for 2.0.18.9 as well. It does not help you with your current problem, but it should prevent it from happening again.

  • phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop MVP

    @peregrine: count [GD_Discussion = 296/50=5.92] and = [GDN_Category 974/30 = 32,4]. Yep, first one should reflect the page almost properly. The question is now... how to clean the system. By hand seems to be a terrific job and unsave job for someone with a not very deep understanding of mySQL and the Vanilla architecture. Some kind of "synchronizing"-tool would be helpful.

    Maybe Vanillas import, export tools will flatten this back to where it should be.

    @RJ: Thanx for hinting to the patch. I will read into this to understand if that makes sense in any way on my technical issue.

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • peregrineperegrine MVP
    edited December 2013

    you probably don't have more than 20 categories.

    just do a sql count for each category

    SELECT count( * ) AS discussioncount
    FROM GDN_Discussion
    WHERE CategoryID =1

    SELECT count( * ) AS discussioncount
    FROM GDN_Discussion
    WHERE CategoryID =2

    and so on.

    write down the numbers for each category.

    get the numbers you just wrote down and put them in the counddiscussion column in the category table.

    not too terribly onerous if you have only 10 categories. (10 lookups and 10 updates.)

    you can get the category ids from the category table (use any number that has a category id that is not 0 or -1

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • R_JR_J Ex-Fanboy Munich Admin
    edited December 2013

    @R_J said:
    It's already on GitHub. Look at that pull request: https://github.com/vanillaforums/Garden/pull/1685/files
    It is for 2.1b2 but it should work for 2.0.18.9 as well. It does not help you with your current problem, but it should prevent it from happening again.

    Rubbish. Similar problem but not the same...

  • phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop MVP
    edited December 2013

    @peregrine: Thanx i will look into this. Your help is amazing, just that you know. Need to take a littel sunday break till i have time to sit down and plan a cleanup. Thanx for now, i'll keep you postet. :)

    Thanx @R_J too. It's great to have you in the community.

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • peregrineperegrine MVP
    edited December 2013

    @phreak said:

    Some kind of "synchronizing"-tool would be helpful.

    yes. and orphan finder as well. Unfortunately, i don't think there would be enough pledges for this (I had a similar discussion on this http://vanillaforums.org/discussion/25356/orphan-record-finder-and-deleted-user-removal) People only want to pay (if they want to pay at all) for features they see, not for underlying integrity.

    the problem appears to be:

    the pagecount is determined from total discussion in category in some circumstances.
    But the category table does not reflect the accurate number of discussions when content is deleted via user deletion.

    It may be temporarily fixed somehow by clearing cache, but it very well may be a bug that when discussion content is deleted via user delete it does not update the category table or reflect the new discussion count.

    and should be filed on github(if not already there).

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • pracddhapracddha New
    edited January 2014

    Yes, I am having same problem. I deleted few spam post but the count is still showing more than what it should be. And in one of another site, after deleting lots of spam posts, its showing pagination of 18 pages all empty other than the first page itself.
    And yes two days back I upgraded to latest stable version 2.0.18.10. Problem persists though. I saw similar post made in 2010. But why hasn't this issue been addressed yet?

  • hgtonighthgtonight ∞ · New Moderator

    This actually looks like a pretty simple plugin.

    Give me a few hours.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • hgtonighthgtonight ∞ · New Moderator
    edited January 2014

    @pracddha, @phreak

    May I present to you, the Refresh Counts plugin!

    Let me know how it doesn't work. ;)

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • peregrineperegrine MVP
    edited January 2014

    @hgtonight said:
    pracddha, phreak

    May I present to you, the Refresh Counts plugin!

    cool! thx for the new plugin @hgtonight

    haven't tested - as I had no spam on my localhost.

    But i I never noticed or saw stash used before in a plugin- congrats!

    holy sufferin' succostash

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop MVP

    Wow cool @hgtonight! You have an amazing motivation for Vanilla. Thanx

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • pracddhapracddha New
    edited January 2014

    Sorry for being late to respond, but that was awesome. Thank you so much @hgtonight ! Solved the problem.

    By the way is it you "Zachary Doll"? What does that mean?

  • hgtonighthgtonight ∞ · New Moderator

    @pracddha said:
    Sorry for being late to respond, but that was awesome. Thank you so much hgtonight ! Solved the problem.

    By the way is it you "Zachary Doll"? What does that mean?

    Just my real name. Means "Remembered by God" if you are into that.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • hgtonight by the way means "Remembered for the plugins and support"

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Sign In or Register to comment.