WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. kevinB
    Member
    Posted 3 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?

    http://wordpress.org/extend/plugins/verve-meta-boxes/

  2. catnip216
    Member
    Posted 3 years ago #

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

  3. Matt Hill
    Member
    Posted 3 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. kevinB
    Member
    Posted 3 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