Multiple Post Thumbnails
[resolved] BUG when user deletes image from media library (6 posts)

  1. c.note
    Posted 4 years ago #

    When a users deletes the an image from the user library without removing it as the secondary post thumb, a new image cannot be added. It just stays blank but the meta value in the wp_postmeta table has the old image reference in it. This is quite a critical bug as the only way to rectify it is to remove the record in wp_postmeta table.


  2. David Chandra Purnama
    Posted 4 years ago #

    is there a way to solve this?,..

  3. Pancho Perez
    Posted 4 years ago #

    Hi there, Any news if this going to be solved ?

  4. Chris Scott
    Plugin Author

    Posted 4 years ago #

    Please try this version of the plugin: http://plugins.svn.wordpress.org/multiple-post-thumbnails/trunk/multi-post-thumbnails.php

    WARNING: Be sure to back up your database first and/or use this on a test installation. I've tested this with a few different configurations, however, since it does a delete on database rows, better safe than sorry.

  5. gabrielperezs
    Posted 4 years ago #

    Hi, to solved this without going to the database I do this modification on the functiĆ³n set_thumbnail:

    if (!empty($thumbnail_html)) {
                                            delete_post_meta($post_ID, "{$this->post_type}_{$this->id}_thumbnail_id");
                                            update_post_meta($post_ID, "{$this->post_type}_{$this->id}_thumbnail_id", $thumbnail_id);

    Apply the "delete_post_meta" before "update_post_meta". This fix the problem when you remove and image from the media and not in the post.

  6. c.note
    Posted 4 years ago #

    The script has been updated by the author, Chris Scott.

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