Make WordPress Core

Opened 17 years ago

Closed 15 years ago

Last modified 5 years ago

#4660 closed defect (bug) (invalid)

get_pages() ignores `hierarchical' arg when a cache for a query hits

Reported by: reedom's profile reedom Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.2.1
Component: Template Keywords: cache
Focuses: Cc:

Description

get_pages() in post.php will shortcut if a cache for a query hits.
In that case it misses a chance to call `get_page_children()' so that it results non-hierarchical-ordered page array.

representation

  1. create some pages hierarchical.
  2. place the attatched file test_get_pages_order.php in /wp_includes.
  3. run the script from shell.

Attachments (2)

test_get_pages_order.php (742 bytes) - added by reedom 17 years ago.
get_pages_order.2.2.1.patch (875 bytes) - added by reedom 17 years ago.
Please test well since I haven't.

Download all attachments as: .zip

Change History (6)

#1 @foolswisdom
17 years ago

  • Milestone set to 2.4 (future)

Hi Reedom, please attach a patch vs trunk.

#2 @reedom
17 years ago

I missed to mention its background.

This problem occurs only when there is one or more 'the_pages' filters and any of them change order of `$pages' array.

@reedom
17 years ago

Please test well since I haven't.

#3 @darkdragon
16 years ago

  • Component changed from General to Template

#4 @DD32
15 years ago

  • Milestone 2.9 deleted
  • Resolution set to invalid
  • Status changed from new to closed

the get_page_children() call is before the wp_cache_set() call under current-day trunk, So i'm closing this ticket as invalid, as it should no longer be needed.

Note: See TracTickets for help on using tickets.