[wp-trac] [WordPress Trac] #10381: post->ancestors isn't always set

WordPress Trac wp-trac at lists.automattic.com
Fri Jun 4 12:33:09 UTC 2010


#10381: post->ancestors isn't always set
-------------------------------+--------------------------------------------
 Reporter:  Denis-de-Bernardy  |       Owner:  ryan                               
     Type:  defect (bug)       |      Status:  new                                
 Priority:  normal             |   Milestone:  3.1                                
Component:  Cache              |     Version:  2.8                                
 Severity:  normal             |    Keywords:  dev-feedback needs-unit-tests early
-------------------------------+--------------------------------------------

Comment(by maorb):

 Ok, there is a progress on this (I don't know how to attach a .diff file
 link, so I attach the code in here):

 On the wp-includes/classes.php inside function start_el (which starts on
 line #1168, in WP2.9.2) Instead:


 {{{
                 if ( !empty($current_page) ) {
                         $_current_page = get_page( $current_page );

 }}}

 Put this:

 {{{
 if ( !empty($current_page) ) {
                         global $_wp_using_ext_object_cache;
                          wp_cache_delete($current_page, 'posts');
                         $_current_page = get_page( $current_page );
 }}}

 And now the css class of '''current_page_ancestor''' will be also added.
 I don't know if this is the best or desired fix, so hope to hear your
 opinion.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10381#comment:13>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list