Skip to:
Content

bbPress.org

Opened 11 years ago

Last modified 9 months ago

#2480 reopened defect (bug)

user forum subscriptions not shown

Reported by: wdfee's profile wdfee Owned by: johnjamesjacoby's profile johnjamesjacoby
Milestone: 2.8 Priority: normal
Severity: normal Version: trunk
Component: API - Subscriptions Keywords: needs-patch reporter-feedback
Cc:

Description

Relates to your pretty well new forum subscriptions feature (#2299):

includes/user/functions line 639: bbp_get_user_forum_subscriptions() tries to query bbp_has_forums( array( 'post__in' => $subscriptions ) )but 'post__in' is no $arg for bbp_has_forums. It returns false even if user has forum subscriptions. So on user's subscription page no forums show up but 'You are not currently subscribed to any forums.'

Change History (27)

#1 @wdfee
11 years ago

tested with 2.5, WP 3.7.1

#2 @alexvorn2
11 years ago

  • Milestone changed from 2.5.1 to Awaiting Review

#3 @johnjamesjacoby
11 years ago

  • Milestone changed from Awaiting Review to 2.5.1

If this is happening, post__in isn't the culprit. bbp_parse_args() does a simple array_merge() of the $args and the default arguments array.

Is it possible you've customized your user-subscriptions.php template in a parent or child theme? If so, you'll need to add the new forum subscription bit to that template in order for them to appear.

#4 @freewpress
11 years ago

I jhon, i have same problems... i have child theme and have copied a new user-subscriptions.php in my bbpress folder.. I receive only: You are not currently subscribed to any forums.

But i have subscribed three forums...

No problems form topic subicribtion.. it show fine.. Other suggestions??

Also.. i have renamed my bbpress folder in my theme and used original bbpress default theme... and.. it not show again forum subscription...

Version 1, edited 11 years ago by freewpress (previous) (next) (diff)

#5 @freewpress
11 years ago

Update:

I have switched in Twenty Thirteen theme and nothing is changed.. I can't see forums subscriptions it remaining: You are not currently subscribed to any forums.

If i subscribe a forum, i see after "unsubscribe" link.. I think is was ok for this function.. And.. Why i can't read my subscribed forums ma only my subscribed topics? Please help..

Thanks.

#6 @freewpress
11 years ago

I have look my database and i have found

meta_key wp__bbp_forum_subscriptions

 with my two forums meata_value 9816,9813 and my correct user_id.

Now.. If these options are been present in my database, why it not show? :(

Last edited 11 years ago by freewpress (previous) (diff)

#7 @freewpress
11 years ago

  • Milestone changed from 2.5.1 to Awaiting Review

#8 @freewpress
11 years ago

Another feedback with same issue is here: http://bbpress.org/forums/topic/menu-link-to-profile/

Robin W was tested forum subscription in a test site and it report that have same issue...

#9 @freewpress
11 years ago

Today other test.. i have used this:

echo implode(',',$subscriptions);

to verify if array are ok.. it show me my two forums subscribed.. Promblems is here?

$query = bbp_has_forums( array( 'post__in' => $subscriptions ) );

#10 @freewpress
11 years ago

NEWS!!

All my subscribed forums are in subcategory THIS IS THE PROBLEM!

Now i have subscribed a forum thath not have any subforums and IT SHOW IN LIST.

I have 3 subscribed forums and only one show!!!

Another issue... I can't find the bottom [x] to remove forums from subscribed forums list.

#11 @freewpress
11 years ago

The [X] Bottom was added by modify loop-single-forum.php THIS IS RESOLVED

Remaining Subcategory forums issue!!!

#12 @freewpress
11 years ago

At this point i think problem is line 120 in includes/forums/template.php

'post_parent'         => bbp_is_forum_archive() ? 0 : bbp_get_forum_id(),

Or function bbp_get_forum_id()...

For example if i set for test:

'post_parent'         => '',

it show all forums subscribed, but obviously forums archive don't work correctly...

but where are you all? I'm writing alone :D

Last edited 11 years ago by freewpress (previous) (diff)

#13 @johnjamesjacoby
11 years ago

  • Milestone changed from Awaiting Review to 2.5.1

That's interesting. I'll add a post_parent argument just to be certain, but you're also correct that subscribing to a category doesn't do much good since it will never have topics, and it isn't a hierarchical subscription that subscribes you to all child forum topics.

#14 @johnjamesjacoby
11 years ago

  • Owner set to johnjamesjacoby
  • Resolution set to fixed
  • Status changed from new to closed

In 5211:

In bbp_has_forums() do some post_parent routing to make sure all forums are available on subscription pages. Fixes #2480. (2.5 branch)

#15 @johnjamesjacoby
11 years ago

In 5212:

In bbp_has_forums() do some post_parent routing to make sure all forums are available on subscription pages. Fixes #2480. (trunk)

#16 @freewpress
11 years ago

Issue was resolved.. thanks JJJ it work fine now!!

#17 follow-ups: @wdfee
11 years ago

sorry, issue isn't solved for me yet. Still doesn't fetch forums used with buddypress group forum root. The parent must be bbp_group_forums_root_id()

#18 in reply to: ↑ 17 @johnjamesjacoby
11 years ago

Replying to wdfee:

sorry, issue isn't solved for me yet. Still doesn't fetch forums used with buddypress group forum root. The parent must be bbp_group_forums_root_id()

Can you explain a bit more what issues you're having, and how bbp_group_forums_root_id() fixes them?

#19 @johnjamesjacoby
11 years ago

  • Milestone changed from 2.5.1 to 2.5.2
  • Resolution fixed deleted
  • Status changed from closed to reopened

#20 follow-up: @netweb
11 years ago

Scenario 1 works and Scenario 2 does NOT work

Scenario 1 - Repro: Group Forums Parent = -- Forum Root --

Scenario 2 - Repro: Group Forums Parent = BPGROUPROOT

  • Create a new forum to use as the BP Group Forums Parent eg BPGROUPROOT
  • Update bbPress setting to use Group Forums Parent = BPGROUPROOT
  • Create a new BP group with forums
  • Open BP Group Forum eg http://127.0.0.1/groups/def456/forum/
  • Click 'Subscribe'
  • Create a 'New Topic'
  • Check email
  • Does NOT works as expected

Did not test using a fresh setup where BuddyPress creates its own forum root for group forums.

#21 @johnjamesjacoby
11 years ago

  • Keywords needs-patch added

#22 @wdfee
11 years ago

For me I solved it changing in includes/forums/template.php

` Forum archive only shows root

if ( bbp_is_forum_archive() ) {

$default_post_parent = 0;

User subscriptions shows any
} elseif ( bbp_is_subscriptions() ) {

$default_post_parent = 'any';

Could be anything, so look for possible parent ID
} elseif( !bp_is_group() ) {

$default_post_parent = bbp_get_group_forums_root_id();

} else {

$default_post_parent = bbp_get_forum_id();

} `

The elseif( !bp_is_group() ) just needs one more statement to control if buddypress and groups are used.

#23 in reply to: ↑ 17 @johnjamesjacoby
11 years ago

Replying to wdfee:

sorry, issue isn't solved for me yet. Still doesn't fetch forums used with buddypress group forum root. The parent must be bbp_group_forums_root_id()

Your fix above will actually break more than it fixes. What about non-group forums?

We need to figure out why the bbp_is_subscriptions() check isn't returning true when a user is viewing their subscriptions.

#24 in reply to: ↑ 20 @johnjamesjacoby
11 years ago

Replying to netweb:

Scenario 2 - Repro: Group Forums Parent = BPGROUPROOT

  • Create a new forum to use as the BP Group Forums Parent eg BPGROUPROOT
  • Update bbPress setting to use Group Forums Parent = BPGROUPROOT
  • Create a new BP group with forums
  • Open BP Group Forum eg http://127.0.0.1/groups/def456/forum/
  • Click 'Subscribe'
  • Create a 'New Topic'
  • Check email
  • Does NOT works as expected

This works for me. The post_parent isn't checked when sending notification emails.

#25 @johnjamesjacoby
11 years ago

  • Milestone changed from 2.5.2 to 2.6

Moving to 2.6 to look into further.

#26 @johnjamesjacoby
11 years ago

  • Keywords reporter-feedback added
  • Milestone changed from 2.6 to 2.7

This is still working correctly for me. Moving to 2.7 pending more investigation.

#27 @johnjamesjacoby
10 years ago

  • Milestone changed from 2.7 to 2.8

Bumping all 2.7 to 2.8 milestone.

Note: See TracTickets for help on using tickets.