[Solved] Guests do not see forum navigation buttons
@robert, I created a test site and installed all my plugins with wpforo. No problems, pagination works well. So, the problem with my production site. Is there any debug options to detect the problem?
Something wrong with sql. If I open forum as user the select query is
SELECT COUNT(*) FROM wpforo_topics WHERE forumid = 14
It gives 17.
If I open forum as guest the select query is
SELECT COUNT(*) FROM wpforo_topics WHERE forumid = 14 AND private = 0 AND status = 0
It gives 0.
I have tried to run this query via phpMyAdmin and it returns also 0.
If I delete 'private' or 'status' the select returns 17.
Please select all topics of forumid = 14 and check the private and status fields. Are they all 0?
I have just tried select:
SELECT * FROM wpforo_topics WHERE forumid = 14
It returned 17.
The I input select:
SELECT * FROM wpforo_topics WHERE forumid = 14 AND status = 0 AND private = 0
It returned 17.
Then I input
SELECT COUNT(*) FROM wpforo_topics WHERE forumid = 14 AND status = 0 AND private = 0
And it also returned 17. Now pagination works for guests. I don't understand anything...
Thank you for help @robert.
Ok, then this is a MySQL cache issue, you should add a multiple index to reset this cache and make it work faster. Please navigate to this table Structure Tab, select forumid. private, status fields and make those one index.
Or just execute this SQL, make sure the wp_ database table prefix is correct:
ALTER TABLE `wp_wpforo_topics` ADD INDEX( `forumid`, `private`, `status`);
Then navigate to Dashboard > Forums > Dashboard and click on the [Delete all caches] button.
Sorry for the late reply. I have looked through this thread at the solution worked out with AntonM, and I think this fix may go over my head. I'm having the exact same issue, and since we are the only ones having it I must assume it's the same cause.
@antonm is this solution still working for you? Good job working it out btw
@Robert My level of experience isn't enough to really understand what You and AntonM figured out in your conversation - could I PM an Admin login to you to see if this is the same issue, and get some help correcting it?
Yes, this solution is working for me. The forum's pagination works well for guests until now. The problem was with my MySQL DB and I suppose you have the same problem.
Do you have access to phpMyAdmin on your hosting?