[wp-trac] [WordPress Trac] #22085: Correctly assign post_parent to uploaded attachments in the new media modal
WordPress Trac
noreply at wordpress.org
Wed Oct 17 13:45:35 UTC 2012
#22085: Correctly assign post_parent to uploaded attachments in the new media modal
--------------------------+--------------------
Reporter: koopersmith | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.5
Component: Media | Version: trunk
Severity: normal | Resolution:
Keywords: |
--------------------------+--------------------
Comment (by helenyhou):
Replying to [comment:1 mdgl]:
> Sorry I need to do a bit of "thinking out loud" here and I may have more
to say on this later, but my first reaction to this is to ask "why would
we want to assign post_parent to uploaded attachments"?
>
> Granted there are backwards-compatibility issues but I thought that in
3.5 we were trying to do a thorough overall of media handling? Scribu for
example hints (comment:ticket:21776:22) that we are trying to "de-
emphasize" the post_parent field for attachments.
De-emphasizing doesn't mean outright removing the relationship. It is not
uncommon for a site to be developed using the attachment-post_parent
relationship to power certain functionality. The assignment already
happens on upload or insertion of a previously-unattached attachment, so
this is about maintaining the current behavior. To suddenly stop doing
this would be more than an issue - more along the lines of at least a
serious headache, if not a nightmare or disaster, for developers and users
alike.
3.5 isn't about a thorough overhaul of media handling. It's about re-
thinking and re-doing the workflows and thus interfaces and related code
for the selection and insertion of media and galleries. The gallery
shortcode takes a comma separated list of IDs for attachments that is
independent of the attachment/parent relationship. What we are getting,
among other things, for this release is what you can think of as a real UI
for creating that shortcode and attribute, since you can't possibly expect
an end-user (even a savvy one) to go through and find IDs for all the
attachments they want. This ability to decouple the gallery shortcode in a
functional way from that attachment model is the de-emphasis. See #21390,
#21815, #21809, and probably others.
> But why stop at just image attachments? Why shouldn't I be able to
attach any number of posts/pages or other objects to another post?
Why can't you now? You can assign as many objects to a given parent as you
want, without any need for them to be of the same post type (there's just
not necessarily the right UI built in for it because it's not common), and
there's the lovely [http://wordpress.org/extend/plugins/posts-to-posts/
Posts 2 Posts] for many-to-many relationships that, if not built into
core, does what you need.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22085#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list