• Resolved cluber22

    (@cluber22)


    I want to know why anything new I upload works fine, but my old images do not display at all. I think it has something to do with the metadata entries in the wp_postmeta table but I need some help figuring out what’s going on.

    Here are two interesting rows, one of from a post where the image displays correctly, one is where it is broken.

    Correct:

    meta_key: amazonS3_info
    meta_value: a:3:{s:6:"region";s:9:"eu-west-2";s:6:"bucket";s:20:"wpmedia.vickhope.com";s:3:"key";s:32:"uploads/2018/04/30175843/bc1.png";}

    Broken:

    meta_key: amazonS3_cache
    meta_value: a:2:{s:69:"//www.vickhope.com/wp-content/uploads/2017/05/blog-header-apr-171.png";i:1631;s:78:"//www.vickhope.com/wp-content/uploads/2017/05/blog-header-apr-171-1024x405.png";i:1631;}

    Now all my images are stored on s3 so I’m not concerned any data has been lost, however it looks like the database metadata is not quite right somehow.

    Any ideas how to fix this?

    Any help greatly appreciated!

    • This topic was modified 6 years, 10 months ago by cluber22.
    • This topic was modified 6 years, 10 months ago by cluber22.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter cluber22

    (@cluber22)

    This is possibly related to: https://github.com/deliciousbrains/wp-amazon-s3-and-cloudfront/issues/51

    I will try and understand what the SQL script is doing before blinding running, advice would still be helpful.

    Cheers!

    Thread Starter cluber22

    (@cluber22)

    This has now been fixed, the SQL script seem to do the job, adding new meta_key: amazonS3_info rows for each image.

    Plugin Contributor ianmjones

    (@ianmjones)

    Just to clarify what was happening here, there are two totally different postmeta records highlighted above.

    amazonS3_info is used as a record of where on S3 a Media Library item has been uploaded to by WP Offload S3.

    amazonS3_cache is used to quickly lookup what Media Library item relates to a URL found in the content of a post so that the Media Library does not need to be searched.

    Media Library items missing amazonS3_info records just means they hadn’t been uploaded to S3 yet, if they were existing Media Library items created before installing WP Offload S3 Lite this is to be expected, it only uploads new Media Library items to S3.

    To safely upload existing Media Library items to S3 the WP Offload S3 plugin has a tool for uploading all existing items, as well as working with them individually.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Mismatch in metadata, old uploads no longer showing in media’ is closed to new replies.