WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#8683 closed defect (bug) (duplicate)

exclude_tree in wp_list_pages not working consistently

Reported by: jayp Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.7
Component: Template Keywords: has-patch needs-testing reporter-feedback
Focuses: Cc:

Description

The exlcude_tree parameter in the template tag wp_list_pages is not working reliably for me. I have a situation with pages and child pages, and when using the following,

wp_list_pages('title_li=&sort_column=menu_order&exclude_tree=2,50,51,379');

shows page 379 and its child nodes and shows the child nodes of 51 but not 51 itself.

Changing the function to:

wp_list_pages('title_li=&sort_column=menu_order&exclude=2,50,51,379&exclude_tree=2,50,51,379');

Then hides 379 but not its child nodes. The child nodes of 51 also remain visible.

I've moved 379 and 51 to various levels in the pages hierachy. I've set their status to draft and then published them again. Nothing makes a difference.

I'm terribly sorry I can't be more specific for the conditions that are causing the bug. I am happy to allow someone to look at the database and site if need be.

Attachments (1)

8683.patch (1.6 KB) - added by hakre 5 years ago.

Download all attachments as: .zip

Change History (16)

comment:1 jayp5 years ago

  • Milestone changed from 2.8 to 2.7.1

comment:2 MichaelH5 years ago

Does the patch on ticket:9153 fix this problem?

comment:3 Denis-de-Bernardy5 years ago

I think this one is actually related to #9580

comment:4 Denis-de-Bernardy5 years ago

  • Component changed from General to Template
  • Keywords needs-patch added

comment:5 hakre5 years ago

  • Keywords reporter-feedback added

comment:6 hakre5 years ago

The exlcude_tree parameter in the template tag wp_list_pages is not working in 2.7 and 2.7.1. It needs a patch. You should be able to use it with a single value and not with a list and that's it (if even so).

comment:7 hakre5 years ago

seee #9153 (for wp 2.8)

comment:8 hakre5 years ago

Your overall description is very clear. I will create a patch for the situation you describe (will take some minutes). Please be so kind and test it aftwards, thanks.

hakre5 years ago

comment:9 hakre5 years ago

  • Keywords has-patch added; needs-patch removed

Provided a patch that hopefully helps with your problems. Please test and report back.

comment:10 Denis-de-Bernardy5 years ago

is this current in trunk, or only in 2.7? if the later, we might as well close as wontfix. else, we might want to move this to the 2.8 milestone.

comment:11 Denis-de-Bernardy5 years ago

  • Milestone changed from 2.7.2 to 2.8

moving to 2.8. close as wontfix or invalid if it no longer applies in there.

comment:12 Denis-de-Bernardy5 years ago

  • Keywords needs-testing added

comment:13 Denis-de-Bernardy5 years ago

  • Milestone changed from 2.8 to 2.9

comment:14 azaozz4 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

Think this is mostly a dupe of #9153

comment:15 lloydbudd4 years ago

  • Milestone 2.9 deleted
Note: See TracTickets for help on using tickets.