#6820 closed enhancement (fixed)
Make it possible to manually detach/attach post images
Reported by: | matt | Owned by: | matt |
---|---|---|---|
Milestone: | 4.2 | Priority: | low |
Severity: | minor | Version: | |
Component: | Media | Keywords: | has-patch dev-feedback 4.2-beta |
Focuses: | ui | Cc: |
Description
You should be able to change the parent of an attachment to attach it to a different post.
Attachments (9)
Change History (56)
#2
@
16 years ago
- Keywords 2nd-opinion added
- Priority changed from normal to low
- Severity changed from normal to minor
#4
@
16 years ago
In particular: http://core.trac.wordpress.org/ticket/8888#comment:4
#20
@
10 years ago
- Summary changed from Post image / attachment reparenting to Make it possible to manually detach/attach post images
#24
@
10 years ago
- Keywords needs-refresh added
6820.2.diff needs a refresh, and it sounds like a treatment for bulk actions per comment:23. Screenshots would be nice too.
#26
@
10 years ago
- Keywords needs-docs added; needs-refresh removed
wp_media_attach_action()
parameter docs are incomplete.
#27
@
10 years ago
Looking forward to the day when users don't ever see the terms attach or detach. This whole thing is a hack around the lack of API for getting images from content.
@
10 years ago
iPhone 5 screenshot, for the record. The "Uploaded to" column doesn't show on mobile.
#29
follow-up:
↓ 31
@
10 years ago
- Keywords dev-feedback 4.2-beta added
@ryan: What would be your recommendation on the "Uploaded To" column on mobile? Should it actually show? Seems like adding a fourth column would make that even more unnecessarily scrunched.
#30
@
10 years ago
Would it be helpful to show them on very small devices like this ?
- Image bigger and centered above.
- Other columns as display:block beneath centered image.
Scrolling with Smartphones goes very fast and easy, so height would not make such difference and problems.
Problem is header would be repeated for each item. If this could be solved in some way. Image doesnt need header title, it is self explanatory.
#31
in reply to:
↑ 29
;
follow-up:
↓ 33
@
10 years ago
Replying to DrewAPicture:
@ryan: What would be your recommendation on the "Uploaded To" column on mobile? Should it actually show? Seems like adding a fourth column would make that even more unnecessarily scrunched.
I think list tables on mobile should be one column. We should decide what needs to be exposed on mobile and make some editorial decisions. Related: #29993. And #29991, #29992, #29994, #29995.
Failing that, I'd leave Uploaded To hidden and keep attach/detach off of mobile. The attach modal likely needs work on mobile, and since detach has no confirmation I will almost certainly accidentally tap it while scrolling.
Someday, let's discuss how to kill the notion of attached and detached. I end up with unattached images all the time because I often share straight to the media lib from mobile and later blog from desktop (making galleries on mobile is difficult). Images uploaded to the media lib don't get attached to posts when they are later published. This messes up filtering down to images uploaded to the post and messes up reader plugins (which are still reliant on attached status and featured images and don't have API for getting all images in content). Instead of making users manually attach images, we should pursue attachment independence further. Galleries no longer depend on attached status. Let's finish the job.
#33
in reply to:
↑ 31
@
10 years ago
Replying to ryan:
since detach has no confirmation
We should probably do something about that in the meantime.
This ticket was mentioned in Slack in #core by drew. View the logs.
10 years ago
#35
follow-ups:
↓ 36
↓ 37
@
10 years ago
Someday, let's discuss how to kill the notion of attached and detached. I end up with unattached images all the time because I often share straight to the media lib from mobile and later blog from desktop (making galleries on mobile is difficult). Images uploaded to the media lib don't get attached to posts when they are later published. This messes up filtering down to images uploaded to the post and messes up reader plugins (which are still reliant on attached status and featured images and don't have API for getting all images in content). Instead of making users manually attach images, we should pursue attachment independence further. Galleries no longer depend on attached status. Let's finish the job.
I admit that when I saw this ticket pop up, that was my first thought — why do we even have attached/detached? I'm honestly barely even sure I understand what it really means. Is it still used for anything? I'm sure the vast majority of users don't know and don't care — they just want to add and remove images from their post content. Attach/detach feels like an irrelevant concept in today's WordPress.
#36
in reply to:
↑ 35
@
10 years ago
Replying to melchoyce:
I admit that when I saw this ticket pop up, that was my first thought — why do we even have attached/detached? I'm honestly barely even sure I understand what it really means. Is it still used for anything? I'm sure the vast majority of users don't know and don't care — they just want to add and remove images from their post content. Attach/detach feels like an irrelevant concept in today's WordPress.
I agree, as far as core, but I think it's likely that numerous plugins leverage these relations quite a bit. The real problem, in my opinion, isn't the idea that media can be attached to a post, it's that it can only be attached to a single post (it uses post parent). It really becomes the classic post-to-post relation issue though, which we don't solve for other post types, so maybe we shouldn't try to solve it for media either?
#37
in reply to:
↑ 35
;
follow-up:
↓ 38
@
10 years ago
Replying to melchoyce:
why do we even have attached/detached? I'm honestly barely even sure I understand what it really means. Is it still used for anything? I'm sure the vast majority of users don't know and don't care
That comes from a developer's point of view, giving how attached media are stored in the DB and then fetched, especially how media meta data are fetched. Of course this doesn't make any sense from a user's perspective, as you pointed out, users just want to add and remove images.
Maybe time to consider a DB schema upgrade? After all, media inside a post are content and maybe media IDs should be stored in the post itself.
#38
in reply to:
↑ 37
;
follow-up:
↓ 42
@
10 years ago
Replying to afercia:
Maybe time to consider a DB schema upgrade?
Congratulations, you have arrived at #14513. You should now consider yourself a seasoned WordPress core contributor (if you don't already). :)
I am actually rather inclined to revert this and leave it to existing plugins. If somebody's site relies on attach/detach functionality today, that is completely understandable, but I don't think we should go back to emphasizing these under-the-hood concepts by default.
#39
@
10 years ago
I should note that it may be okay to leave in the list table (adding an AYS), though, since it has the column and attachment modal and I don't see us killing that off since it's almost like a legacy mode right now. The Backbone-ified version doesn't show anything if it's not attached to something, though, so I'd rather not start showing "Detach" there.
This ticket was mentioned in Slack in #core by drew. View the logs.
10 years ago
#41
@
10 years ago
I have used (and created) many plugins that rely on the attachment -> post as parent relationship so until such time as #14513 becomes a possibility I think we have to keep this functionality.
However, I would agree with @helen that we don't need to "emphasise these under-the-hood concepts" by default.
There are quite a few plugins that add attach/detach functionality and UI, and I'm not sure that this needs to be added to core until the future of a post relationship schema is more certain?
#42
in reply to:
↑ 38
@
10 years ago
Replying to helen:
I am actually rather inclined to revert this and leave it to existing plugins. If somebody's site relies on attach/detach functionality today, that is completely understandable, but I don't think we should go back to emphasizing these under-the-hood concepts by default.
I agree that a revert is the best option at this stage.
#44
@
10 years ago
I semi-agree with the JS parts, but not with reverting "detach" in general. I agree Attach/Detach is lame, but if you are going to have Attach in the list table, there should be Detach.
When you upload an image using the media modal on the Post screen, and then decide to not use that image in the post, you are still stuck with this relationship which affects the attachment forever. Namely, its URL.
http://woo.com/2015/03/17/drew-jaynes/unrelated-media-that-i-didnt-attach/
Having the Detach link allows the Drew Jaynes related portion the URL to go in the dumpster, and this strange post relationship to disappear. If indeed you are using something like [gallery]
, you might expect these URLs to operate this way.
Isn't this done automatically when an attachment has no parent?
Also, wouldn't it be more reliable to duplicate the attachment, with a new parent, when it gets inserted in a separate post?