[wp-testers] Custom post type changes on updating post title
goldenapplesdesign at gmail.com
Mon May 17 22:19:17 UTC 2010
No, thats not the issue I'm having. From what I understand, that message can
be overridden by setting arguments to the $labels variable when registering
the post type.
I'm using two custom post types on my site: Videos (non-hierarchical), and
Agents/Locations (hierarchical). The basic arguments passed to register them
register_post_type( videos', array( 'label'=>'Videos', 'public'=>true,
'show_ui'=>true ) );
register_post_type( 'agents-locations', array( 'label'=>'Agents',
'public'=>true, 'show_ui'=>true, 'hierarchical'=>true,
'supports'=>array('title','editor','page-attributes', 'custom-fields') ) );
For both types, adding a new post through the "Add new" UI screen works
fine. Editing the content and meta fields and updating the posts also
behaves as expected.
The problem was, I wanted to recategorize some of my existing content into
these new custom post types. I did this through phpmyadmin, changing the
post-type field on these entries. Now they show up in the right place, and
function as the proper post types. The only problem arises when changing
either the post title or slug on one of these posts and updating - this
cause the post type to be reset to "post" or "page".
I've created a new trac ticket at
> From: "Nathaniel Taintor" <goldenapplesdesign at gmail.com>
> > I'm running the latest nightly build (WordPress 3.0-beta2-14697) and I
> > noticed an issue when updating the post title on posts using a custom
> > post type. On changing the title and clicking "update", the post is
> > saved with the default setting for "post-type". If the custom posts
> > type was registered with "hierarchical"->true, the post will be
> > updated as "page"; otherwise it will be updated as "post". Any ideas
> > why this is happening?
> I'm not seeing the problem, though when saving a custom post type article
> (in my case Book) it does present the message:
> " Post updated. View post "
> But the article is ultimately still a Book.
> If that's what you are seeing you might want to reopen and report on this
> or open a new ticket at trac.
More information about the wp-testers