And if you have the same problem than me and what to fix it, just add this to your template functions.php file:
global $wpdb;
$upload_dir = wp_upload_dir();
$imagenes = $wpdb->get_col("SELECT guid FROM $wpdb->posts WHERE guid NOT LIKE '%".$upload_dir['url']."%' and post_type = 'attachment'");
foreach ( $imagenes as $imagen )
{
$wpdb->query("UPDATE $wpdb->posts SET guid = '".$upload_dir['url'] . "/" .str_replace("http://", "", $imagen)."' WHERE guid = '$imagen'");
}
And all the http://nombre-de-la-imagen.ext on guid field, will rename to http://www.dominio.ext/wp-content/uploads/nombre-de-la-imagen.ext (or the full path that you have on UPLOADS constant).
I hope this code will repair your GUID.
See you soon.
Thanks, very nice fix, and sorry for the late reply! This will be shipped in the next release of the plugin, on the same day as the next version of WP 🙂
You noticed I did it, right? 🙂
Hey Guys,
unfortunately it is not that easy. You cannot just use the upload_dir[‘url’] because the year and month folder will be wrong when editing file names from other months as the actual one. I’ve fixed that issue:
if ( $meta ) {
$upload_dir = wp_upload_dir();
$post['guid'] = $upload_dir['baseurl'] . str_replace( $upload_dir['basedir'], '', $path_parts['dirname'] ) . "/" . $meta["url"];
}
Is that a good fix for this nice plugin?
Cheers and thank you
Philipp