#36483 closed defect (bug) (worksforme)
Inline image replacement in Post Editor does not replace image
Reported by: | Ipstenu | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.5 |
Component: | Editor | Keywords: | |
Focuses: | Cc: |
Description
Tested on 4.5-RC2-37173 with the following steps:
- Make a new post
- Add m08aGa1nAM.png to post as medium image
- Click to REPLACE image
- Click 'Edit Original'
- DELETE from this window
- Upload new m08aGa1nAM.png
At this point, I see the OLD image in the edit page. As soon as I hit 'save draft' however, it shows the correct image.
Tested on WP 4.4.2 and the image replaces as expected, no need to save.
It looks like whatever ajax magic is supposed to refresh that image isn't happening until save.
Attachments (1)
Change History (12)
This ticket was mentioned in Slack in #core by mike. View the logs.
9 years ago
#3
@
9 years ago
Think I'm missing or misunderstanding a step when trying to reproduce.
- DELETE from this window.
I'm in the modal in the image file editor and cannot delete from there. Tried editing the image then deleting it and replacing it, all works as expected.
Another question: if the image is deleted in step 5, and another image with the same name is uploaded, and the old one is shown in the editor, where the old one comes from? At this point it is not on the server any more?
#4
follow-up:
↓ 5
@
9 years ago
I gave the unclear directions
- Click to REPLACE image
- Click 'Edit Original'
So on the post editor, click the pencil and then press the box to replace the image, not edit.
https://cloudup.com/cLAG65T_A3h
- Click to edit the image
- Press REPLACE button
Another question: if the image is deleted in step 5, and another image with the same name is uploaded, and the old one is shown in the editor, where the old one comes from?
The replacement window. Drag/drop the new image with the old image name.
#5
in reply to:
↑ 4
@
9 years ago
Replying to Ipstenu:
Thanks, yeah, can see it now.
A new bug is that the right sidebar (image info and settings) doesn't get refreshed/cleared out after deleting an image. Seems caused by the Backbone update as far as I see.
The image not refreshing after replacing it is tougher. Was able to reproduce in 4.4 too, but less frequently. Seems the browsers "hold onto" the image in the editor despite that it is no longer on the server. Can happen more reliably after deleting an image, no need to replace. Steps:
- Open the media modal, upload an image and insert it in a post.
- Edit the image, and delete it permanently.
- Close the modal by clicking outside or on the top/right close button.
At this point the image is displayed in the editor. After switching to the Text editor and back (i.e. forcing TinyMCE to reload the post content) the image is still displayed, although it is not on the server any more. Only after saving a draft/reloading the page the image will be displayed as missing.
#6
@
8 years ago
- Keywords needs-testing added
- Version changed from trunk to 4.5
A new bug is that the right sidebar (image info and settings) doesn't get refreshed/cleared out after deleting an image. Seems caused by the Backbone update as far as I see.
Moved into #37099.
This ticket was mentioned in Slack in #core by ipstenu. View the logs.
8 years ago
#8
@
6 years ago
- Keywords close reporter-feedback added
I was looking into reproducing this issue today, but I can't seem to reproduce it. @Ipstenu do you happen to remember any details on this one?
I am marking this as a close
candidate, but since a lot of the media modals are reused within the block editor, we should be sure the issue does not still exist and carries over.
Note: Original report here - https://wordpress.org/support/topic/media-file-not-being-replaced-unless-with-another-name