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

Deleted media in Media Library still seen in the post or page. #28914

Closed
paaljoachim opened this issue Feb 10, 2021 · 8 comments · Fixed by #35973
Closed

Deleted media in Media Library still seen in the post or page. #28914

paaljoachim opened this issue Feb 10, 2021 · 8 comments · Fixed by #35973
Labels
[Block] Image Affects the Image Block [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed [Type] Enhancement A suggestion for improvement.

Comments

@paaljoachim
Copy link
Contributor

Description

I tested this issue. #11501
The issue itself is not valid any longer, but the point came up that deleting an image from the media library will still show the image in the post or page if it has been used.

When deleting an image (or perhaps audio file) from the Media library it should not still be visible in a post or page, but instead show the Image block placeholder.

Step-by-step reproduction instructions

  1. Add an image to the Media Library.
  2. Go to a post. Add the Image block. Add an image. Publish the post.
  3. Go to the Media Library and delete the image used in the post.
  4. Go back to the post and notice the image is still seen as if it was not deleted.

Expected behaviour

After having deleted the image from the media library
Going back to the post or page the image should not be visible.
There should be a placeholder mentioning that the image has been deleted and that one now needs to replace it with another image.

Actually using the standard placeholder can work:

Screen Shot 2021-02-10 at 12 27 10

Actual behaviour

Deleting the image in the Media Library still shows the image in the post or page.

@mtias
Copy link
Member

mtias commented Feb 23, 2021

Somewhat related to this, we should better handle missing image attributes:

image

@skorasaurus
Copy link
Member

@paaljoachim This heavily overlaps with #23262 ; the difference between this issue and that one is that this issue; the deleted media can be seen by the end user outside of the edit; #23262 the image can still be seen in the block editor.

@paaljoachim
Copy link
Contributor Author

Thanks for mentioning the other issue Will @skorasaurus !
I am not sure if we should close this issue, or perhaps I should just add the duplicate label.

@paaljoachim paaljoachim added the [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed label Sep 23, 2021
@ramonjd
Copy link
Member

ramonjd commented Dec 15, 2021

I think #35973 closes this as well.

@paaljoachim
Copy link
Contributor Author

Thank you @ramonjd Ramon and @glendaviesnz Glen!

@ramonjd
Copy link
Member

ramonjd commented Dec 15, 2021

Just tested on trunk. The placeholder will now appear where an image has been deleted 🎉

@ramonjd
Copy link
Member

ramonjd commented May 23, 2022

#35973 had to be reverted for WordPress 6.0 due to the following issues: #41161

Reopening. New WIP PR:

@ramonjd ramonjd reopened this May 23, 2022
@annezazu annezazu removed the [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed label Jul 28, 2022
@Mamaduka Mamaduka added the [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed label Nov 26, 2024
@Mamaduka
Copy link
Member

Closing this as a duplicate of #23262.

@Mamaduka Mamaduka closed this as not planned Won't fix, can't repro, duplicate, stale Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Image Affects the Image Block [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants