Support » Plugin: Posts 2 Posts » [Plugin: Posts 2 Posts] No connections working after last update

  • Resolved ryansigg


    Just updated to 1.2. It must have been a while; I had to go into the new Admin page (nice!) and convert the weird connection types (with names something like ‘424545asvgg38476″) to their correct registered connection types.
    Then I updated the queries to work with the new version.

    Yet none of my connections are working.

    What’s REALLY weird, is that (whether I use WP_Query or get_posts) the results don’t change even when I delete the ‘connected_type’ or ‘connected_item’ parameters.

    I’ve been using Posts2Posts since version 0.5, and I’ve never really had many issues…
    What am I doing wrong? Thanks in advance…

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author scribu


    So, do the connections show up when editing a post in wp-admin?

    Also, please post the code for a query that doesn’t work, along with the corresponding p2p_register_connection_type() call in a

    Sorry, I accidentally posted the link to the plugin instead of the link to my pastebin up there. Haha, ahem…

    Here’s the forgotten link:

    And yes, after converting the connection types, they show up on post edit page.

    Plugin Author scribu


    The queries look fine. Maybe it’s another plugin interfering.

    I deactivated all plugins except for Posts2Posts and I get the same exact results?
    Could there be something going on with my tables?
    In the wp_p2p table I see: p2p_id, p2p_from, p2p_to, p2p_type

    Here’s some additional info; when I use the get_posts option and remove 'suppress_filters' => false I get lots of results, but all different posts that have nothing to with the connection type.
    If I keep 'suppress_filters' => false then I get zero results.

    Thanks for your help so far. As I said, I’ve used this plugin for a long while now and this is the first time I’ve had any trouble.

    Plugin Author scribu


    Try doing var_dump( get_post_type( $child_id ) ); right before the get_posts() call. You should get ‘cruise’ or ‘ship’.

    I see ‘ship’.

    I’ve gone through and checked the rest of the code used to display the results but everything seems fine on that end.
    Any other ideas?
    Could I perhaps persuade you to take a look at my installation?

    Plugin Author scribu


    One more thing to try:

    function debug_wp_query( $posts, $wp_query ) {
      echo '<pre>';
      var_dump( $wp_query->request );
      echo '</pre>';
      return $posts;
    add_filter( 'the_posts', 'debug_wp_query', 10, 2 );

    This should show you the final SQL generated for each WP_Query run. See if you find anything suspicious.

    Ok, tried that… Please take a look, thanks:

    Plugin Author scribu


    The problem in the second query is this: AND wp_posts.post_type = 'post'

    So yeah, I can take a look at your site. Send me an email: mail AT

    Sending email. Thanks!

    Plugin Author scribu


    The issue is resolved in the development version (1.3-alpha3).

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Plugin: Posts 2 Posts] No connections working after last update’ is closed to new replies.