Notifications
Clear all

wpForo 1.x.x [Solved] Guests do not see forum navigation buttons

40 Posts
3 Users
8 Reactions
27.3 K Views
antonM
Posts: 131
Topic starter
(@antonm)
Estimable Member
Joined: 8 years ago

@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?

antonM
Posts: 131
Topic starter
(@antonm)
Estimable Member
Joined: 8 years ago

Update.

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.

Any ideas?

Robert
Posts: 10591
Admin
(@robert)
Support Team
Joined: 9 years ago

@antonm

Please select all topics of forumid = 14 and check the  private and status fields. Are they all 0?

1 Reply
antonM
(@antonm)
Joined: 8 years ago

Estimable Member
Posts: 131

Yes, all items in these fields = 0

antonM
Posts: 131
Topic starter
(@antonm)
Estimable Member
Joined: 8 years ago

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.

Robert
Posts: 10591
Admin
(@robert)
Support Team
Joined: 9 years ago

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`);
Page 6 / 7