Title: [Plugin: Posts 2 Posts] 2 Bug Reports
Last modified: August 19, 2016

---

# [Plugin: Posts 2 Posts] 2 Bug Reports

 *  [Derek Perkins](https://wordpress.org/support/users/ploobers/)
 * (@ploobers)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-2-bug-reports/)
 * Using the plugin API, I have found two errors.
 * 1) p2p_is_connected – This returns true if the first parameter is connected to
   anything, regardless whether it is connected to the second parameter.
 * 2) p2p_connect – I am connecting two custom post types, but the reciprocal argument
   isn’t working in the ui. If I call it as p2p_connect( cpt1, cpt2 ), it doesn’t
   show up in the UI, though it is stored correctly and returned correctly using
   query_posts. If I reverse the arguments however and call p2p_connect( cpt2, cpt1),
   it does show up in the UI.
 * Thanks for a great plugin!

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-2-bug-reports/#post-1844534)
 * The first issue is now fixed in the [development version](http://downloads.wordpress.org/plugin/posts-to-posts.zip)(
   0.5.2-alpha). Thanks for reporting.
 * As for the second issue, the arguments are reversed automatically when you use
   the default UI, so in a sense it’s expected behaviour.
 *  Thread Starter [Derek Perkins](https://wordpress.org/support/users/ploobers/)
 * (@ploobers)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-2-bug-reports/#post-1844535)
 * Thanks for the response.
 * On the second issue, why don’t you just pull in any connected posts, rather than
   restricting it to one direction? I know that I have connected posts now in my
   database that aren’t showing up.
 *  Thread Starter [Derek Perkins](https://wordpress.org/support/users/ploobers/)
 * (@ploobers)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-2-bug-reports/#post-1844536)
 * Another issue that I have noticed is trying to relate a post type to itself.
 * 1) When I relate a post type to itself, the p2p UI shows up in every edit screen.
 * 2) When I use query_posts with the ‘connected’ parameter on the same post type,
   the query always returns itself with the results.
 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-2-bug-reports/#post-1844576)
 * What do you mean by “returns itself” ?
 *  Thread Starter [Derek Perkins](https://wordpress.org/support/users/ploobers/)
 * (@ploobers)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-2-bug-reports/#post-1844577)
 * For example, if I have custom post type ‘shoe’. I connect shoe A to Shoes B and
   C. When I query for shoes related to A, it returns A, B and C, instead of just
   B and C.
 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-2-bug-reports/#post-1844578)
 * Ok, this is now fixed in the [development version](http://downloads.wordpress.org/plugin/posts-to-posts.zip).
   Thanks for reporting.
 * > On the second issue, why don’t you just pull in any connected posts, rather
   > than restricting it to one direction? I know that I have connected posts now
   > in my database that aren’t showing up.
 * I did this. Suppose you query ‘connected’ => ‘A’.
 * If there’s a connection A->B and another one B->A, it will choose one or the 
   other, to avoid returning B twice.
 * If you happen to have different data attached to each of those connections, this
   might cause problems.
 *  Thread Starter [Derek Perkins](https://wordpress.org/support/users/ploobers/)
 * (@ploobers)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-2-bug-reports/#post-1844579)
 * I think that it should return the same post twice, with the different p2pmeta
   information attached to each post. If the user doesn’t want multiple copies of
   a post returned, they should either remove one of the connections or filter on
   the p2pmeta to only return one.
 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-2-bug-reports/#post-1844580)
 * I guess you’re right. Forcing an arbitrary resolution for duplicates isn’t a 
   good idea. Updated dev version.
 *  [gasparking](https://wordpress.org/support/users/gasparking/)
 * (@gasparking)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-2-bug-reports/#post-1844581)
 * Hi Scribu,
 * In the p2p meta box, i had a problem trying to link to a post which has only 
   two letters in his title.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘[Plugin: Posts 2 Posts] 2 Bug Reports’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/posts-to-posts_7a8e9d.svg)
 * [Posts 2 Posts](https://wordpress.org/plugins/posts-to-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/posts-to-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/posts-to-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/posts-to-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/posts-to-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/posts-to-posts/reviews/)

 * 9 replies
 * 3 participants
 * Last reply from: [gasparking](https://wordpress.org/support/users/gasparking/)
 * Last activity: [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-2-bug-reports/#post-1844581)
 * Status: not resolved