Why is my custom form saving with ‘autodraft’ as title and slug?
Ok, so after reading the codex page on the ‘save_post’ hook, I spotted that they use a different way of dealing with revisions. So removing the if {…} surrounding the wp_update_post( $posttitle ) and inserting the following code fixed my problem: if ( $post = wp_is_post_revision( $post ) ) $post = $post;