[wp-trac] [WordPress Trac] #16574: Lazy load ancestors
WordPress Trac
wp-trac at lists.automattic.com
Sun Mar 4 20:51:01 UTC 2012
#16574: Lazy load ancestors
-------------------------------------+------------------
Reporter: nacin | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 3.4
Component: Performance | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-testing |
-------------------------------------+------------------
Comment (by johnjamesjacoby):
Gah! !__
Replying to [comment:17 scribu]:
> [attachment:16574.5.diff] introduces a _WP_Post_Wrapper class that only
deals with `$post->ancestors`.
Creating a whole new class for this one thing is overkill. It does fixe
the problem, but introduces two others:
----
First issue happens in the default BuddyPress theme:
{{{
Notice: Indirect modification of overloaded property
_WP_Post_Wrapper::$object_id has no effect in /wp/wp-includes/nav-menu.php
on line 591
}}}
Something with
{{{
$original_object = get_post( $menu_item->object_id );
}}}
is causing the object_id to be overloaded. Not sure where or why yet, if
the problem is on BuddyPress's end or not. Should note there are no errors
as is before [attachment:16574.5.diff] is applied.
----
Second issue happens because of missing isset() in your magic !__get()
{{{
Trying to get property of non-object in /wp/wp-includes/post.php on line
442
}}}
[attachment:16574.6.diff] fixes the second issue, above. Unsure
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16574#comment:18>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list