Verve Meta Boxes
trashing and untrashing clears postmeta (4 posts)

  1. Kevin Behrens
    Posted 4 years ago #

    I'm using Verve Metaboxes in conjunction with a custom post type, and find that trashing and untrashing an object clears its Verve-stored postmeta data.

    I was able to correct this by adding the following to the top of function verve_save_postdata :

    if ( empty($_POST) ) { return; }

    Do you see any problem with that workaround?


  2. catnip216
    Posted 4 years ago #

    That seems to work for me as well. I hope it's an acceptable method. Thanks for the snippet!

  3. Matt Hill
    Posted 4 years ago #

    This problem also exists when you revert to a previous version of a post using the WordPress revision system: all the VMD metadata is lost.

    This is a major bug, I've also sent an email about it to the author. Hopefully all instances of this problem will be fixed in the next version.

    I'm no WP coding expert, but I don't think that the workaround posted above is sufficient.

  4. Kevin Behrens
    Posted 4 years ago #

    Thanks, I hadn't considered revisions. The following alternate workaround (also for insertion in the top of function verve_save_postdata) will cause postmeta storage to be skipped for all instances that are not the normal edit form Save/Update/Publish:

    if ( empty( $_POST ) || ( false === strpos( $_SERVER['SCRIPT_NAME'], 'wp-admin/post.php' ) ) ) { return; }

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic