Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
clicking "new" does not bring me to the newest comments.
Mark (et al),
I have a discussion that has near 300 pages of comments - (300 pages at 50 comments per page)
something happend to cause the recordkeeping to get out of wack. On the discussion list page, when you normaly click on "new" it brings you to the most recently added comment from a particular discussion. Now when you click on new it brings me to the top of page 84 and I don't know why. Similar things, i'm told by my users, are happening in other discussions as well.
is there some database tweak I can make for all users such that when they click "new" it behaves as expected?
0
This discussion has been closed.
Comments
SELECT count(*) FROM LUM_Comment WHERE DiscussionID = x AND Deleted = 0 AND WhisperUserID = 0 SELECT CountComments FROM LUM_Discussion WHERE DiscussionID = x
where x is the troublesome discussion ID.
Did you happen to try deleting/undeleting a comment? Vanilla actually uses that first query to update the counts, (but only when deleting/undeleting... when adding new comments it does a '+1' update) so if that isin't working the way it should that could be the source of the bug.
SELECT count(*) FROM LUM_Comment WHERE DiscussionID = x AND Deleted = 0 AND WhisperUserID = 0
this SQL statement returns 0 (zero)
However: this one:
SELECT count(*) FROM LUM_Comment WHERE DiscussionID = x
Returns 15060
and this:
SELECT count(*) FROM LUM_Comment WHERE DiscussionID = x AND Deleted = '0'
Returns 15059
and this:
SELECT count(*) FROM LUM_Comment WHERE DiscussionID = x AND Deleted = '0' AND WhisperUserID = 0
Returns 3961
and this
SELECT CountComment FROM LUM_Discussion WHERE DiscussionID = x
14348
SELECT count( * ) FROM `LUM_Comment` WHERE `DiscussionID` = x AND (`WhisperUserID` IS NULL OR `WhisperUserID` = 0 ) AND `Deleted` = '0'
so now...can anyone tell me if it's safe to set all WhisperUserID's in LUM_Comment to NULL for all WhisperUserID's with a value of zero