WordPress.org

Forums

Multiple Post Thumbnails
[resolved] Updating a Custom Post loses the Multiple Thumbnails (16 posts)

  1. Matt Hill
    Member
    Posted 4 years ago #

    I'm attaching Multiple Thumbnails to a Custom Post Type. This works fine. However, when I click Update, the post is saved but the attached posts vanish and I have to re-attach. Re-attaching without updating seems to save them correctly.

    I guess this is a bug and it currently makes the plugin unusable.

  2. Chris Scott
    Member
    Plugin Author

    Posted 4 years ago #

    @gambit37: I'm unable to reproduce this on a test install of 3.0.1 when using a custom post type. I created a new post of that type, saved it, then attached the image, and updated the post and the image remained attached and displayed.

  3. iamheartless
    Member
    Posted 4 years ago #

    i'm having this problem as well. the only time the error occurs is if i try to update the secondary image with a new one. when i upload the new image and hit update, it doesn't stick.

    i love this plugin so i hope this can be fixed.

  4. mopsy
    Member
    Posted 4 years ago #

    I'm having the same problem also. It doesn't always occur. Some stories accept the multiple images with no problem and once in a while one of them is rejected upon clicking update. If I don't click update and move to another post and then return the image is still there. Definitely a bug, but I find I can still use the plug-in if I don't click on update.

    Sure would love to see this fixed!

  5. Chris Scott
    Member
    Plugin Author

    Posted 4 years ago #

    Anyone having problems with this: are you using the latest version (0.4) of the plugin?

  6. kingofmycastle
    Member
    Posted 4 years ago #

    Hi! I've also had this problem (with 0.4). It all worked fine on my local machine but when I migrated to a live site I encountered this problem. The second Featured Image would upload and appear in the correct edit screen box but would then just disappear when you clicked 'update'. Although I had a custom post type this was functionality was only used on the main 'post' type.

    FYI I have the following other plugins:
    NextGen Gallery
    More Fields
    Clearner Gallery

    I did manage to fix this but I'm not sure how. Here's two things I did:
    1. Rename the plugins directory to something else and create a dummy plugins folder. Then visit the plugins admin page which had errors due to not finding the plugins. Delete the plugins directory and rename the old one back then visit the page again.
    2. I tidied up my code in functions.php and rearranged the order a bit. I finally settled upon:

    // Add support for extra Artists Portrait Image
    $thumb = new MultiPostThumbnails(array(
        'label' => 'Artist-Portrait',
        'id' => 'artist-portrait'
        )
    );
    add_image_size('artist-portrait-image', 337, 246, true);
    
    // Add support for Post Thumbnails/Featured Image
    add_theme_support( 'post-thumbnails', array( 'post','print_images','page' ) );
    set_post_thumbnail_size( 250, 180, true ); // true = hard crop mode
    add_image_size( 'menu-thumbnail', 64, 64, true ); //
    add_image_size( 'featured-image', 247, 246, true ); //
    add_image_size( 'artists-page', 267, 170, true ); //
    add_image_size( 'random-print', 260, 157, true ); //
    add_image_size( 'wide-page', 612, 246, true ); //?>

    Before I did have a comma after 'id' => 'artist-portrait'

    Anyway, great plugin. And it seems to be working for now. I hope you can work out the issue for 0.5

  7. Lee Rickler
    Member
    Posted 4 years ago #

    Pretty much a 'me too'. Was working fine until I tried to change / update any of the images then the Secondary image wouldn't stick.

  8. Lee Rickler
    Member
    Posted 4 years ago #

    Famous last words but ...
    Add a 2nd image
    Click update
    View custom fields - a new field is created - 'page_secondary-image_thumbnail_id'
    Add new image/ update - the custom ID stays the same

    So ... to fix:

    Delete the 2nd image
    Update
    Delete the custom field
    Update
    Add new image
    Update

    All should work fine.

  9. humbucker
    Member
    Posted 4 years ago #

    Yep I got 3 additionnal thumbs, and I'm always losing the first one...version0.4.

    ??

  10. Lee Rickler
    Member
    Posted 4 years ago #

    Did you check the custom fields?

  11. Matt Brett
    Member
    Posted 4 years ago #

    Indeed, manually deleting the page_secondary-image_thumbnail_id custom field sorts this bug out.

  12. Gobbles
    Member
    Posted 4 years ago #

    Hey People,

    Anyone has a code fix for this? .... i couldnt find a fix for this for months

  13. Gobbles
    Member
    Posted 4 years ago #

    Anyone?

    I would be happy if someone told me what needed to be done, and ill hire someone to get the right result.

  14. Ferencav
    Member
    Posted 4 years ago #

    Thanks, manually deleting the custom field worked for me. Just what I needed. Hope there will be a fix for this in the future. By the way, great plugin!

  15. Cor van Noorloos
    Member
    Posted 4 years ago #

    Thanks, manually deleting the custom field worked for me. Just what I needed. Hope there will be a fix for this in the future. By the way, great plugin!

    What he said (:

  16. timfarley
    Member
    Posted 4 years ago #

    I was having issues with this too, and manually deleting the custom field seems to have fixed it. And I agree, this is an awesome plugin.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Multiple Post Thumbnails
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic