Hi RBX,
It depends on how it is implemented by the theme, sometimes they store the path by themselves and it is impossible for the plugin to detect and modify.
Do you have any idea where those paths are stored? Can you actually see them somewhere (or modify them manually)?
If it is stored as a metadata or somewhere it can be found I will definitely add support for it. However, if the theme is storing it in its own customized way that might be hard. Theme are supposed to use the post metadata though, I wonder why it wouldn’t work.
Thread Starter
RBX
(@rbx)
The only place I could find absolute paths was table of plugin EWWW Image Optimizer, which isn’t even active because exec() is disabled on server.
The other places I found image paths were in table postmeta with image data stored for meta keys _wp_attached_file, _wp_attachment_metadata, _wp_attachment_image_alt and in posts table with post type attachment.
Thanks for looking into that 🙂
The other places I found image paths were in table postmeta with image data stored for meta keys _wp_attached_file, _wp_attachment_metadata, _wp_attachment_image_alt and in posts table with post type attachment.
Those are the usual places. When you rename a file, those are changed or not? If one of those aren’t changed, it’s really a problem and I need to fix it immediately. That would be cool if you check those fields before, change the filename, and check those fields again. Keep this information so that I can see it.
Ah, of course make sure the options are checked in the settings, even though by default it is.
Thread Starter
RBX
(@rbx)
I just uploaded a file to media gallery and tried changing title from there. I got this
Warning: Illegal string offset 'sizes' in /home/bhartiwe/public_html/wp-content/plugins/media-file-renamer/media-file-renamer.php on line 930
Warning: Invalid argument supplied for foreach() in /home/bhartiwe/public_html/wp-content/plugins/media-file-renamer/media-file-renamer.php on line 930
Warning: Illegal string offset 'sizes' in /home/bhartiwe/public_html/wp-content/plugins/media-file-renamer/media-file-renamer.php on line 978
Warning: Invalid argument supplied for foreach() in /home/bhartiwe/public_html/wp-content/plugins/media-file-renamer/media-file-renamer.php on line 978
Warning: Cannot modify header information - headers already sent by (output started at /home/bhartiwe/public_html/wp-content/plugins/media-file-renamer/media-file-renamer.php:930) in /home/bhartiwe/public_html/wp-includes/pluggable.php on line 1196
After refresh, I found that the title and filename were successfully updated.
In database, everything was updated except the post_name in posts table.
Hello RBX,
Sorry for the late reply. I am going to add a bunch of updates to the plugin and this problem is part of it.
Those warnings mean that the metadata for the different sizes of your image doesn’t exist. This is not normal. It’s basically a broken image in WordPress (even though the image is probably fine). I suggest you to run a plugin such as Regenerate Thumbnails on it, that would fix this issue. My plugin was ignoring this problem and continuing his process. I fixed it now so that it generates a proper error in the logs 🙂