Notifications
Clear all

[Solved] Recent Topics and Recent Posts widgets both resulting in errors

15 Posts
3 Users
1 Reactions
399 Views
Posts: 7
Topic starter
(@filleben)
Active Member
Joined: 2 months ago

Hello,

I am unable to use the Recent Topics and Recent Posts widgets they both result in errors when setting up the widgets.

Here are all the errors I get when trying to set them up in the WordPress backend:

The "wpforo_recent_posts" block was affected by errors and may not function properly. Check the developer tools for more details.

There was an error. Cannot read properties of undefined (reading 'hasOwnProperty')

Here are the errors from the error.log:

Fatal error: Uncaught Error: Call to a member function tree()on null in/home/website-name/public_html/wp-content/plugins/wpforo/widgets/RecentPosts.php:266

Stack Trace

1. wpforo\widgets\RecentPosts->form(Array)/home/website-name/public_html/wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php:578
2. WP_REST_Widget_Types_Controller->get_widget_form(Object(wpforo\widgets\RecentPosts), Array)/home/website-name/public_html/wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php:517
3. WP_REST_Widget_Types_Controller->encode_form_data(Object(WP_REST_Request))/home/cxocommunities/public_html/wp-includes/rest-api/class-wp-rest-server.php:1292
4. WP_REST_Server->respond_to_request(Object(WP_REST_Request), '/wp/v2/widget-t...', Array, NULL)/home/website-name/public_html/wp-includes/rest-api/class-wp-rest-server.php:1125
5. WP_REST_Server->dispatch(Object(WP_REST_Request))/home/website-name/public_html/wp-includes/rest-api/class-wp-rest-server.php:439
6. /home/website-name in /home/website-name/public_html/wp-content/plugins/wpforo/widgets/RecentPosts.php on line 266

I get the same set of errors for both Recent Posts and Recent Topics.

I have reinstalled wp-foro and disabled all other plugins with no success.

Any help would be greatly appreciated

14 Replies
1 Reply
(@ivanmx)
Joined: 2 months ago

New Member
Posts: 1

Posted by: @filleben

Hello,

I am unable to use the Recent Topics and Recent Posts widgets they both result in errors when setting up the widgets.

Here are all the errors I get when trying to set them up in the WordPress backend:

The "wpforo_recent_posts" block was affected by errors and may not function properly. Check the developer tools for more details.

There was an error. Cannot read properties of undefined (reading 'hasOwnProperty')

Here are the errors from the error.log:

Fatal error: Uncaught Error: Call to a member function tree()on null in/home/website-name/public_html/wp-content/plugins/wpforo/widgets/RecentPosts.php:266

Stack Trace

1. wpforo\widgets\RecentPosts->form(Array)/home/website-name/public_html/wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php:578
2. WP_REST_Widget_Types_Controller->get_widget_form(Object(wpforo\widgets\RecentPosts), Array)/home/website-name/public_html/wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php:517
3. WP_REST_Widget_Types_Controller->encode_form_data(Object(WP_REST_Request))/home/cxocommunities/public_html/wp-includes/rest-api/class-wp-rest-server.php:1292
4. WP_REST_Server->respond_to_request(Object(WP_REST_Request), '/wp/v2/widget-t...', Array, NULL)/home/website-name/public_html/wp-includes/rest-api/class-wp-rest-server.php:1125
5. WP_REST_Server->dispatch(Object(WP_REST_Request))/home/website-name/public_html/wp-includes/rest-api/class-wp-rest-server.php:439
6. /home/website-name in /home/website-name/public_html/wp-content/plugins/wpforo/widgets/RecentPosts.php on line 266

I get the same set of errors for both Recent Posts and Recent Topics.

I have reinstalled wp-foro and disabled all other plugins with no success.

Any help would be greatly appreciated

 

Sofy
Posts: 5006
 Sofy
Admin
(@sofy)
Support Team
Joined: 7 years ago

Hi,

We'll check and get back to you soon. 

Sofy
Posts: 5006
 Sofy
Admin
(@sofy)
Support Team
Joined: 7 years ago

Hi,

We don't find such an issue on your test websites. 

The errors should be caused by either other plugins or the active theme

Please deactivate the plugins/theme one by one and check after each deactivation to find the source of the problem.

Posts: 7
Topic starter
(@filleben)
Active Member
Joined: 2 months ago

Hello,

Thank you for the reply.

The errors still exist after deactivating themes and plugins.

I have done more testing and found out that the issue is not present on the main domain, it only seems to be affecting the subdomain.

Initially, the project was not supposed to be a network/multisite setup however the scope of the project changed, wpForo was originally installed on the main domain before also being activated on the subdomain.

Hopefully, this information helps get to the bottom of the problem.

Posts: 7
Topic starter
(@filleben)
Active Member
Joined: 2 months ago

Following up on my reply we have done some more testing.

We have installed the plugin on several sites within our network. On sites that share the same domain (e.g., subdomains like example.com/site1 and example.com/site2), we encounter the same issues with the recent posts and recent topics widgets. However, on network sites with different domains (e.g., example.com and anotherdomain.com), the widgets function correctly. This suggests that the issue arises when multiple network sites share the same domain.

9 Replies
Sofy
 Sofy
Admin
(@sofy)
Joined: 7 years ago

Support Team
Posts: 5006

@filleben 

We don't find such an issue on our test websites. Could you please send the admin login details to info[at]gvectors.com email address? I'll ask the developers to check the issue for you.

(@filleben)
Joined: 2 months ago

Active Member
Posts: 7

@sofy

Email has been sent.

Sofy
 Sofy
Admin
(@sofy)
Joined: 7 years ago

Support Team
Posts: 5006

@filleben 

Please enable the plugin editing feature and let us know. So, the developers will be able to review the issue.

For more information, see this article:   https://www.ionos.com/community/websites-ecommerce/wordpress/activate-wordpress-theme-and-plug-in-editor/

(@filleben)
Joined: 2 months ago

Active Member
Posts: 7

@sofy 

They should have access to the plugin file editor now.

Sofy
 Sofy
Admin
(@sofy)
Joined: 7 years ago

Support Team
Posts: 5006

Dear @filleben 

The developers still cannot ann/edit any plugins.

(@filleben)
Joined: 2 months ago

Active Member
Posts: 7

@sofy 

I have made a new user for them to use, info sent via email.

Sofy
 Sofy
Admin
(@sofy)
Joined: 7 years ago

Support Team
Posts: 5006

@filleben 

The same applies to this case. You need to set the user role as Super Admin, not just Admin.

(@filleben)
Joined: 2 months ago

Active Member
Posts: 7

@sofy 

They have been set up as a super admin the whole time. I am struggling to see what the issue is.

Are they aware that it's a network setup? They must go to the network admin to install plugins/edit files.

I have logged in using the details provided to your developers and have no issues.

https://intelligentedu.tech/wp-admin/network/ - network admin dashboard here you can edit and install plugins

https://intelligentedu.tech/forum-test/wp-admin/ - where wpForo is installed and where the recent topics and posts widgets are broken

Sofy
 Sofy
Admin
(@sofy)
Joined: 7 years ago

Support Team
Posts: 5006

@filleben 

The issue is fixed by our developers. The changes will be included in the next version of the wpForo plugin.