When a post is quick created on the calendar, apply_filters('preview_post_link') ends up getting called during the ajax operation, which fails out because it's relying on get_the_ID(). Check if doing ajax, if so just return the preview link.