I had some pages on my site with urls along the lines of site.com/community/abc/ site.com/community/def/ site.com/community/ghi/
I wanted to redo the pages as a custom post type, so I created the community post type while the pages were still there. I think this stopped the rewrite rules for the custom post type being made. I deleted the pages and the parent page, deleted from trash as well, and so I expected with the pages deleted to get the custom post type when I visited the URLs but instead I get a 404.
I've tried deleting all the custom post type posts, removing it and recreating the custom post type and creating the posts again, but have had no luck.
An additional thing, I use the Rewrite plugin, and from what I see in it, there are no rules that have been made by WP for the custom post type (i've tried disabling this plugin while recreating the custom post type and then reenabling it, in case the plugin was interrfering but that didn't help )
i've also made sure to flush the rewrite rules in between my tests.
I think that either due to the existence of the community page and sub pages or due to the rewrite plugin, WP hasn't created the rewrite rules that it needs to display my custom post type.