No longer renaming files after title change
-
Lately (not sure since what version, but I think one of the last two), files have not been renamed after changing the media title.
The plugin is configured only for manual renaming based on the media title. This was always the case, but after uploading images, then editing their titles and saving, file names matched their new titles.
I have EWWW Image Optimizer, Image Regenerate & Select Crop and Enable Media Replace active on this site, but this has never been an issue before.
Please advise.
The page I need help with: [log in to see the link]
-
Hey @galbaras! ??
I couldn’t reproduce your issue during a test where I renamed a post to see if the attached media got renamed accordingly. Could you ensure this is not linked to another third-party plugin? Also, make sure you have the “rename on save” option enabled. If you think this is linked to a new version, you can always roll back to a previous version to check. Thanks!
I can only see “rename on POST save”, and that’s already turned on. Is there a “rename on save” option somewhere?
I’ve found out that this happens when the plugin Enable Media Replace is active.
Hey @galbaras! ??
It’s possible that using multiple plugins for your media could cause incompatibilities. If the only option available in the plugin is “Rename On Post Save,” it appears you are already using this feature. Thanks!
This doesn’t resolve the issue. I’ve opened a thread in the other plugin’s forum, but would appreciate some investigation on your side as well.
Thank you.
While testing some more, I realised that the filename isn’t changed on the first save, but is changed if I just click “Update” again, with or without other media-related plugins being active.
On the first save, the debug log shows this:
2024-08-13 08:27:04: ?? The file doesn't require renaming.
2024-08-13 08:27:04: ? Event: Save AttachmentNothing more changes if I wait. But then, when I simply save the media record again, I get a lot of activity, including some issues. In this example, the original file name was
6-bottle-rack-fb.jpg
, but this rename operation was from6-bottle-rack-fb-not-original.jpg
to6-bottle-rack-fb-renamed.jpg
.Yet, as you can see, some operations use the original file name not just as the initial name, but also as the final name.
All the thumbnails and WebP versions (from EWWW Image Optimizer) were renamed properly, just not on the first save.
2024-08-13 08:34:39: ?? Rewrite excerpts 2024/08/6-bottle-rack-fb-not-original-64x64.jpg ?? 2024/08/6-bottle-rack-fb-renamed-64x64.jpg
2024-08-13 08:34:39: ?? Rewrite content 2024/08/6-bottle-rack-fb-not-original-64x64.jpg ?? 2024/08/6-bottle-rack-fb-renamed-64x64.jpg
2024-08-13 08:34:39: ?? Rewrite excerpts 2024/08/6-bottle-rack-fb-not-original-100x100.jpg ?? 2024/08/6-bottle-rack-fb-renamed-100x100.jpg
2024-08-13 08:34:39: ?? Rewrite content 2024/08/6-bottle-rack-fb-not-original-100x100.jpg ?? 2024/08/6-bottle-rack-fb-renamed-100x100.jpg
2024-08-13 08:34:38: ?? Rewrite excerpts 2024/08/6-bottle-rack-fb-not-original-240x504.jpg ?? 2024/08/6-bottle-rack-fb-renamed-240x504.jpg
2024-08-13 08:34:38: ?? Rewrite content 2024/08/6-bottle-rack-fb-not-original-240x504.jpg ?? 2024/08/6-bottle-rack-fb-renamed-240x504.jpg
2024-08-13 08:34:38: ?? Rewrite excerpts 2024/08/6-bottle-rack-fb-not-original-180x378.jpg ?? 2024/08/6-bottle-rack-fb-renamed-180x378.jpg
2024-08-13 08:34:38: ?? Rewrite content 2024/08/6-bottle-rack-fb-not-original-180x378.jpg ?? 2024/08/6-bottle-rack-fb-renamed-180x378.jpg
2024-08-13 08:34:38: ?? Rewrite excerpts 2024/08/6-bottle-rack-fb.jpg ?? 2024/08/6-bottle-rack-fb.jpg
2024-08-13 08:34:38: ?? Rewrite content 2024/08/6-bottle-rack-fb.jpg ?? 2024/08/6-bottle-rack-fb.jpg
2024-08-13 08:34:38: ?? Rewrite excerpts 2024/08/6-bottle-rack-fb.jpg ?? 2024/08/6-bottle-rack-fb.jpg
2024-08-13 08:34:38: ?? Rewrite content 2024/08/6-bottle-rack-fb.jpg ?? 2024/08/6-bottle-rack-fb.jpg
2024-08-13 08:34:38: ?? Rewrite excerpts 2024/08/6-bottle-rack-fb.jpg ?? 2024/08/6-bottle-rack-fb.jpg
2024-08-13 08:34:38: ?? Rewrite content 2024/08/6-bottle-rack-fb.jpg ?? 2024/08/6-bottle-rack-fb.jpg
2024-08-13 08:34:38: ?? Rewrite excerpts 2024/08/6-bottle-rack-fb.jpg ?? 2024/08/6-bottle-rack-fb.jpg
2024-08-13 08:34:38: ?? Rewrite content 2024/08/6-bottle-rack-fb.jpg ?? 2024/08/6-bottle-rack-fb.jpg
2024-08-13 08:34:38: ?? Rewrite excerpts 2024/08/6-bottle-rack-fb-not-original-300x300.jpg ?? 2024/08/6-bottle-rack-fb-renamed-300x300.jpg
2024-08-13 08:34:38: ?? Rewrite content 2024/08/6-bottle-rack-fb-not-original-300x300.jpg ?? 2024/08/6-bottle-rack-fb-renamed-300x300.jpg
2024-08-13 08:34:37: ?? Rewrite excerpts 2024/08/6-bottle-rack-fb-not-original-150x150.jpg ?? 2024/08/6-bottle-rack-fb-renamed-150x150.jpg
2024-08-13 08:34:37: ?? Rewrite content 2024/08/6-bottle-rack-fb-not-original-150x150.jpg ?? 2024/08/6-bottle-rack-fb-renamed-150x150.jpg
2024-08-13 08:34:37: ?? Rewrite excerpts 2024/08/6-bottle-rack-fb-not-original.jpg ?? 2024/08/6-bottle-rack-fb-renamed.jpg
2024-08-13 08:34:37: ?? Rewrite content 2024/08/6-bottle-rack-fb-not-original.jpg ?? 2024/08/6-bottle-rack-fb-renamed.jpg
2024-08-13 08:34:37: ? File /home/gboldev/public_html/pacificsprings/wp-content/uploads/2024/08/6-bottle-rack-fb-not-original-64x64.jpg ?? /home/gboldev/public_html/pacificsprings/wp-content/uploads/2024/08/6-bottle-rack-fb-renamed-64x64.jpg
2024-08-13 08:34:37: ? File /home/gboldev/public_html/pacificsprings/wp-content/uploads/2024/08/6-bottle-rack-fb-not-original-100x100.jpg ?? /home/gboldev/public_html/pacificsprings/wp-content/uploads/2024/08/6-bottle-rack-fb-renamed-100x100.jpg
2024-08-13 08:34:37: ? File /home/gboldev/public_html/pacificsprings/wp-content/uploads/2024/08/6-bottle-rack-fb-not-original-240x504.jpg ?? /home/gboldev/public_html/pacificsprings/wp-content/uploads/2024/08/6-bottle-rack-fb-renamed-240x504.jpg
2024-08-13 08:34:37: ? Optimized Image /home/gboldev/public_html/pacificsprings/wp-content/uploads/2024/08/6-bottle-rack-fb-not-original-240x504.jpg.webp ?? /home/gboldev/public_html/pacificsprings/wp-content/uploads/2024/08/6-bottle-rack-fb-renamed-240x504.jpg.webp
2024-08-13 08:34:37: ? File /home/gboldev/public_html/pacificsprings/wp-content/uploads/2024/08/6-bottle-rack-fb-not-original-180x378.jpg ?? /home/gboldev/public_html/pacificsprings/wp-content/uploads/2024/08/6-bottle-rack-fb-renamed-180x378.jpg
2024-08-13 08:34:37: ? Optimized Image /home/gboldev/public_html/pacificsprings/wp-content/uploads/2024/08/6-bottle-rack-fb-not-original-180x378.jpg.webp ?? /home/gboldev/public_html/pacificsprings/wp-content/uploads/2024/08/6-bottle-rack-fb-renamed-180x378.jpg.webp
2024-08-13 08:34:37: ? File /home/gboldev/public_html/pacificsprings/wp-content/uploads/2024/08/6-bottle-rack-fb-not-original-300x300.jpg ?? /home/gboldev/public_html/pacificsprings/wp-content/uploads/2024/08/6-bottle-rack-fb-renamed-300x300.jpg
2024-08-13 08:34:37: ? Optimized Image /home/gboldev/public_html/pacificsprings/wp-content/uploads/2024/08/6-bottle-rack-fb-not-original-300x300.jpg.webp ?? /home/gboldev/public_html/pacificsprings/wp-content/uploads/2024/08/6-bottle-rack-fb-renamed-300x300.jpg.webp
2024-08-13 08:34:37: ? File /home/gboldev/public_html/pacificsprings/wp-content/uploads/2024/08/6-bottle-rack-fb-not-original-150x150.jpg ?? /home/gboldev/public_html/pacificsprings/wp-content/uploads/2024/08/6-bottle-rack-fb-renamed-150x150.jpg
2024-08-13 08:34:37: ? Optimized Image /home/gboldev/public_html/pacificsprings/wp-content/uploads/2024/08/6-bottle-rack-fb-not-original-150x150.jpg.webp ?? /home/gboldev/public_html/pacificsprings/wp-content/uploads/2024/08/6-bottle-rack-fb-renamed-150x150.jpg.webp
2024-08-13 08:34:37: ? File /home/gboldev/public_html/pacificsprings/wp-content/uploads/2024/08/6-bottle-rack-fb-not-original.jpg ?? /home/gboldev/public_html/pacificsprings/wp-content/uploads/2024/08/6-bottle-rack-fb-renamed.jpg
2024-08-13 08:34:37: ?? New file will be: 6-bottle-rack-fb-renamed.jpg
2024-08-13 08:34:37: ?? Rename Media: 6-bottle-rack-fb-not-original.jpg
2024-08-13 08:34:37: ? Event: Save AttachmentHey?@galbaras! ??
The attachment_fields_to_save filter is used to modify the associated data of images. When triggered within the Media Renamer plugin, it initiates renaming based on the automatic method you have selected. However, at this stage, the data might not be sufficient to apply the auto-renaming method. Only after you update your posts will the event be triggered a second time to ensure the media is renamed correctly. You can try using the “force rename” option to bypass this, but it’s not recommended.
Hey @valwa ,
To be clear, I’ve isolated the issue from the other plugin I mentioned. The confusion was due to renaming only happening the second time around, while I was saving once with it enabled and once with it disabled.
Also, I don’t have “Rename On Post Save” enabled or “Force Rename”. What difference will either of these make in this situation.
Renamer should rename all the files to match the media title on first save, but it doesn’t. How can we find out where this goes wrong?
To make absolutely certain, I deactivated all the plugins that may have anything to do with images and switched to a standard theme. Renaming only occurs on the second save ??
-
This reply was modified 5 months, 2 weeks ago by
Gal Baras.
This issue is definitely NOT resolved. Please suggest a way to debug and resolve it.
Hey?@galbaras! ??
Are you still experiencing this issue with the latest version of the plugin? The issue occurred when another plugin was active, and it’s possible that using multiple plugins for your media could cause incompatibilities. Have updates to the other plugins resolved your issue? Thanks!
I’m still experiencing this issue on ALL of my sites.
?I’ve isolated the issue from the other plugin I mentioned
Sorry if this wasn’t clear. I meant that the issue was NOT caused by another plugin. I’d been confused by the fact that the renaming was only done on the second attempt, which happened after activating or deactivating, but ultimately found out it was unrelated.
Media File Renamer is only renaming files on the second update of the attachment.
Hey?@galbaras! ??
Are you still experiencing this issue with the latest version of the plugin? After further investigation, I still can’t reproduce the issue on a test server, and no other users have reported a similar problem. If you can reproduce the issue on a staging site or a blank website, please let me know so we can better understand the issue. For now, it seems to be specific to something on your server.
If the issue persists, please ensure that no caching or performance plugins are active, as they could interfere with the renaming process. You can contact me through the Meow Apps contact form on our website, and I’d be happy to access your server to check it out directly if needed.
Hope this helps, and Merry Christmas!
-
This reply was modified 5 months, 2 weeks ago by
- You must be logged in to reply to this topic.