-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Temporarily broken images silently empties Image Block attributes #41161
Comments
An explicit error message was added here to at least alert the user to the reason why the Image block reverted to the placeholder. The adding of this was related to instances where images had been permanently deleted, but maybe due to the case of the temporary connection errors you note the removing of the image details from the block needs to be revisited. |
To build on this, one implication is that a user can "lose" images from their post if: 1) they edit a post with lots of images, 2) a few images fail to load for some temporary reason, 3) they save their post (thinking they're only applying the changes they made, but also saving the removal of the images). |
Can we instead of removing entirely the image, show a meaningful UI suggesting either reloading or removing? @ramonjd @glendaviesnz should we consider reverting #35973 temporarily in 6.0 until we figure out a better approach? |
I tried using the revert button but it didn't work. Still, it's probably the best way to move forward given that today is the last RC planned for WordPress 6.0. |
Reverted in the wp/6.0 branch in 6446878 |
Let's work on a proper fix targeting WordPress 6.0.1. |
Another option to consider (although I don't have a strong opinion it's a better one): if an image doesn't load, This approach would achieve the intent of the original issue, and avoid the complexity of additional UI.
So that I can set the correct expectations with the impacted customer, when do you think this change will be released in the Gutenberg plugin? Huge thanks to @eriktorsner for the detailed initial report! That was 💯 🥇 . |
It is hard to reason about time estimates in an open-source project. As @gziolo mentioned, the idea is to fix this in WordPress 6.0.1 so probably no later than 6.0.1 is released. But when is that exactly? It's hard to tell, I don't think there's any fixed schedule for minor versions. |
We removed that from WordPress 6.0. Should we also remove it from the Gutenberg plugin until the issue gets fixed or do you think the fix won't take long? |
Thanks for catching this bug, and also for patching WordPress 6.0
I agree that we should remove the change from Gutenberg until we can fix the issue. I'll revert the change so we can at least have parity, and will also take a look to see if there's an obvious way to improve the previous attempt. Thanks a lot, folks! |
Hi folks! Gutenberg revert PR Moving a new investigation to a new PR Thanks again for the excellent bug report and quick handling. |
Thanks for your work, @ramonjd ! |
I have an alternative approach ready over at #41220 |
Description
In PR #35973 an error handler
onImageError()
was introduced in the Image Block with the intention to handle when images are removed from the Media Library. If the image is removed, the Image Block gets its id and URL attributes cleared out.However, this behavior is also triggered when a local or remote image is just temporarily unavailable for any reason. For many users, this will be unwanted behavior.
There are many situations where an image can be unavailable for a short period of time without meaning that the image is broken forever and should be removed.
For remote images:
For local images there are a few potential reasons as well:
Imagine a situation where a webmaster of a media-heavy site notes that the CDN is currently broken and then decides to edit the front page on the site to inform users of the problem. Well, now they have two problems.
Step-by-step reproduction instructions
On WordPress 6.0-RC2 (or any version of Gutenberg with the 35973 PR in place)
https://s.w.org/images/home/screen-themes.png
127.0.0.1 s.w.org
to /etc/hostsScreenshots, screen recording, code snippet
No response
Environment info
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: