[wp-trac] [WordPress Trac] #14329: current_page_ancestor not being set because $post->ancestors is not being cached
WordPress Trac
wp-trac at lists.automattic.com
Fri Jul 16 14:29:57 UTC 2010
#14329: current_page_ancestor not being set because $post->ancestors is not being
cached
--------------------------+-------------------------------------------------
Reporter: layotte | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.1
Component: Cache | Version: 3.0
Severity: normal | Keywords: needs-patch
--------------------------+-------------------------------------------------
Comment(by layotte):
Still testing, I tried wp_cache_flush at the beginning of my template file
and it still had the same results as above.
I actually have two wp_list_pages() calls in this template. The first is a
left sidebar, with a depth=1, so I can get all the immediate children of a
specific page. The second is a depth=2, to get all the children of the
ancestor page.
In other words my structure is:
Academic Programs
|->Graduate Degrees
|-> Foreign Langauge <= first wp_list_pages to get children of Graduate
Degrees
|-> Ed.S. <= second wp_list_pages to get children and grand
children degree
|-> How to Apply
I started moving the wp_cache_flush() down until I got to my second
wp_list_pages. If I put wp_cache_flush() immediately after the
wp_list_pages then the my first two results (above) include the
$post->ancestors...
still digging... just reporting as I find stuff.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14329#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list