Can't list topics in forum archive with "read_hidden_forums" capability
-
WordPress 3.1.4, bbpress plugin 2.0
I want role Participant to view forum/topic/reply with Hidden attribute but not Private,how can I do?
I try to change some definition manually in bbp_get_caps_for_role() like this:
case $participant_role :
$caps = array(
// Forum caps
‘read_hidden_forums’,
// Topic caps
‘publish_topics’,
‘edit_topics’,
// Reply caps
‘publish_replies’,
‘edit_replies’,
// Topic tag caps
‘assign_topic_tags’,
);
break;
and reinstall wordpress and bbpress, create a Participant account and it works.
Everything seems OK but only when I access pages like: http://localhost/?forum=a-hidden-forum, it returns a 404 page, not a topic list.
Other pages like “http://localhost/?topic=a-topic-in-a-hidden-forum”, “http://localhost/?post_type=forum” and widges in sidebar return the right contents.
I also try adding both
// Forum caps
‘read_hidden_forums’,
‘read_private_forums’,
to Participant and as a result, every pages are displayed even “http://localhost/?forum=a-hidden-forum” and topics in Private forum.
It seems have something to do with actions in “bbp-init” in which return a wrong string when reaching for perameter “forum”.
Sorry for not viewing all previous QoA but the most similar topic I’ve found is “Forum Participant role cannot view private forum” but it doesn’t help.
Is there any way to solve my problem?
Thanks for any help
- You must be logged in to reply to this topic.