Not sure but it seems it’s crashing every time the plugin tries to use the WP’s metadata for that image.
Can you change:
foreach ( $meta['sizes'] as $size => $meta_size ) {
To:
if ( $meta['sizes'] )
foreach ( $meta['sizes'] as $size => $meta_size ) {
There should be two lines such as this one in the media-file-renamer.php file. Tell me if everything works better and as expected.
I made the changes (thank you for support). I am still ongoing with the website editing, but within tomorrow for sure I will need to rename some files and I’ll let you know.
PS. When it happens the problem, normally the files is renamed, yet the links to the images are broken and I need to edit them manually.
Yeah if the plugin crashes in the middle of an operation what you mentioned in the PS might happen…
Please test the plugin again with this change and tell me if it is better.
Hi Jordy,
It is better, I don’t know, I have noticed that the error is not showing anymore, though the links are not updated. Any idea / debug?
Actually what kind of links are you talking about? Which ones?
for example, I edit a picture title from “picturename” to “picturename 120×98”
At this point the plugin flag the file as possible candidate to be renamed and so I click on “Rename 1 Flagged Media” button.
The process go thru without errors
Afterwards, the plugin Broken Links Checker pop up a message in Dashboard, warning me that there are 1 (or more, according to how many media were flagged), broken links to the just renamed media.
So, the filename has changed, but the link to the original file in the database wasn’t changed accordingly, I have to do manually every time.
I understand the process, but where exactly is the file not properly renamed? In a post?
Ok I have some news, it seems there is a problem with the plugin and “broken link checker” plugin (BLC).
The files are all renamed properly and the links seems updated, just I don’t know why the plugin BLC detect they are broken.
This plugin has a link on the dashboard with leads to the list of broken links found, if clicking on one of this link it actually cannot find the image, in fact the image has been renamed, the links in the post/pages updated, but maybe there is another table somewhere in the database which is not updated as well?
I am not sure of this plugin works but it seems it uses some kind of internal cache. I am using this plugin as well on a few of my websites but I didn’t notice anything special, it works well with my plugin.
Can you ask to the developer of that plugin? He will definitely have an idea 🙂
I have renamed some pictures and then after the error appeared, I downloaded the database and search for the old link, which show up here and there thought the DB, some links are updated, some links not, this is what the other plugin detects. How do you replace the links? Or as you say, should I leave the error up to see if it’s a cache problem?