• H2GD Part 12: broken images and worse

    At WordCamp UK 2012 yesterday, during the Site Doctors session I asked if someone Scottish could look at my “To a mouse” page and read it out aloud. It was an attempt to be a little humorous BUT… I’d forgotten about the broken image. [nivo]

    What happened was…

    1. I’d created the presentation locally
    2. Uploaded it to the server using ftp and database export and import
    3. Manually corrected some of the links
    4. But not done ALL the “guid” fields in the posts table
    5. AND because my [bw_images] shortcode was attempting to save time when display an image full size it was using “guid” rather than the attachments metadata to find the file name of the image to display.
    6. BUT I didn’t notice since my browser was still finding the image on my local server.

    EGG on FACE.

    What happened next

    1. The Site Doctor discussion then discussed some alternatives for migrating from one site to another including using sitepush and InterConnect IT’s “search and replace”
    2. BUT I wanted to recover from my embarrasment so I ran some SQL
    3. which turned out to be “search and destroy”
    4. I completely ruined all the guid values.

    I have rewritten SOME of the code

    1. This morning I made some changes to the code to remove references to $post->guid and using post meta data ( _wp_attachment_metadata) instead.
    2. This appeared a lot easier than attempting to reset the guid values
    3. BUT… I only made changes for my [bw_images] shortcode
    4. AND because the data is still wrong my [bw_portfolio] and [bw_video] shortcodes are broken.

    one step forward two back.

    Anyway, off to golf in a minute. So I’ll have to change the rest later.

     


    , ,

    Published:

    Last updated:

    May 14, 2015

Today’s word is this:

Wednesday

Food-le.com

crisp

Foodlewordle.io

refry

Categories

Tide times from tidetimes.org.uk

Tide Times & Heights for Langstone Harbour on
19th June 2024
03:24 Low Tide ( 1.69m )
10:37 High Tide ( 4.22m )
15:43 Low Tide ( 1.68m )
22:54 High Tide ( 4.48m )

Tide times from tidetimes.org.uk

Tide Times & Heights for Northney on
19th June 2024
03:36 Low Tide ( 1.39m )
10:40 High Tide ( 3.91m )
15:40 Low Tide ( 1.45m )
22:54 High Tide ( 4.16m )