diff --git a/dt-posts/posts.php b/dt-posts/posts.php index 8c4f126945..002203bb36 100644 --- a/dt-posts/posts.php +++ b/dt-posts/posts.php @@ -2535,7 +2535,10 @@ public static function add_post_contact_method( array $post_settings, int $post_ $new_meta_key = ''; //check if this is a new field and is in the channel list if ( isset( $post_settings['fields'][ $field_key ] ) ) { - $new_meta_key = self::create_channel_metakey( $type, 'contact' ); + // The 3 character hash can repeat, and reusing a key would overwrite an existing value. + do { + $new_meta_key = self::create_channel_metakey( $type, 'contact' ); + } while ( metadata_exists( 'post', $post_id, $new_meta_key ) ); } update_post_meta( $post_id, $new_meta_key, $value ); $details = [ 'verified' => false ];