Support » Plugin: File Renaming on Upload » Renaming breaks images on older posts

  • Resolved thequasar

    (@thequasar)


    I’m using the pro version and having quite a bit of trouble when trying to get these options to properly work when updating previously created posts:

    • “Update permalink”
    • “Update media on post update”

      Here’s the scenario:

    1. Enter a previously created post.
    2. Update the post to trigger rename on existing images in the post.
    3. Permalinks for the source images are now changed but, all the images in the post itself are now broken since they all kept their old URL.

      Is this how it is intended to function?

      That would in other words suggest that I’d have to re-insert every image for every old post that I update?

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Pablo Pacheco

    (@karzin)

    Hello @thequasar ,

    I’m not sure if the problem is related to permalinks or the image src, so I’ve created some new options for you.

    Please try to update the pro plugin to version 1.2.1 and enable these options:

    – Update filename reference in post content
    – Update permalink reference in post content

    Let me know if it helps 😉

    Thread Starter thequasar

    (@thequasar)

    Hi Pablo, thank you for taking the time to add new options in order to try addressing the issue!

    Unfortunately, I’m still having the same issue. To clarify, it’s the src in the post that doesn’t seem to update to the new image permalink, thus referencing to a broken link.

    The way I tested it this time was just slightly different from the previous scenario, but it basically the same process:

    1. Create a new post. No title set.
    2. Upload a new image and add it to the post.
    3. Save post as draft. (was testing on live environment so I couldn’t publish anything)
    4. Edit the post again by updating/giving it a title “Testing123”.
    5. Save post as draft.
    6. The image in the post has not been updated and thus displaying a broken image.
    7. The source image file has however updated its permalink, so the only way to display it now is to re-insert it to the post every time I update the post title.

    Additionally, I also make sure to ctrl+shift+r and set my developer tools on Chrome to “Disable cache”. Otherwise, if I don’t, it looks like the image is still displaying normally due to cached files.

    Please see the screenshots for references, and if I possibly might have combined the wrong options?
    https://i.imgur.com/RDmVUqX.png
    https://i.imgur.com/yE2TeEk.png

    Appreciate your help on this!

    • This reply was modified 7 months ago by thequasar.
    • This reply was modified 7 months ago by thequasar. Reason: Clarification
    • This reply was modified 7 months ago by thequasar.
    Plugin Author Pablo Pacheco

    (@karzin)

    Hi,

    I can’t reproduce the problem. When my post gets updated, the image src and permalink also get updated and the reference on post content also gets refreshed.

    It seems that your problem is not the permalink, but the image src.
    When you’re trying to insert an image and the src attribute is wrong it doesn’t get displayed, like the screenshot you sent. The permalink is for links.

    1. How are you uploading the image? Probably using the Gutenberg image block, right? Please try to enable the option:
    – Gutenberg title fix
    And let me know if it helps

    2. Also, please try to make the same test but using a product instead of a post, in case you’re using WooCommerce.

    Plugin Author Pablo Pacheco

    (@karzin)

    Another possibility I’m thinking now.

    On the settings screenshot you sent me, you’ve checked the 2 “Update permalink” options, but actually you should enable the 2 “Update media reference” options.

    Let me know if it helps

    Thread Starter thequasar

    (@thequasar)

    Hi Pablo,

    Yes, the src is indeed the culprit here! I was naive and previously used “permalink” interchangeably. I’m also not using Gutenberg or Woocommerce, just regular old posts via classic editor.

    I tried out the suggested settings, but I wasn’t sure if you wanted me to disable both “Update permalink” options, so I tried all of the combinations while always keeping both “Update media references” checked. Unfortunately, the issue still remains.

    I did two screen captures on my local environment running WP 5.6. While I did have some plugins active in the video, I went “off-camera” afterward and did the exact same process but this time without any plugins active.

    Each video is about 1-2 minutes long, I tried to make it as short as possible without cutting. Hope this clarifies if anything was unclear before.

    Plugin Author Pablo Pacheco

    (@karzin)

    Humm,

    I think I found out the problem. I’m replacing only the full image src. I also have to replace all of the thumbnail sizes references as well.

    Let me fix it. When I get it done I let you know

    Plugin Author Pablo Pacheco

    (@karzin)

    Hi @thequasar ,

    Please update the plugin again to version 1.2.3 and try again.
    I think I was able to fix the problem. Now the thumbnail sizes are being replaced as well

    Let me know if it works this time 😉

    Thread Starter thequasar

    (@thequasar)

    Hi Pablo,

    I feel a bit bad to report once again that the result is still the same. 😔

    I tried adding several sizes this time but was still left with old src’s:
    https://i.imgur.com/hjjmRis.png

    Despite your rapid response and how you’re willing to help, I wonder if I should simply give up at this point since most of your other users don’t seem to have any issues?

    What I find strange is that I get the same result in my local environment and production environment (even though I disabled all plugins on my local WP).

    Moreover, I just tried switching theme to the basic “Twenty Twenty-One”, still happening.

    • This reply was modified 7 months ago by thequasar. Reason: Tested on another theme
    Plugin Author Pablo Pacheco

    (@karzin)

    Hi @thequasar ,

    No problem, let’s try to understand what could be the reason.

    I’m pretty sure it should be working this time.
    Can you please make sure the update reference is enabled?
    – Update media reference > Update filename reference in post content

    If it still doesn’t work, can I try to login on your site or on a staging environment somehow? In that case, please contact me through wpfactory.com as wp.org forum rules are very restrictive

    Thread Starter thequasar

    (@thequasar)

    Hi Pablo,

    Yep, the option “Update media reference > Update filename reference in post content” has always been checked, and I just tried several runs with different combos to double-check — still broken images.

    The site is sadly not hosted on a managed WP host, thus there’s no staging environment “built-in” by default, nor have I’ve set up one since I mainly work locally and manually transfer my changes over.

    The reason why I suggested to give up was of course one, because it seemed to be working for others while debugging also took up your valueable time! And two, because I’ve already invested a bit too much time than I’d like to on this, instead of focusing on other aspects on my website. However, I truly appreciate the help I’ve been given.

    Plugin Author Pablo Pacheco

    (@karzin)

    No problem 🙂
    Can you just please make sure that you’ve tried version 1.2.3? And that you have the free version disabled?

    Actually, you have found a issue on the plugin.

    Some users just attach images on posts as “featured images”, and in that case the reference is automatically refreshed. It should work just fine.

    But for images attached in post content, the “Update media on post update” option wasn’t refreshing the reference indeed. That’s why I had to create the “Update filename reference in post content” anyway. Actually I don’t know how I didn’t receive any questions about it until now 🙂

    If you want to try again some other time, let me know 😉

    Thread Starter thequasar

    (@thequasar)

    Hi Pablo,

    Apologies for previously not being clear, I used version 1.2.3 the moment you pushed the new update, so at least for me, the issue remained there. And to add to that, I tried all of the previous releases since this thread was started!

    It sounds a bit ungrateful of me, but I will most likely try to get a refund in order for me to invest the money in other plugins, thus I believe I won’t receive any updates after it has been processed.

    But if you believe you’ve solved the issue, I wouldn’t mind giving it a quick spin (just not as thoroughly as before 😅).

    Plugin Author Pablo Pacheco

    (@karzin)

    I think the solution is probably silly, as I really can’t reproduce the problem here after version 1.2.3 and I’m doing the same steps as you.

    If you wish to get it fixed for good any other time in the future, just let me know.

    But anyway, I understand the situation.
    Please just contact WP Factory asking for a refund and send your purchase info.
    There is no problem

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Renaming breaks images on older posts’ is closed to new replies.