[wp-trac] [WordPress Trac] #13428: "Post Type" field reverts to default on custom post types on updating post title

WordPress Trac wp-trac at lists.automattic.com
Tue May 18 18:52:59 UTC 2010


#13428: "Post Type" field reverts to default on custom post types on updating post
title
--------------------------+-------------------------------------------------
 Reporter:  goldenapples  |       Owner:                   
     Type:  defect (bug)  |      Status:  new              
 Priority:  low           |   Milestone:  Unassigned       
Component:  Post Types    |     Version:  3.0              
 Severity:  normal        |    Keywords:  reporter-feedback
--------------------------+-------------------------------------------------

Comment(by goldenapples):

 Yes, here's how I was able to reproduce the problem:

 - Took an existing WP2.9.2 working site with existing posts and pages.
 - Upgraded to WordPress 3.0-beta2-14697.
 - Added two new custom post types through the theme functions.php file:

 {{{
 function add_custom_post_types() {
         // Post type for video posts on home page
         register_post_type( 'solutions-videos',
                                            array( 'label'=>'Videos',
 'public'=>true, 'show_ui'=>true ) );
         register_taxonomy_for_object_type('post_tag', 'solutions-videos');
         // Post type for agent listings and offices
         register_post_type( 'agents-locations',
                                            array( 'label'=>'Agents',
 'public'=>true, 'show_ui'=>true, 'hierarchical'=>true,
 'supports'=>array('title','editor','page-attributes', 'custom-fields') )
 );
 }

 add_action ('init','add_custom_post_types');
 }}}

 - Next, I changed some of my existing pages to 'agents-locations' and some
 of my existing posts to 'solutions-videos' through phpmyadmin. I edited
 the entry for each of the posts I wanted to recategorize, changing only
 the 'post-type' field to the correct slug ('solutions-videos' or 'agents-
 locations').
 - Finally, I edited the newly custom-typed posts through the Videos ->
 Edit submenu page. Editing content, meta fields, or attributes all work as
 expected. However, changing the title or the slug and updating changes the
 'post-type' field in the database back to the original.

 Hope this was clear enough. Server environment was PHP 5.2.4, Apache
 2.2.15, on Linux CentOS.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/13428#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list