I have inherited a WP 3.2.1 site which uses prettyPhoto to load content via ajax. This was working before I enabled permalinks on the site. The Custom Post Type UI plugin is installed. I can browse to my custom post type at mysite.com/story/name-of-story but loading via ajax results in a 404.
The links which trigger the $.get code in prettyPhoto look like this:
<a href="<?php echo get_permalink(); ?>&ajax=true&count=<?php echo $count ?>" rel="story[ajax]"><?php echo wp_get_attachment_image($attachment->ID, array(75, 75));?></a>
If I change the permalink settings back to 'default'. the post content is loaded into the popup. The hrefs being called via XHR while it is working look like this:
http://mysite.com/?story=name-of-story&ajax=true&count=37
I've tried removing all query parameters from the permalink URLS and this did not resolve the problem. Can anyone shed any light on what might be going on here?