Hi wpForo Support Team. I'm submitting this bug report with a "possible solution" below.
-------------------------Â Â
ISSUE: Links to topics in Hidden Forums appear on the "Recent Post" Widget, as viewed on Chrome
LOCATION /FORUM LAYOUT: Main Forum Page, Recent Post Widget Area, Threaded Layout
DESCRIPTION: We were testing the Threaded Layout and the "Hidden Forums and Hidden Topics". On the "Recent Topics" menu located on the Forum Menu top bar, using the short code
/%wpforo-recent%/
All is well on the "Recent Posts" area of the hidden topics not showing, but on the Recent Post widget, the links to the hidden topics appear. And when you click any of the links to the private posts, it goes to a 404 page.Â
Attaching screenshot of my Recent Post Widget settings.
Â
Attaching screenshot of Registered Member View
Â
Attaching screenshot of Guest View with Links to Hidden Topics showing on the Recent Topics Widget (of course the entire posts remain hidden and do not appear, it's just the link to the post)
I did a code tweak today (which I am including below), but out of respect to wpForo Support Team, please check it too, because I don't want my suggestion to break some other functionality on the forum codes. So I'm submitting this FORMAT of submitting a Bug Report to make it easier for the Developers to recreate the scenario, and then do what you do best. 🙂
If it's wrong, please just delete this thread. Thanks! Â
After I have used the code tweak below, this is a screenshot of what appears.
Â
Hi @Robert and @Sofy, Please correct me if I am wrong, let me know if this is okay to use which will not affect other functionalities in wpForo. It's what I tweaked in my forum 🙂
The code I changed is in the wpforo/wpf-includes/functions-template
--------------- 610 - 621, specifically line 620
$ug_can_va = WPF()->perm->usergroup_can('va');
$is_avatar = wpforo_feature('avatars');
$posts_args = array(
'forumids' => ( $instance['forumids'] ? $instance['forumids'] : $this->default_instance['forumids'] ),
'orderby' => ( key_exists( $instance['orderby'], $this->orderby_fields ) ? $instance['orderby'] : $this->default_instance['orderby'] ),
'order' => ( key_exists( $instance['order'], $this->order_fields ) ? $instance['order'] : $this->default_instance['order'] ),
'row_count' => ( ( $count = intval( $instance['count'] ) ) ? $count : $this->default_instance['count'] ),
'limit_per_topic' => ( ( $limit = intval( $instance['limit_per_topic'] ) ) ? $limit : $this->default_instance['limit_per_topic'] ),
'private' => $private,
'status' => $status,
'check_private' => false
);
--------------- Line 620
'check_private' => false
I changed it to >'check_private' => true;
Â
$is_avatar = wpforo_feature('avatars');
$posts_args = array(
'forumids' => ( $instance['forumids'] ? $instance['forumids'] : $this->default_instance['forumids'] ),
'orderby' => ( key_exists( $instance['orderby'], $this->orderby_fields ) ? $instance['orderby'] : $this->default_instance['orderby'] ),
'order' => ( key_exists( $instance['order'], $this->order_fields ) ? $instance['order'] : $this->default_instance['order'] ),
'row_count' => ( ( $count = intval( $instance['count'] ) ) ? $count : $this->default_instance['count'] ),
'limit_per_topic' => ( ( $limit = intval( $instance['limit_per_topic'] ) ) ? $limit : $this->default_instance['limit_per_topic'] ),
'private' => $private,
'status' => $status,
'check_private' => true
);
--------------------
And in case this is wrong, or if it might conflict with other codes on the forum, please kindly just delete this thread so no one else can use it by mistake. (it seems to have worked though, in my forum) . Thanks!  🙂 Â