I searched around and the URL below is all I could find on this problem. If I publish a custom post type's post without entering in a post title, it wipes the whole post's info and says "published". However, the post is nowhere to be seen. Looking into the database, I can see the post is created, but it's set to auto draft. The post_name value is empty
Found this. Sounds like exactly what I'm experiencing http://www.wptavern.com/forum/plugins-hacks/1851-custom-post-type-posts-published-without-title-lost.html
Any ideas on how to fix this? Or maybe someone can suggest a way of checking to see if a post title exists when the post it published, and display a error message to the user?
Update Thanks to Manny's solution below, I managed to make a few modifications from WordPress prompt checklist before publish? and fix the publish button so it doesn't keep spinning when you close the alert box.
add_action('admin_head', 'post_title_check');
function post_title_check() { ?>
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('#post').submit(function() {
if(jQuery('input[name="post_title"]').val() == '') {
alert("Please input a title");
jQuery('#ajax-loading').hide();
jQuery('#publish').removeClass('button-primary-disabled');
return false;
}
});
});
</script>