[wp-trac] [WordPress Trac] #11424: Loops can develop in the post_parent hierarchy
WordPress Trac
wp-trac at lists.automattic.com
Thu Dec 24 22:08:26 UTC 2009
#11424: Loops can develop in the post_parent hierarchy
--------------------------+-------------------------------------------------
Reporter: mdawaffe | Owner: westi
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 3.0
Component: General | Version: 2.9
Severity: normal | Keywords: has-patch needs-testing
--------------------------+-------------------------------------------------
Comment(by hakre):
'''Patch file is broken.'''
----
In ''wp_insert_post()'' there are done some validation checks on post_ID
and post_parent. Setting the post's parent to the post itself (Post can't
be its own parent) and the parent post post's parent (grandparent) to the
the post itself (Check for circular dependency).
Both checks are only half-way implemented because they only work in case
that a post is updated and not for creation.
So technically you can create posts will loose their parent on the next
update (parent set to 0 on update).
Looks like a concept is missing on post_parent. On a new blog you can
create A Post that will have the parent to it's own if you know the next
post_ID which is not that hard to guess.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11424#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list