Notifications
Clear all

wpForo 1.x.x [Solved] Got a Fatal error after upgrade to Beta-6

6 Posts
2 Users
0 Reactions
2,385 Views
Posts: 4
Topic starter
(@dtmloc)
Active Member
Joined: 8 years ago

Hello I got this error when I add wpForo Widget to the Sidebar

Here is an example of wpForo Recent Post widget:
Fatal error: Call to a member function get_var() on null in/home/l9twhstvd/public_html/wp-content/plugins/wpforo/wpf-includes/class-posts.php on line 287

Here is the line 287:  

$items_count = $this->wpforo->db->get_var(preg_replace('#SELECT.+?FROM#isu', 'SELECT count(*) FROM', $sql));

This error happen with all the wpForo Widget at Sidebar in Forum page, they are work in Homepage.

Please help me to solve this error. Thanks

 

 

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

Hi dtmloc,

plugin is updated, please deactivate, delete then search and install wpForo again. Don't forget delete all caches.

Posts: 4
Topic starter
(@dtmloc)
Active Member
Joined: 8 years ago

Hi Robert,

I notice that you changed some code in line 287 at wpforo/wpf-includes/class-posts.php. However, the Fatal error now is line 288, here is the full error:

Fatal error: Call to a member function get_var() on null in/home/l9twhstvd/public_html/wp-content/plugins/wpforo/wpf-includes/class-posts.php on line 288

- line 287:

$item_count_sql = preg_replace('#SELECT.+?FROM#isu', 'SELECT count(*) FROM', $sql);

- line 288:

if( $item_count_sql ) $items_count = $this->wpforo->db->get_var($item_count_sql);

 

- and widget still work in Homepage, not work in Forum page. Sorry to bother you, but please help me to fix this problem, thanks you so much 🙂

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

What do you mean saying doesn't work? Could you please remove and add again forum widgets? Please leave some URL or screenshot to allow us see what's going on your website.

Posts: 4
Topic starter
(@dtmloc)
Active Member
Joined: 8 years ago

This is my Homepage URL:  http://l9twhstvd-site.ftempurl.com/ . You can see the Recent Post Widget work perfectly

This is my Forum page URL: http://l9twhstvd-site.ftempurl.com/community/  . You can see the error at Recent Post Widget

Many thanks for your advices 🙂

Page 1 / 2