Notifications
Clear all

wpForo 1.x.x [Solved] New "Forum" page created each time cache is cleared

12 Posts
3 Users
3 Likes
4,028 Views
Posts: 393
Topic starter
(@anonymous3542)
Honorable Member
Joined: 7 years ago

Odd one - every time I clear the wpForo cache, a newly created "Forum" page appears - and the database is updated in terms of wpforo_pageid to this newly created page !

Any ideas ? Slightly annoying when you are working on layouts.

Topic Tags
11 Replies
Robert
Posts: 10503
Admin
(@robert)
Support Team
Joined: 8 years ago

wpForo creates a new forum page when it doesn't find the forum page with [wpforo] shortcode. Please make sure the forum page exists. Also let me know what cache you use and have you tried it after deactivating other plugins?

1 Reply
(@anonymous3542)
Joined: 7 years ago

Honorable Member
Posts: 393

@robert I think I understand why now. I'm using the X Pro theme which in turn uses Cornerstone. The shortcode is entered, but I expect that this isn't being picked up. The page exists of course, but wpForo can't identify it, so it makes another.

This isn't any fault of wpForo, but is there a way I can disable this check as I end up with several pages 🙂

Posts: 393
Topic starter
(@anonymous3542)
Honorable Member
Joined: 7 years ago

Also, I am using Litespeed cache, and the URL is excluded. To be clear, this is another site I am working on. There's no issue with the previous one I created so it's not a wpForo issue per se.

Posts: 393
Topic starter
(@anonymous3542)
Honorable Member
Joined: 7 years ago

Found this in /wp-content/plugins/wpforo/wpf-includes

wpforo_create_forum_page()

I expect that this is the function where it checks for [wpforo] ?

Posts: 393
Topic starter
(@anonymous3542)
Honorable Member
Joined: 7 years ago

Took a chance and modified the line to read

!WPF()->db->get_var("SELECT `ID` FROM `".WPF()->db->posts."` WHERE `ID` = '".intval(WPF()->pageid)."' AND ( `post_content` LIKE '%[wpforo]%' OR `post_content` LIKE '%[cs_content]%' OR `post_content` LIKE '%[wpforo-index]%' ) AND `post_status` LIKE 'publish' AND `post_type` IN('post', 'page')") ){

(essentially, having it check for cornerstone content), which resolves the problem.

 

Page 1 / 3