Skip to:
Content

BuddyPress.org

#8918 closed enhancement (fixed)

Automate component's directory `buddypress` post type association

Reported by: imath's profile imath Owned by: imath's profile imath
Milestone: 12.0.0 Priority: normal
Severity: normal Version:
Component: Core Keywords: has-patch
Cc:

Description

When a plugin's component uses the has_directory global, it's required a buddypress post type entry is associated with it. So far as we were using the page post type we were using a UI to achieve this as it's easy to create a page. The buddypress post type is not displayed into the WP Administration UI as we are not using its content so we need to automate this buddypress post type association for orphaned components.

Change History (5)

This ticket was mentioned in PR #116 on buddypress/buddypress by @imath.


16 months ago
#1

  • Keywords has-patch added; needs-patch removed

Create a buddypress post type entry for potentiel third party orphaned components

Trac ticket: https://buddypress.trac.wordpress.org/ticket/8918

#2 @imath
16 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 13502:

buddypress post type dynamic creation for has_directory components

12.0 introduces a buddypress post type which is used to store the components directory pages into the database & replace the page post type that was used so far. It also replaced the Page association WP Admin screen with another WP Admin screen to customize all BP URLs.

In case a custom component is using a directory page and is not taking care of generating the corresponding buddypress post type entry, instead of asking for a page association in an admin notice, this entry is dynamically generated. If users are not happy with the title or slug of this entry, they can use the BP URLs settings tab to customize these afterwards.

Fixes #8918
See #4954
Closes https://github.com/buddypress/buddypress/pull/116

#3 @imath
15 months ago

  • Keywords needs-patch added; has-patch removed
  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Type changed from task to enhancement

Working on documenting the BP_Component class, I realize this part needs to be improved so that it takes in account the component's root_slug global as well as the directory_title one.

This ticket was mentioned in PR #127 on buddypress/buddypress by @imath.


15 months ago
#4

  • Keywords has-patch added; needs-patch removed
  1. the $bp->loaded_components array uses the component slug as keys (not the component ID). Avoid potential problems when a component slug is very different than the component ID by looping into this array the right way.
  2. Makes sure to use the component $root_slug and $directory_title when automatically creating a buddypress post type for orphaned components.

Trac ticket: https://buddypress.trac.wordpress.org/ticket/8918

#5 @imath
15 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 13514:

Improve automatic third party component directory page association

  1. the buddypress()->loaded_components array uses component slug as keys (not the component ID). Avoid potential problems when a component slug is very different than the component ID by looping into this array the right way when looking for components requiring a page association.
  2. Make sure to use the component $root_slug and $directory_title when automatically creating a buddypress post type for orphaned components.
  3. Improve the user feedback once 2. is achieved by informing they may need to refresh the site permalink settings.

Fixes #8918
Closes https://github.com/buddypress/buddypress/pull/127

Note: See TracTickets for help on using tickets.