Notifications
Clear all

[Solved] Can't add the "wpForo Forums", "wpForo Recent Posts", and "wpForo Recent Topics" in sidebar widget.

9 Posts
3 Users
1 Likes
95 Views
Posts: 5
Topic starter
(@shen-hsu)
Active Member
Joined: 2 weeks ago

The content of debug.log is as below,

==============================================================

[29-Apr-2024 05:46:56 UTC] PHP Fatal error Uncaught Error: Call to a member function tree() on null in wp-content/plugins/wpforo/widgets/Forums.php:53

Stack trace:

#0 wp-content/plugins/wpforo/widgets/Forums.php(74): wpforo\widgets\Forums->get_widget(Array)
#1 wp-includes/widgets.php(1261): wpforo\widgets\Forums->widget(Array, Array)
#2 wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php(553): the_widget('wpforo\\widgets\\...', Array)
#3 wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php(523): WP_REST_Widget_Types_Controller->get_widget_preview('wpforo\\widgets\\...', Array)
#4 wp-includes/rest-api/class-wp-rest-server.php(1230): WP_REST_Widget_Types_Controller->encode_form_data(Object(WP_REST_Request))
#5 wp-includes/rest-api/class-wp-rest-server.php(1063): WP_REST_Server->respond_to_request(Object(WP_REST_Request), '/wp/v2/widget-t...' in wp-content/plugins/wpforo/widgets/Forums.php on line 53

==============================================================

 

Forums.php:53

WPF()->forum->tree( 'front_list', true, WPF()->current_object['forumid'], false );

 

But add the "wpForo Online Members", "wpForo User Profile & Notifications", and "wpForo Search" all successfully without any error!

 

8 Replies
dimalifragis
Posts: 2614
(@dimalifragis)
Famed Member
Joined: 4 years ago

What PHP version are you using?

1 Reply
(@shen-hsu)
Joined: 2 weeks ago

Active Member
Posts: 5

@dimalifragis The PHP version I used is 7.4.33.

dimalifragis
Posts: 2614
(@dimalifragis)
Famed Member
Joined: 4 years ago

Ok, is this a WPML site?

Can you disable some plugins one by one and check?

1 Reply
(@shen-hsu)
Joined: 2 weeks ago

Active Member
Posts: 5

@dimalifragis Not a WPML site, I tried disable all plugins to check.

Even I rebuilt a clean website (all setting and database are default) with wordpress v6.5.2...the error is still there.

dimalifragis
Posts: 2614
(@dimalifragis)
Famed Member
Joined: 4 years ago

This is strange. Have you tried the default theme, or a different theme?

1 Reply
(@shen-hsu)
Joined: 2 weeks ago

Active Member
Posts: 5

@dimalifragis YES! The clean website for verification is the default theme.

Robert
Posts: 10519
Admin
(@robert)
Support Team
Joined: 8 years ago

Hi @shen-hsu ,

Could you please install the Classic Widget and try it again.

Also, try to deactivate, delete and install wpForo again. Do not use the Uninstall button.

1 Reply
(@shen-hsu)
Joined: 2 weeks ago

Active Member
Posts: 5

@robert After I install and active the "Classic Widget" you suggested, now I add them the error no longer appears.
The "wpForo Forum", "wpForo Recent Posts" and "wpForo Recent" appear in wpForo's sidebar normally.

Thank you so much!