[buddypress-trac] [BuddyPress] #4940: bp_is_current_action() not working for groups if using page name other than 'groups'
buddypress-trac
noreply at wordpress.org
Tue Apr 23 11:43:16 UTC 2013
#4940: bp_is_current_action() not working for groups if using page name other than
'groups'
-------------------------------+------------------------------
Reporter: rogercoathup | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Core | Version: 1.7
Severity: major | Resolution:
Keywords: reporter-feedback |
-------------------------------+------------------------------
Comment (by boonebgorges):
Thanks for the additional details, rogercoathup. But, as I mentioned
above, changing the 'Groups' page name is working fine for me with every
other group plugin I've tried, so this problem must be due to the
specifics of how you are adding the 'follow' subpage. Are you using any
code to add a 'follow' action, or is it just something that BP is
autodetecting in the URL?
In any case, I can't reproduce using your code. I put the following in my
bp-custom.php (note I had to add quote marks to the JS to make it work):
{{{
function ar_firms_follow_firm_action() {
global $bp; ?>
<script type="text/javascript">
console.log( '<?php echo $bp->current_component ?>' );
console.log( '<?php echo $bp->current_action ?>' );
</script>
<?php
}
add_action( 'bp_actions', 'ar_firms_follow_firm_action' );
}}}
As intended, 'groups' and 'follow' are getting logged to the console when
I visit groups/group-name/follow.
If there's any code you're using that's relevant to the adding of the
'follow' action, please share it here. Otherwise, you might consider
testing on a fresh installation of BP, to see if you're experiencing
conflicts with your plugins/theme.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4940#comment:4>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list