Opened 11 years ago
Last modified 8 months ago
#2480 reopened defect (bug)
user forum subscriptions not shown
Reported by: | wdfee | Owned by: | 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)
#3
@
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
@
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...
In order:
I have add the link to click in content-single-forum.php like this :<?php bbp_forum_subscription_link(); ?>
After i have copy entire user-subscriptions.php in my child theme..
Is all? exist other file o code to add in other parts?
#5
@
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
@
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? :(
#8
@
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
@
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
@
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
@
11 years ago
The [X] Bottom was added by modify loop-single-forum.php THIS IS RESOLVED
Remaining Subcategory forums issue!!!
#12
@
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
#13
@
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
@
11 years ago
- Owner set to johnjamesjacoby
- Resolution set to fixed
- Status changed from new to closed
In 5211:
#17
follow-ups:
↓ 18
↓ 23
@
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
@
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
@
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:
↓ 24
@
11 years ago
Scenario 1 works and Scenario 2 does NOT work
Scenario 1 - Repro: Group Forums Parent = -- Forum Root --
- Open a BP Group Forum eg http://127.0.0.1/groups/abc123/forum/
- Click 'Subscribe'
- Create a 'New Topic'
- Check email
- Works as expected
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.
#22
@
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
@
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
@
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.
tested with 2.5, WP 3.7.1