[buddypress-trac] [BuddyPress Trac] #6280: Custom BP Component dropped from BP Pages Association Settings in some cases with 2.2 changes
buddypress-trac
noreply at wordpress.org
Tue Mar 10 15:23:37 UTC 2015
#6280: Custom BP Component dropped from BP Pages Association Settings in some
cases with 2.2 changes
---------------------------------------+---------------------------
Reporter: dtc7240 | Owner: boonebgorges
Type: regression | Status: closed
Priority: normal | Milestone: 2.2.2
Component: API | Version: 2.2
Severity: normal | Resolution: fixed
Keywords: needs-testing 2nd-opinion |
---------------------------------------+---------------------------
Changes (by boonebgorges):
* owner: => boonebgorges
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"9608"]:
{{{
#!CommitTicketReference repository="" revision="9608"
`bp_core_get_directory_page_ids()` should skip `bp_is_active()` check in
save context.
In [9177], a `bp_is_active()` check was added to
`bp_core_get_directory_page_ids()`
such that the function would not return page mappings for inactive
components.
This change caused problems for custom components, as the `bp_is_active()`
check didn't always pass for components that didn't manually set
themselves in
the active_components array. [9553] and [9555] addressed this problem by
only
filtering out packaged components. See #6244. But this fix was not truly
general, as it still resulted in the deletion of bp-pages entries related
to
third-party deactivated components when saving the page mapping settings.
This changeset introduces a more general fix, by distinguishing between
two
different use "contexts" of `bp_core_get_directory_page_ids()`:
* Read-only - When pulling up page IDs for display or for URI parsing,
deactivated components should be ignored.
* Save - When modifying the bp-pages array stored in the database, we
should be working with raw page data, including deactivated components.
The new `$status` parameter for `bp_core_get_directory_page_ids()`
addresses
this distinction (possible values 'all' and 'active'). We then pass 'all'
as
required in BP - namely, when modifying the bp-pages setting. This change
supercedes the fixes from #6244.
Props dtc7240, boonebgorges.
Fixes #6280.
}}}
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6280#comment:8>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list