[buddypress-trac] [BuddyPress] #3422: Components registered via bp_core_add_root_component() produce zillions of pages when original page is deleted
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Tue Aug 2 19:42:08 UTC 2011
#3422: Components registered via bp_core_add_root_component() produce zillions of
pages when original page is deleted
--------------------------+------------------
Reporter: boonebgorges | Owner:
Type: defect | Status: new
Priority: blocker | Milestone: 1.5
Component: Core | Version: 1.5
Severity: blocker | Resolution:
Keywords: 2nd-opinion |
--------------------------+------------------
Comment (by boonebgorges):
I've tracked down at least part of the problem, at least with upgrades.
Here's what happens:
- When BP is first loaded after the upgrade (but before the wizard has
been completed), the option 'bp-pages' is empty.
- During that first page load, bp_core_add_root_component() is called by
the plugin, which in turn attempts to call up the list of bp-pages, via
bp_core_get_page_names() and bp_core_get_page_meta(). In these cases, it
will end up being empty.
- When bp_core_get_page_meta() then attempts to build a stdClass with the
page data, it ends up creating an array with a null value and key.
bp_core_add_root_component() then adds an item to this array, which
creates invalid sql in bp_core_get_page_names(), and generally screws
everything up.
Checking to make sure that there are no invalid keys in the $page_ids
array in bp_core_get_page_meta() seems to fix at least this part of the
problem. See 3422.01.patch.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3422#comment:6>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list