• Resolved Flamekebab

    (@flamekebab)


    The old way (perhaps the wrong way?) I added images to products was to select “Featured Image” and drag the image files in. They’d upload and then I’d select one to be the product image. The other images I’d uploaded would automatically appear in the product’s gallery.

    The new way seems to be to add a featured image and then use the “gallery” tab in the new “attachments” box-out.

    The result is the same as before. Great.

    Except the old product images don’t migrate.

    I’m having to fix hundred of product listings manually. This probably won’t be fixed in time to help me but this is arguably a bug and should be fixed so other people can migrate without issue.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Flamekebab

    (@flamekebab)

    From doing a bit of investigating I can see that images uploaded in the old way are stored in wp_posts with the post_type field set as “attachment” and the post_parent field containing the ID of the product.

    So the product Ork Burna 1 (ID 1534) used to have five images. Their IDs were:

    • 1548
    • 1539
    • 1559
    • 1560
    • 1561

    A simply SQL query finds them:
    SELECT * FROM wp_posts WHERE post_parent = 1534 AND post_type LIKE 'attachment'

    But they don’t show up on the product page.

    Instead let’s look at the Frankenork (ID 6531). It has four images because I went into the attachments box-out and re-selected the old uploaded files after upgrading to JigoShop 2.x. The pictures now appear on the product page like they should.

    There’s four images:

    • 6532 – the main product image
    • 6533
    • 6534
    • 6535

    From what I can tell the difference is that the new gallery setup adds the images to wp_jigoshop_product_attachment.

    SELECT * FROM wp_jigoshop_product_attachment WHERE product_id = 6531

    This gives three results – all with the product_id 6531. The three results are, of course, 6533, 6534, and 6535 (attachment_id).

    So it looks like the migration script should check for attachments using the initial query and then add them to the wp_jigoshop_product_attachment table. But it doesn’t.

    Thread Starter Flamekebab

    (@flamekebab)

    I’ve seen some things in the changelog about related problems. Has a tool to fix this stuff been created yet?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Additional product images don’t migrate [Potential Bug]’ is closed to new replies.