WP’s URL handling is worthy of scorn in my opinion, so this type of thing is really hard to troubleshoot. A couple relevant details here would be:
1. What are the *exact* settings for your site’s permalinks? “Pretty permalinks” isn’t a specific setting that I’m aware of.
2. Confirm that your post-type is set to be publicly visible and its permalink settings are compatible with your site’s settings (try the simplest possible options, i.e. permalinks off, then change into more complex)
It’s worth trying a couple options here because WP is so poorly architected in this area. Another thing to try is try activating a default theme — sometimes themes manipulate the URL structure by changing queries.
Thread Starter
conn
(@conn)
(Totally agree about WP’s URL handling – massive pain).
Have tried all of those suggestions, but still having the issue. To elaborate:
1. The issue occurs when the permalinks are set to anything other than “Default”. (I’ve set them to “Month and name”, with a value for category base and tag base).
2. The issue is actually occurring with the default post type (ie not a custom post type). I’ve disabled all custom post types within the plugin and the issue still recurs. I can disable every component of Custom Content Type Manager and the issue recurs, but if I disable the plugin itself the issue fixes itself.
3. The issue also recurs regardless of the theme (I set the theme to “Twenty Eleven” and still had the same issue).
If it’s any help, the issue seems to have only begun occurring with the update to WP 3.5.1 (I’m on the current version of the Custom Content Type Manager plugin).
Thanks for your help so far!
I would guess it’s the request_filter() function inside of the includes/CCTM.php file — there have been a lot of bugs around the query that gets manipulated in that function. The query wouldn’t be so fragile if WP were architected sensibly… sigh. I think the best plan here is to file a bug report — I need to finally sit down and write unit tests for this. I haven’t rolled up my sleeves and written tests yet because if custom URL handling is a requirement, I don’t use WP, I use MODX — it’s so much better at this there’s no comparison.