Changing BP_GROUPS_SLUG breaks group wire
|Reported by:||burtadsit||Owned by:|
There are a couple of issues related to this really. In some cases it's related to the $bp->current_component var being used as a part of the $bp global var. The other is $bp->current_component being used to resolve the wire table name.
Both of these relate to the desire to have the wire be a drop in feature for new components. Unfortunately changing BP_GROUPS_SLUG changes the $bp->current_component and changes the $bp->groups->slug.
If either of those are used as part of the $bp global or to resolve the wire table name things break.
I've included a patch that is a solution to the immediate problem but it will not allow the wire to be dropped in to other components. I haven't looked at that issue. Don't have a complete solution.
The real issue is that there is no fixed internal 'name' for groups that is unrelated to the slug used for urls. bp needs to decouple the group slug from it's component name. The component name is 'groups' the pretty url part is the slug.
Anyway, the patch shows the affected spots in the code. I think I got 'em all. I attached the irc debug log with the user just in case I did. I got lost in the code there a couple of times.