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
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
Hi,
We'll check and get back to you soon.
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.
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.
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.