Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gutenberg: Attachment in WP-Admin Media Library mistakenly shows as (Unattached) #28325

Closed
keithlocka8c opened this issue Oct 30, 2018 · 4 comments

Comments

@keithlocka8c
Copy link

When viewing a list of images in the WP-Admin Media Library, an image will show as "(Unattached)", when it may very well be attached to a post created with Gutenberg.

This isn't always the case however: It remains as "(Unattached)" on Guten-posts when the image is used as a Featured Image, or in a image-type block. It does however show as "attached" when added to a Classic Editor block.

(Side note: and as has happened since the early days, when the image is removed from the Classic Editor block, we must manually "Detach" it from the Media Library. It doesn't magically unattach.)

Steps to reproduce the behavior:

  1. Go to Media Library in WP-Amin.
  2. Upload an image, make note that it is Unattached.
  3. Create a new Guten-post, and choose that image as the Featured Image, or add to any other Image-type block.
  4. Refresh the WP-Admin Media Library, see that it still shows as Unattached.
  5. Go back to the post and add the image in the Classic Editor block.
  6. Refresh the WP-Admin Media Library, see that only now it shows as Attached.
@arunsathiya
Copy link
Contributor

Noting that I am able to reproduce this on core Gutenberg install as well. It can be reported on https://github.com/WordPress/gutenberg/issues instead.

This isn't always the case however: It remains as "(Unattached)" on Guten-posts when the image is used as a Featured Image, or in a image-type block. It does however show as "attached" when added to a Classic Editor block.

screenshot 2018-11-01 at 14 19 30
screenshot 2018-11-01 at 14 19 37
screenshot 2018-11-01 at 14 19 41

(Side note: and as has happened since the early days, when the image is removed from the Classic Editor block, we must manually "Detach" it from the Media Library. It doesn't magically unattach.)

From my testing, this is the case on classic editor as well. @keithlocka8c Is the image on media library being automatically detached when you remove the image from a post composed originally with classic editor?

screenshot 2018-11-01 at 14 22 09
screenshot 2018-11-01 at 14 22 12
screenshot 2018-11-01 at 14 22 23
screenshot 2018-11-01 at 14 22 30

I had to detach it manually at the end.

screenshot 2018-11-01 at 14 27 06

@mkaz mkaz transferred this issue from another repository Nov 6, 2018
@mkaz mkaz changed the title Attachment in WP-Admin Media Library mistakenly shows as (Unattached) Gutenberg: Attachment in WP-Admin Media Library mistakenly shows as (Unattached) Nov 6, 2018
@lancewillett
Copy link
Contributor

As noted this happens in Classic Editor as well. Closing for now. Let's raise in core Gutenberg or core WordPress Trac if it still needs attention.

@marcuswisecaesar
Copy link

This issue was raised in a ticket 2595553-zd and the user is asking that we make note of the issue with being unable to determine which images are actively in use on a site and which are not.

@kriskarkoski
Copy link
Contributor

Closing as this is being worked on through this issue on the core side: WordPress/gutenberg#12753

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants