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.
post counts for discussion and comments not being registered
Aolee
✭✭
HI guys,
I dont know what happened but looks like new comments and new discussions are not being registered in my db.
the CountDiscussions and CountComments columns in GDN_User table are still NULL even if new user posted something.
therefore all the post count in profile and discussion page give 0 count (Post: 0)
need help badly, temporarily I'm running a daily routine to update the 2 columns.
I dont know what happened but looks like new comments and new discussions are not being registered in my db.
the CountDiscussions and CountComments columns in GDN_User table are still NULL even if new user posted something.
therefore all the post count in profile and discussion page give 0 count (Post: 0)
need help badly, temporarily I'm running a daily routine to update the 2 columns.
0
Comments
The count columns in the database allow NULL, and that is the problem. If they are not initialised to zero, then adding one to them each time a comment is made, will just leave it as NULL (NULL+1 = NULL).
I fixed it in my instance by altering the table - I made the count fields mandatory, and set their default value to zero. It has been working happily since.
I raised this as a bug too, quite a while ago.
Apologies for bumping an old topic, but I wanted to ask before making any changes.
Am I changing the DEFAULT from NULL to NONE or AS DEFINED ? And do I clear the checkbox for NULL?
As always, thanks in advance for your help.
If you choose "As defined:" you get a prompt where you can enter "0". But I do not understand why you want to do that.
@davidaprice What are you trying to do or fix?
Odds are, it can be done with
/utility/structure
or
/dba/counts
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
As R_J and Bleistivt indicated following advice of discussion written in 2011 for an old version of vanilla is may be misguided and there may be a better way.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
The age of the discussion did give me pause, but it seemed to be the youngest one I could find.
The post count for the users on our forum stays at 0. But only in discussions. If I access a profile page, the number is accurate. I'm basically looking for a fix for that.
We're running the Pure theme if that matters in this case.
did you run /dba/counts
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.