#8721 closed defect (bug) (fixed)
attach logic is overenthusiastic: inserting a single item from Media Library sets post_parent of every item listed in Add Media overlay
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 2.7.1 | Priority: | normal |
Severity: | normal | Version: | 2.7 |
Component: | Media | Keywords: | |
Focuses: | Cc: |
Description
I am getting spurious Attached to settings when inserting Media Library items into a post.
How to reproduce:
Add a bunch of files to the Media Library . (I added a bunch of existing pdf files using the Add From Server plugin.) All are inserted into table wp_posts with post_parent=0, so they are unattached.
Create a new post, and click on the Add Media icon, which brings up the Add Media overlay.
Choose the Media Library tab, which shows the first 10 items in the Media Library. Click on Show for one of these: the entry expands. Edit the Title slightly (may not be necessary), and then click on Insert into Post.
The Add Media overlay goes away. Finish editing the post and publish it.
Now browse the Media Library. You will discover that the Attach To column shows that all ten of the items mentioned above are listed as attachments of the post you just created. The post_parent for all ten items shown in the Media Library list has been set to the id of that post, even though you only inserted one item from the list of ten.
So the attach logic mistakenly thinks everything in that Media Library list should be attached, instead of just the inserted item.
Change History (9)
#3
@
16 years ago
I've seen this too.
- upload a tonne of files which are not attached to a post
- Open a post, Insert one of the images
- Close insert image dialogue
- open image dialogue again, notice a heap of images in the gallery
#4
in reply to:
↑ 2
@
16 years ago
Replying to Denis-de-Bernardy:
are you sure you don't have a plugin active or something? It seems to be working fine on my end in the latest 2.7 branch
The only plugin installed was "Add From Server".
When you say "latest 2.7 branch" , do you mean the publicly available 2.7 download (what I am using), or the latest 2.7 from SVN (which I thought would be no different from the former)?
are you sure you don't have a plugin active or something? It seems to be working fine on my end in the latest 2.7 branch