• On May 14, 2019 I replaced 2 images with updated versions. I did not change the image name or update links. Just a simple replace. I “think” I generated new thumbnails because WP was hanging on to some specific sizes but I can’t be 100% sure as I can’t remember. Shortly after that I started to get these weird 404 errors on our site. I finally nailed down the pattern. If I have a link in the content anywhere that follows the path of “/wp-content/uploads/2015/02/MediaFilename.xxx” that it gets replaced with “/wp-content/uploads/2015/02/UpdatedImage-125×157.jpgUpdatedImage-125×157.jpgMediaFilename.xxx” The 2 images I updated were .jpg. The files that are getting the broken URLs are any type of media (.jpg, .png, .pdf). The item that they all have in common is the UpdatedImage.jpg lived in the /2015/02/ folder and the broken links all contain the /2015/02/ path. I have hundreds of links to fix. Can you advise as to what happened so that I do not have this issue again?

Viewing 6 replies - 16 through 21 (of 21 total)
  • I see a pattern here. We also use Jupiter with WP Bakery Page Builder, just like @slaydone and @ajumbra.

    Unfortunately we still don’t have a staging environment for you to access. Is there any other way we can help you locate the bug?

    Plugin Author ShortPixel

    (@shortpixel)

    Hello @bljh @slaydone @ajumbra – we figured out an issue related to Beaver Builder not sure
    Not sure this helps in your specific case but here’s a DEV version of EMR plugin if you want to run some tests.

    I’d appreciate your follow-up on this,
    Alex

    Plugin Author ShortPixel

    (@shortpixel)

    @slaydone @ajumbra @bljh – I think I’ve found the problem, we have dealed with this in the past at another plugin: in some rare cases the metadata stores the thumbnail name as the first element of an an array (size[‘file’][0]). If this was your case too, the plugin took an empty name for the old thumbnail name and everything starting with /wp-content/uploads/2016/09/ with /wp-content/uploads/2016/09/name-of-new-thumbnail-000×000.jpg.
    Would you mind testing it from the dev version, to see if this was the problem and if it fixes in your case? https://shortpixel.com/downloads/enable-media-replace-3.3.2-DEV06.zip

    • This reply was modified 5 years, 8 months ago by ShortPixel.
    Thread Starter slaydone

    (@slaydone)

    @shortpixel @ajumbra @bljh I had updated to 3.3.1 this morning and tested it and it seemed to be working well. I just went to the 3.3.2 version and it is definitely busted. I updated one image and got 92 incidences of insertion into the database with the resulting insertion of: /wp-content/uploads/2019/02/Name-of-replaced-image-125×157.jpgName-of-replaced-image-125×157.jpgName-of-correct-image.jpg

    I’m going to go back to version 3.3.1 and see if it will work for me after I fix the 92 insertions.

    Plugin Author ShortPixel

    (@shortpixel)

    @slaydone sorry for that ?? Must be a different problem then. Did you make the tests (with 3.3.1 and 3.3.2) on the same media item?

    The fact that the replaced image appears doubled (/Name-of-replaced-image-125×157.jpgName-of-replaced-image-125×157.jpgName-of-correct-image.jpg) could be caused by two replaces but it sill indicates that somehow it takes the ‘file’ field from the thumbnail as empty so it searches for /wp-content/uploads/2015/02/ (instead of /wp-content/uploads/2015/02/Name-of-original-image.jpg) and it replaces it with /wp-content/uploads/2015/02/Name-of-replaced-image-125×157.jpg

    Would it be possible to send us a dump of the metadata records of that particular image you tried to replace? If so, please use [email protected] mentioning this topic.

    • This reply was modified 5 years, 8 months ago by ShortPixel.
    • This reply was modified 5 years, 8 months ago by ShortPixel.
    Plugin Author ShortPixel

    (@shortpixel)

    I noticed there could be another case that could fail in the same way so I added the check there too. @slaydone if you can’t provide the dump and it’s not too much to ask, could you please do the test with this version here: https://shortpixel.com/downloads/enable-media-replace-3.3.2-DEV07.zip ?
    We tried but we can’t reproduce on our test environments (except for the case I was mentioning).

Viewing 6 replies - 16 through 21 (of 21 total)
  • The topic ‘Replacing an image resulted in tons of broken media links’ is closed to new replies.