WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#12910 closed defect (bug) (invalid)

Quick Edit on custom post type changes post_type to "post"

Reported by: jazzpdx Owned by:
Milestone: Priority: normal
Severity: major Version: 3.0
Component: Posts, Post Types Keywords: Quick Edit, post_type, Custom Post Type
Focuses: Cc:

Description

Using most recent nightly build of 3.0beta1:

When on the "Edit [post_type]" page (equivalent of "Edit Posts" page for a custom post type), entries that are updated using Quick Edit end up being switched to post_type = 'post'

Steps, assuming that a custom post type is registered as "gig" using the following:

register_post_type('gig', array(
		'label' => __('Gigs'),
		'singular_label' => __('Gig'),
		'public' => true,
		'show_ui' => true,
		'_builtin' => true,
		'_edit_link' => 'post.php?post=%d',
		'capability_type' => 'post',
		'hierarchical' => false,
		'rewrite' => false,
		'query_var' => false,
		'supports' => array('title', 'editor',/* 'custom-fields' */),
		'register_meta_box_cb' => 'gig_callback'
	));

1) Gigs->Edit in the sidebar
2) On the Edit Gigs page, choose Quick Edit for an existing entry
3) Click "Update" -- note that it doesn't matter if any of the quick edit fields have any changed information
4) At this point, the entry still appears on the Edit Gigs page, because the AJAX request won't remove it from the page
5) Reload Edit Gigs page -- the entry is missing and now appears on the Edit Posts screen along with the others of post_type = 'post' -- does not retain it's property of post_type = 'gig'

Particularly ugly problem because there's no way in the GUI to change the post type, leaving most users in the dust without a way to programmaticly change the post type back.

Apologies if this is a repeat -- a cursory search of the tickets didn't turn anything up besides ticket #12869

Thanks

Change History (4)

comment:1 jazzpdx4 years ago

  • Component changed from General to Post Types

comment:2 nacin4 years ago

I can't reproduce this on trunk.

comment:3 jazzpdx4 years ago

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

Turns out it was a plugin collision with Custom Field Template. My apologies - marked as invalid

comment:4 nacin4 years ago

  • Milestone Unassigned deleted

Also, _builtin and _edit_link are internal use only and should not be used in plugins. Gigs is not built in into WordPress.

Note: See TracTickets for help on using tickets.