• I have a full fresh install of WP 4.4.1, no plugin activated, running on PHP 7.0
    Just create a post, and add a “featured image” by dragging a file to the upload area in the featured image dialog box. All is OK.
    Save the post.
    In the database table wp_posts, we have ID 12 for the post (status publish), ID 13 for the attachment, with post_parent set to 12, ID 14 for the post (status inherit) and post_parent set to 12. In postmeta table, you have two records with post_id set to 13 (meta_key: _wp_attached_file and _wp_attachment_metadata) and one with post_id set to 12: meta_key _thumbnail_id.
    Everything OK.

    Now, edit the post, just suppress the “featured image”. Save the post.
    And re-check the database:
    in table posts: records 12, 13, 14 no change
    in table postmeta: the record with _thumbnail_id set to 12 is no longer present.

    Why the post_parent of the attachment is not set to 0, and the media still displayed as attached to the post ?

Viewing 1 replies (of 1 total)
  • I am not a php expert, however I have read about some of the differences between 5.x and 7. There are quite a few, and some of the differences are related to exception handling. Here is a page that describes some. Since your test is a very small site (excellent test environtment), I might suggest re-installing using php 5.x, and performing the same test. If the behavior is different you may have found an issue with wordpress.

Viewing 1 replies (of 1 total)
  • The topic ‘Featured Image suppress’ is closed to new replies.