[buddypress-trac] [BuddyPress Trac] #6244: Custom Component Directory pages mappings removed when BuddyPress Componets selection saved in admin
buddypress-trac
noreply at wordpress.org
Sat Feb 21 00:54:34 UTC 2015
#6244: Custom Component Directory pages mappings removed when BuddyPress Componets
selection saved in admin
--------------------------------------+-----------------------------
Reporter: sbrajesh | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General - Administration | Version: 2.2
Severity: normal | Keywords:
--------------------------------------+-----------------------------
Hi,
In BuddyPress 2.2/2.2.1 when you set the directory pages for a custom
component, It works fine but when you try to save the Components from
BuddyPress->Components(even if you do not make any change in selection),
the mappings for the custom component directory pages are lost and you
will get a message 'The following active !BuddyPress Components do not
have associated !WordPress Pages: component name'.
The problem is caused by a change in !BuddyPress 2.2. There was a change
in the bp_core_get_directory_page_ids that checks for the active
components before returning the directory pages.
In the bp_core_admin_components_settings_handler, the active component is
being reset by the following code
{{{
$bp->active_components =
bp_core_admin_get_active_components_from_submitted_settings( $submitted );
}}}
and then bp_core_add_page_mappings() is called for saving the pages. Since
bp_core_add_page_mappings uses bp_core_get_directory_page_ids which in
turn checks for the active components, All the custom component
associations are lost.
I am not sure if I made myself clear, so here is the step to reproduce
it:-
1. Install custom component( try buddypress-skeleton-component)
2. activate the plugin
3. Visit Settings->!BuddyPress->Pages and save the associated page for
Example component
4. Now visit, Settings->!BuddyPress->Components and click Save settings.
The page association for the Example component will be lost.
A solution can be returning all the core components(selected) as well as
all other active components from the
'bp_core_admin_get_active_components_from_submitted_settings' if the
checks for bp_is_active('component' ) is to be honored.
Relevant ticket: #6197
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6244>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list