Ticket #8683 (closed defect (bug): duplicate)

Opened 3 years ago

Last modified 2 years ago

exclude_tree in wp_list_pages not working consistently

Reported by: jayp Owned by: anonymous
Priority: normal Milestone:
Component: Template Version: 2.7
Severity: normal Keywords: has-patch needs-testing reporter-feedback
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

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

Change History

comment:1   jayp3 years ago

  • Milestone changed from 2.8 to 2.7.1

Does the patch on ticket:9153 fix this problem?

I think this one is actually related to #9580

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

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).

seee #9153 (for wp 2.8)

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.

hakre3 years ago

  • Keywords has-patch added; needs-patch removed

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

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.

  • 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.

  • Keywords needs-testing added
  • Milestone changed from 2.8 to 2.9
  • Status changed from new to closed
  • Resolution set to duplicate

Think this is mostly a dupe of #9153

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