WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#12643 closed defect (bug) (fixed)

Can't build hierarchy of hierarchical custom post types

Reported by: sillybean Owned by:
Milestone: 3.0 Priority: normal
Severity: normal Version: 3.0
Component: Posts, Post Types Keywords:
Focuses: Cc:

Description

You can't actually create a hierarchy of hierarchical custom post types, because when 'page-attributes' is supported, pages are shown in the parent dropdown no matter what content type you're looking at. Get_pages() supports hierarchical content types now (see #12600), so this should be possible.

Also, the quick edit feature doesn't work at all for hierarchical types, so there's no way to choose a parent there.

(Related to #9674.)

Change History (13)

comment:1 @sillybean5 years ago

  • Cc steph@… added

comment:2 @dd325 years ago

The Rewrite rules for custom post_types do not support hierachial querying either.

comment:3 @dd325 years ago

  • Milestone changed from Unassigned to 3.0

comment:4 @dd325 years ago

The Rewrite rules for custom post_types do not support hierachial querying either.

I've got a patch in the works for this, After that, I'll look into the UI side of things to see what needs to be updated there.

comment:5 @dd325 years ago

(In [13774]) Add hierarchical support for custom post_types in Rewrite Rules & Querying. See #12643

comment:6 @dd325 years ago

(In [13778]) Add parent selection support for custom post_types to the Page Attributes metabox. See #12643

comment:7 @automattor5 years ago

(In [13779]) Fix Quick edit for non-page Hierarchical post_types. See #12643

comment:8 @dd325 years ago

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

That covers all the reported issues here i believe, re-open if one was missed.

In the future, it'd be appreciated if you can separate out issues when reporting (Parent selection not possible vs. Quick Edit being broken)

comment:9 @sillybean5 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Working beautifully. I found one tiny UI bug. In Safari, using quick edit, the template dropdown appears with a blank default choice. When you pull it down, Default Template is the first option and there is no blank one, but for some reason Default is not showing until you choose it explicitly.

comment:10 @dd325 years ago

In Safari, using quick edit, the template dropdown appears with a blank default choice.

Can you test that on the other pages? (For example, Edit Pages)

That might be best off reported in another ticket if it affects other edits as well.

comment:11 @sillybean5 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

Quite right, it does affect pages as well. Opened as #12653; closing this one. Thanks!

comment:12 @aaroncampbell5 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

I recently upgraded to the latest nightly (I was about 10 days behind), and [13744] seems to be causing a warning for me. Specifically this error:

Warning: Illegal offset type in isset or empty in /var/www/vhosts/xavisys.com/httpdocs/clients/gfa/wp-includes/query.php on line 1715

comment:13 @dd325 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

Specifically this error:

See #12704

Note: See TracTickets for help on using tickets.