My Discussions counter not incremented? (2.1a)
with v2.1a ' My Discussions' counter is not incremented, is not?
then Sidebar 'My Discussions' link is not displayed! because there is the following condition (discussionfilter.php)
if (($CountDiscussions > 0 || $Controller->RequestMethod == 'mine') && C('Vanilla.Discussions.ShowMineTab', TRUE)) { ?> <li class="MyDiscussions<?php echo $Controller->RequestMethod == 'mine' ? ' Active' : ''; ?>"><?php echo Anchor(Sprite('SpMyDiscussions').$MyDiscussions, '/discussions/mine'); ?></li> <?php }
ok, I could remove this $CountDiscussions > 0
but in fact this is not the problem
Checked phpMyAdmin, User table, 'CountDiscussions' is always 0 (1 if I'm first administrator)
so, is it working correctly for you ?
Noticed that when I delete a discussion then 'My discussion' counter is back to its right value !
Comments
Sorry ;-) but it's still true since this summer :-( with a fresh install of v2.1a33 now... not for you ?
My 'My Discussions' counter is not incremented! it's displayed '1' even if I've started more
PS: it seems when I delete a discussion (as administrator) then my right counter is back !
@Pamela v2.1a33 is still on testing version. you cant expect it to have no bugs, you could submit this bug on github
not said that is a bug, don't expect this alpha version to have any problem !!
well , ok i'm not sure what you mean but it's always good to find some faults or a little glitch on something so that it'll be fixed in the future.
for your issue you could try this:
$Session = Gdn::Session(); $GetDiscussionsCount = $Session->User->CountDiscussions;
$GetDiscussionsCount <== just echo this one , this should show the count of discussion for the user
@fr3333333x
I believe @Pamela is saying....
she verified the table does not have an updated incremented count unless she deletes a discussion which seems to trigger a proper discussion count update for the particular user.
The database table column for DiscussionCount itself is not incremented when posting a discussion.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
yes ;-) this is what happens with my v2.1a33 and then I'm unlucky, nobody encounters this, isn't ?
I'll try with a fresh install but for example, here, my 'mine' counter (at sidebar) displays 13 but I started 19 discussions in fact...
I see the same problem on a forum on localhost
either it is a bug, or it is related to analytics or maybe this will help
http://vanillaforums.org/discussion/comment/171738/#Comment_171738
I haven't pursued it. I am waiting for a rseponse from the people in the know, if it hasn't already been filed on github.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
ok, I'm not alone it was my main question in fact... thanks, one more time @peregrine
certainly not.
no problem - you might file this on github though if it's not there already.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Same problem. Is there a fix?
hi guys i got this one fixed
add this to
class.discussionmodel.php
in folderapplications\Vanilla\Models
AROUND LINE : 1513
//record activity
AROUND LINE: 1959
//Add record Activity function to record the changes
public function RecordActivity($UserID, $DiscussionID, $DiscussionName) {
// Report that the discussion was created
AddActivity(
$UserID,
'NewDiscussion',
Anchor(Gdn_Format::Text($DiscussionName), 'discussion/'.$DiscussionID.'/'.Gdn_Format::Url($DiscussionName))
);
}
damn, i dont know how to format in forums, anyway i have an attached fixed version of class.discussionmodel.php in folder applications\Vanilla\Models
@hydn can you try the fix ?
trying now. Whats the best way to test?
make a backup of your original file
class.discussionmodel.php
in folderapplications\Vanilla\Models
ofcourseyea it works. Any side effects?
nope