[wp-trac] [WordPress Trac] #13179: Saving a custom post type with post_parent resets to zero
WordPress Trac
wp-trac at lists.automattic.com
Tue Jun 15 04:54:28 UTC 2010
#13179: Saving a custom post type with post_parent resets to zero
--------------------------+-------------------------------------------------
Reporter: mikeschinkel | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Unassigned
Component: Post Types | Version: 3.0
Severity: normal | Keywords: has-patch dev-feedback
--------------------------+-------------------------------------------------
Changes (by mikeschinkel):
* cc: mikeschinkel@… (added)
* keywords: => has-patch dev-feedback
Comment:
I've added a patch that simply includes a single <input> for $parent_id
that allows the post parent to be maintained.
Not sure if there will cause side effects elsewhere; any reason why parent
was not already included in the form? There is code in edit_post() within
/wp-admin/includes/post.php that has the comment "Reunite any orphaned
attachments with their parent" but it seems that the code is just related
to auto-drafts (but I'm not sure of this.)
BTW, _wp_translate_postdata() in /wp-admin/includes/post.php captures the
$_POST value of 'parent_id' and translates it to 'post_parent' so I had to
use 'parent_id' instead of the more standard 'post_parent.' Anyone know
why it was done this way?
As I think this is effectively a bug I am hoping it can make it into 3.0.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13179#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list