Maybe I am doing something wrong but I cannot seem to see where the paging is happening. No mater if I change it to 10 discussions to show per page or change the theme, still I get no love. The 1, 2, 3, 4 and so on does not show up. Any ideas?
I posted the following as a separate question since neither one of us got an answer. This was the solution for me.
Please forgive me for re-posting this, but I'm a newbie to Vanilla. Love the program. However, I'm having a problem with paging. I had set up my forum with 4 or 5 categories and then decided to not use categories via the 'don't use categories' option on the manage categories page. By tracing through the code I found out that the paging routine accesses the CountDiscussions column on the Categories table and if this value is greater than the 'discussions per page' limit under advanced options, it sets up a pager. Since I had 2 announcements which were added before I set up the 'don't use categories' option, the value kept coming back as '2'. When I reactivated categories and assigned each discussion to category 1, paging showed up! It appears that if you don't use categories, you will never have paging. Is that correct?
the paging routine accesses the CountDiscussions column on the Categories table and if this value is greater than the 'discussions per page' limit under advanced options, it sets up a pager. ... When I reactivated categories and assigned each discussion to category 1, paging showed up! It appears that if you don't use categories, you will never have paging. Is that correct?
Yeah, that's the way it looks to me which definitely seems to be a bug. If you don't use categories, and have more than 100 discussions, no one would ever be able to get to those > 100!
I had this problem after I imported a few 100k comments. Run these queries after your imports (using your favorite Query editor, wrapped in PHP, or build and share a plugin):
//UPDATE THE DISCUSSION COMMENT COUNTS update GDN_Discussion Set GDN_Discussion.CountComments = ((Select Count(GDN_Comment.CommentID) from GDN_Comment where GDN_Comment.DiscussionID = GDN_Discussion.DiscussionID) + 1)
//UPDATE THE CATEGORY DISCUSSION COUNTS update GDN_Category Set GDN_Category.CountDiscussions = (Select Count(GDN_Discussion.DiscussionID) from GDN_Discussion where GDN_Discussion.CategoryID = GDN_Category.CategoryID)
//UPDATE THE CATEGORY COMMENT COUNTS update GDN_Category Set GDN_Category.CountComments = (Select SUM(GDN_Discussion.CountComments) from GDN_Discussion where GDN_Discussion.CategoryID = GDN_Category.CategoryID)
Comments
Vanilla co-founder
I posted the following as a separate question since neither one of us got an answer. This was the solution for me.
Please forgive me for re-posting this, but I'm a newbie to Vanilla. Love the program. However, I'm having a problem with paging. I had set up my forum with 4 or 5 categories and then decided to not use categories via the 'don't use categories' option on the manage categories page. By tracing through the code I found out that the paging routine accesses the CountDiscussions column on the Categories table and if this value is greater than the 'discussions per page' limit under advanced options, it sets up a pager. Since I had 2 announcements which were added before I set up the 'don't use categories' option, the value kept coming back as '2'. When I reactivated categories and assigned each discussion to category 1, paging showed up! It appears that if you don't use categories, you will never have paging. Is that correct?
What to do if I get a Bonk Error?
Vanilla Wiki : Join and help edit our Wiki! | View all Vanilla issues on GitHub | Report a new Vanilla issue on GitHub
Deploying a new Forum and adding a Theme
https://github.com/vanillaforums/Garden/issues
What to do if I get a Bonk Error?
Vanilla Wiki : Join and help edit our Wiki! | View all Vanilla issues on GitHub | Report a new Vanilla issue on GitHub
Deploying a new Forum and adding a Theme
https://github.com/vanillaforums/Garden/issues/938
What to do if I get a Bonk Error?
Vanilla Wiki : Join and help edit our Wiki! | View all Vanilla issues on GitHub | Report a new Vanilla issue on GitHub
Deploying a new Forum and adding a Theme
https://github.com/vanillaforums/Garden/commit/d870f94863fcdba4ff6213c6bda8350b58cf6be2
//UPDATE THE DISCUSSION COMMENT COUNTS
update GDN_Discussion Set GDN_Discussion.CountComments = ((Select Count(GDN_Comment.CommentID) from GDN_Comment
where GDN_Comment.DiscussionID = GDN_Discussion.DiscussionID) + 1)
//UPDATE THE CATEGORY DISCUSSION COUNTS
update GDN_Category Set GDN_Category.CountDiscussions = (Select Count(GDN_Discussion.DiscussionID)
from GDN_Discussion where GDN_Discussion.CategoryID = GDN_Category.CategoryID)
//UPDATE THE CATEGORY COMMENT COUNTS
update GDN_Category Set GDN_Category.CountComments = (Select SUM(GDN_Discussion.CountComments)
from GDN_Discussion where GDN_Discussion.CategoryID = GDN_Category.CategoryID)