wpForo 1.x.x [Solved] Topic pages disappeared
Hi guys!
@robert, after last update topic's pages disappeared in Q&A layout. You can check this problem in this topic on my forum. How to quickly resolve this issue? My users can't navigate in big topics.
Hi @antonm,
Please navigate to Dashboard > Forums > Settings > Feature admin page, make sure the HTML Cache is disabled. Then navigate to Dashboard > Forums > Dashboard admin page, click on [Delete all caches] button. If you use some other cache plugins, delete those plugins caches as well and press CTRL+F5 (twice) on the current page.
In case you want to say thank you 😊
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.
Hi Sofy,
I disabled and deleted all caches. I have updated the database. I don't use any custom template. Pressed Ctrl+F5 several times. Nothing changed 🙁
Specified topic has 55 answers, but I see only first 10. No topic navigation.
Could you please send admin login details to info[at]gvectors.com email address to allow us to check it.
In case you want to say thank you 😊
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.
I assume, that the problem related to new DB structure.
I examined SQL queries and found that for example this one:
SELECT count(*)
FROM `prefix_wpforo_posts`
WHERE `prefix_wpforo_posts`.`topicid` = 385
AND `prefix_wpforo_posts`.`parentid` = 0
returns 0. If I delete this argument
AND `prefix_wpforo_posts`.`parentid` = 0
the query returns 56 (right value).
After forum update I fixed all database issues.
Other count queries also return 0 counts.
Don't delete any argument. In such case, just insert new indexes. use Hosting cPanel > phpMyAdmin > WP Database > SQL Tab and execute these SQLs:
ALTER TABLE `wp_wpforo_posts` ADD INDEX `topicid_parentid`( `parentid`, `topicid`); ALTER TABLE `wp_wpforo_posts` ADD INDEX `topicid_parentid_guest` ( `parentid`, `topicid`, `status`, `private`);
Make sure the red marked wp_ prefix is correct for your database/
In case you want to say thank you !)
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.
Hi Robert,
all these manipulations were made in phpMyAdmin, not in the wpForo code.
So, don't worry. All works properly.
It seems I found the solution. Hope it will help other people.
Yes, this was a database problem. If you have access to phpMyAdmin then login to it.
- Select all tables of your WP installation.
- Choose in tables actions - Check tables.
- Select all tables of your WP installation again.
- Choose in tables actions - Optimize tables.
Now the problem has gone!
In case you want to say thank you 😊
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.
This fix worked until a new topic/post is made whereby the pagination disappears again. Have reverted back to the class-posts.php mod as shown at:
@antonM, that indeed got topic pagination back that is maintained even after new posts are added to the DB. thank you so much.
Spoke too soon. A new topic reply will once again kill topic pagination until the same cpanel SQL command as below is applied. Have to go back to my class-posts.php fix.
ALTER TABLE `prefix_wpforo_posts` ADD INDEX( `parentid`, `topicid`);
nando4, this solution is still working for me.
Don't forget to change the prefix according to your WP installation.
ALTER TABLE `prefix_wpforo_posts` ADD INDEX( `parentid`, `topicid`);
Yes, did that. It fixes topic pagination until a topic has a new post in it and then it's back to permanently disappearing.
So I've altered class-posts.php to not do a private=0 status lookup that's causing items_count=0 to be returned. Not elegant, but it works.
Do you delete all caches? Try to disable all caches, clear them and check pagination again.
Hi @nando4. I confirm that the problem still exists, but it is irregular. In some topics, pagination works well, in some topics it works only for registered users and doesn't work for guests, but after tables optimization, it begins to work for guests. Something strange...
@robert, please, pay attention to this problem again.
@nando4, could you please write your solution.
What changes did you make in file class-posts.php?
Thanks.
Posted by: antonM@nando4, could you please write your solution.
What changes did you make in file class-posts.php?
Thanks.
Add comments like shown in class-posts.php. The side effect is any private posts will now be public:
// else{
//If doesn't have "View Private Posts" access and not Owner, only return public posts
// $wheres[] = " " . $table_as_prefix . "`private` = 0";
//}/////Check Unapproved Post Access////////////////////////////
Thank you nando4. I tried your solution, but on my server, it not works. Unfortunately 🙁
I added double index again as Robert (@robert) wrote, but currently, pagination works only for registered users (i don't use a custom template). For guests, it doesn't work. I disabled and cleared all caches but no result. My tables are InnoDB.
On all other pages of the site, pagination works well. The problem with pagination only appears with wpForo and not in each release. So, I assume that this is actually a wpForo core problem otherwise I would have a pagination problem with all other site's pages.
Check this topic of my forum. It has 37 answers and no pagination. This kills my website traffic 🙁
I'd also recommend increase the memory limit of your WordPress. Then navigate to Dashboard > Forums > Dashboard and click on [Rebuild Threads] button. It may take a long time to do that. Once its done, click on [Delete all caches] button, then delete website caches and check it again as guest.
Also, please let me know, have you changed this forum layout recently?
In case you want to say thank you !)
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.
Hi Robert. I made all manipulations and no result for guests. I just made some minor modifications such as adding Google ads or similar not related to pagination. I also tried without any caches and the results are the same.
As i said this is the MySQL server specific cache issue and should be fixed with double indexes. The table optimization doesn't matter. Also, make sure you use InnoDB tables.
If you have a double indexes, then all other rare cases are only related to website or forum cache, they are site cache issues and are not related to wpForo core.
In case you want to say thank you !)
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.
Yes, we have Light Speed cache active. Disabling it isn't an option so the workaround posted above works for us.
Posted by: nando4Yes, we have Light Speed cache active. Disabling it isn't an option so the workaround posted above works for us.
Litespeed doesn't work well with wpForo. At least exclude wpForo page.
@antonm, @nando4 and @anonymous20,
We found this is not wpForo issue. This is a bug of MySQL 5.6 version.To show pagination it should count the total number of posts, but count(*) on InnoDB tables sometimes returns 0. This bug was reported to MySQL community on 11 Apr 2016. You can see the discussion here: https://bugs.mysql.com/bug.php?id=81031
So the solution is contacting to hosting support and asking them to update MySQL Server to 5.7 version. Or try to change wp_wpforo_posts table to MyISAM engine (not recommended).
In case you want to say thank you !)
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.
@robert, my hosting provider said that it can not update MySQL to 5.7 on shared hosting. It updated 5.6 to the latest version but the result is the same. Another strange thing that the pagination works well for registered users and it worked well in previous releases both for registered and guests 🙁
Don't forget the last time delete woForo cache in Dashboard > Forums > Dashboard admin page. Delete that cache in your website and hosting if you have, then last time optimize wpForo tables in database. And check using other browsers or delete browser cache.
In case you want to say thank you !)
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.
- 15 Forums
- 14 K Topics
- 70.2 K Posts
- 20 Online
- 12.4 K Members