Image not replaced when using object cache
-
Hi,
Enable Media Replace doesn’t replace images in content when using an object cache plugin. Media replacement succeeds, but the media isn’t updated in content. Instead, the original image disappears (404) and nothing is shown.Before replacing the media :

After replacing :

Step to reproduce :
- Install an Object cache plugin (see list below)
- In the plugin settings, activate Object cache
- Upload a media to the media library
- Add the media to a sample page and publish it
- With EMR, replace the media using these settings :
- Replace the file, use the new file name, and update all links
- Replace the date with the current date
- From the front end, access the sample page and add
?nocacheto the end of the URL - Open the browser devtools “Network” tab, disable cache and reload the page
- The original media is gone, and the replaced version doesn’t show
This issue has been tested with an blank, up-to-date WordPress installation, and only Enable Media Replace (4.1.7) and an Object cache plugin installed.
It was successfully reproduced with the following plugins :
- APCu Manager (4.3.0)
- atec Cache Info (1.8.31)
- Docket Cache (24.07.05)
- SQLIte Object cache (1.6)
- Redis Object Cache (2.7)
Issue occurred both on LiteSpeed and Apache servers, hosted by four different hosting companies. So I do think that the problem lies on Enable Media Replace side.
Disabling Object cache or removing the cache plugin solves the issue.
You must be logged in to reply to this topic.