Skip to:
Content

Opened 9 months ago

Closed 6 months ago

#7504 closed defect (bug) (invalid)

rename groups_created_group to bp_groups_created_group

Reported by: joneiseman Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Groups Keywords:
Cc:

Description

The action groups_created_group conflicts with an action of the same name in the Groups plugin. Action names should be prefixed with the plugin name to avoid conflicts. You should rename groups_created_group to bp_groups_created_group.

./buddypress/bp-groups/bp-groups-functions.php: do_action( 'groups_created_group', $group->id, $group );

There are actually many hooks registered with "groups_" as the prefix and these should all be changed to "bp_groups_" but the one mentioned in this ticket is the one that currently causes a problem.

Change History (6)

#1 @r-a-y
9 months ago

  • Version 2.8.2 deleted

Thanks for the report.

This problem only exists if both BuddyPress and the Groups plugin are active and/or another plugin is utilizing these hooks.

While it is true that our group hook names are poorly named, unfortunately we cannot really change the hook names without breaking plugins that might already be using these hooks.

If we did make such a change, we would have to notify plugin authors of our plans to deprecate and replacing these older hook names with the new ones.

Can you notify the authors of the Groups plugin to see if they are willing to change their hook name first?

Last edited 9 months ago by r-a-y (previous) (diff)

#2 @joneiseman
9 months ago

I did make a request on the Groups plugin support forum but so far there has been no response.

#3 @r-a-y
9 months ago

Thanks for already making a request about this, @joneiseman.

You could also try their GitHub issues tracker:
https://github.com/itthinx/groups/issues

#4 @proaktion
8 months ago

Hi guys,

Replied here with a solution (a little plugin that solves the conflict on the groups_created_group action both BuddyPress and Groups have) : https://wordpress.org/support/topic/groups_created_group-conflicts-with-buddypress/#post-9149965

I'd love to propose the changes in BP to the actions, but can't promise a PR right now due to other priorities.

Cheers

#5 @DJPaul
6 months ago

  • Milestone Awaiting Review deleted

The old naming convention dates back about 9 years (pre-v0.7, I think) where each bit of BP was a separate plugin, and the original developer didn't think to namespace them. I don't think we'll change the name of the action now, if we've only had (at least one) report over 9 years.

#6 @DJPaul
6 months ago

  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.