Opened 8 years ago
Closed 8 years ago
#7370 closed defect (bug) (no action required)
Slug Constants causing problems
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | low | |
Severity: | normal | Version: | 2.7.2 |
Component: | Activity | Keywords: | reporter-feedback |
Cc: |
Description
Not sure exactly what caused this but I can say
define('BP_ACTIVITY_SLUG', 'custom-stream');
... using the above code caused bp_get_options_nav()
to vanish in any activity component (root, members, group).
Also bp_get_activity_slug()
doesn't return anything for my installation.
Change History (4)
#2
@
8 years ago
- Keywords reporter-feedback added
Using a default WordPress theme and a clean site, I can't cause any navigation to "vanish". Nor do I get any errors or warnings in my logs.
Looking at the code (I haven't checked the documentation), BP_ACTIVITY_SLUG
is used to change the slug
for the Activity component, e.g. example.com/members/admin/activity/
. This is not the same as the top-level directory root_slug
, which is e.g. example.com/activity/
.
I have by no means tested entire functionality, but at very basic levels, using the constant definition provided in this ticket, my profile Activity URLs look like http://buddypress.dev/members/admin/custom-stream/favorites/
and appear to work fine. bp_get_activity_slug()
also returns what I set the constant to.
@buddycore I think this must be caused by some unusual conflict with a custom code, a themes or perhaps something more simpler. After you set the constant, and visit the pages, did you get any PHP errors or warnings in your log? If you did, this might explain why the page appears to load, but caused some other part to vanish.
#3
@
8 years ago
Sorry for not posting further findings, I can't quite remember what caused my problems or if I was looking at the problem identified incorrectly.
Either way, I concluded it was something with my installation but unfortunately I forgot about the ticket at this time and am unable to share what that was.
This ticket can be closed.
#4
@
8 years ago
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
Thanks - we know this area is one where BuddyPress is pretty poor, and we want to make it better.
I've since discovered that renaming the component slug like that also changes the output via $bp global.
Not being able to grab a constant value with
bp_get_activity_slug()
is leading to problems.