Custom Post Type View Button in Admin Gives 400 Error

I found a solution here:

Custom post types, taxonomies, and permalinks

TheDeadMedic’s solution worked like a charm.

function filter_post_type_link($link, $post)
{
if ($post->post_type != 'project')
    return $link;

if ($cats = get_the_terms($post->ID, 'project_categories'))
    $link = str_replace('%project_categories%', array_pop($cats)->slug, $link);
return $link;
}
add_filter('post_type_link', 'filter_post_type_link', 10, 2);

This checks to see what Project Categories are associated with the project, and uses the first one to build out the permalink for the Project.