Title: [Plugin: Posts 2 Posts] upgrade problem from 1.0.1 to 1.1.5
Last modified: August 20, 2016

---

# [Plugin: Posts 2 Posts] upgrade problem from 1.0.1 to 1.1.5

 *  [non_human](https://wordpress.org/support/users/non_human/)
 * (@non_human)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-upgrade-problem-from-101-to-115/)
 * Hi! First of all, thanks for a great plugin, it’s awesome!
    The problem: #1. 
   Currently running 1.0.1 version I recently started to get a problem in adding
   connection meta (it would not save the data). Only half of the fields would be
   saved. I have custom post types riders and ranking. connection type – riders 
   to rankings, reciprocal. So when I add one connection meta data from riders page
   to ranking connection, it works. But when I add many riders to a ranking list
   with connection meta – it saves only some of them. I had a problem with php memory
   limit in WP and I could increase it only till 48Mb with my client’s hosting. 
   Could that be a problem? #2. I thought that upgrade will help so I added names
   to connection type and upgraded the plugin, but after updating connections all
   riders to ranking connections were gone. I also have riders to classes connection
   and those work ok, but this exact riders to ranking connections were gone from
   the db (checked in phpMyAdmin)
 * Would really love to upgrade because of all great features in the new version,
   but had to reverse to 1.0.1 and restore DB from back up.
 * Any ideas?
 * [http://wordpress.org/extend/plugins/posts-to-posts/](http://wordpress.org/extend/plugins/posts-to-posts/)

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

 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-upgrade-problem-from-101-to-115/#post-2590543)
 * First of all, are you using any of these [other plugins](http://profiles.wordpress.org/scribu/)?
 * Second of all, it would be useful if you shared your p2p_register_connection_type()
   calls: [https://gist.github.com/](https://gist.github.com/)
 *  Thread Starter [non_human](https://wordpress.org/support/users/non_human/)
 * (@non_human)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-upgrade-problem-from-101-to-115/#post-2590569)
 * [https://gist.github.com/8627c07691476c6b6a32](https://gist.github.com/8627c07691476c6b6a32)
 * here you can see the riders to classes and riders to ranking connections. first
   one was ok, but the ranking one disappeared after upgrade (the connected items,
   not the connection itself).
 * no, none of other plugins are used.
 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-upgrade-problem-from-101-to-115/#post-2590585)
 * The connections look fine (you can put both calls in a single function).
 * Maybe this will help (after running the migration script):
 * [http://wordpress.org/support/topic/plugin-posts-2-posts-all-existing-connection-gone?replies=15#post-2517920](http://wordpress.org/support/topic/plugin-posts-2-posts-all-existing-connection-gone?replies=15#post-2517920)
 *  Thread Starter [non_human](https://wordpress.org/support/users/non_human/)
 * (@non_human)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-upgrade-problem-from-101-to-115/#post-2590597)
 * Thanks scribu, I read that thread after I upgraded to 1.1.5
    I found my auto 
   generated connection hash through `$my_connection_type->name` and found all connected
   posts in db _except_ the rider_to_ranking connections. So then I used my backed
   up db on another wp install and added the connection name to the call function
   before upgrade, all the connections hash names were exactly as I specified, but
   no entries from rider_to_ranking connections.
 * considering I have around 300 connected riders to different ranking lists, it
   would be nice to keep them and not re-enter again =/
 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-upgrade-problem-from-101-to-115/#post-2590600)
 * So, after you upgrade, they don’t exist in the database anymore or are they just
   not displayed in the admin UI?
 *  Thread Starter [non_human](https://wordpress.org/support/users/non_human/)
 * (@non_human)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-upgrade-problem-from-101-to-115/#post-2590602)
 * they don’t exist in database any more
 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-upgrade-problem-from-101-to-115/#post-2590604)
 * That’s very strange, since the migration script only does UPDATE queries.
 * Try deactivating all other plugins and switch to the twentyeleven theme, so that
   there’s no other custom code running.
 * Before updating P2P, remember the number of entries in the wp_p2p table.
 * After updating P2P and running the migration script, check the number of entries
   again. It should be the same.
 *  Thread Starter [non_human](https://wordpress.org/support/users/non_human/)
 * (@non_human)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-upgrade-problem-from-101-to-115/#post-2590616)
 * You were right, the connections didn’t disappear after upgrade, but somehow merged
   with other connections.
    I checked again and I found actually two connection 
   types that “disappeared” from db, and they are `rider to ranking` and `class 
   to event`. Rider to ranking connection is`from rider to ranking` and reciprocal,
   same as `from class to event`. I used to connect riders to ranking from ranking
   post type. And I mostly connected riders to ranking from ranking page and the
   same class to event from event post type. Could that be an issue? That the connection
   type is set as `from rider to ranking` and`from class to event` but were written
   to db as `from ranking id to rider id` and `from event id to class id`?
 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-upgrade-problem-from-101-to-115/#post-2590617)
 * It doesn’t matter where you create the connection from in the admin; the connection
   is always created from A to B.
 * So, I’m not sure how you got into this situation, but here’s some code that will“
   flip” the connections:
 * [http://wordpress.org/support/topic/plugin-posts-2-posts-reciprocal-problem](http://wordpress.org/support/topic/plugin-posts-2-posts-reciprocal-problem)
 *  Thread Starter [non_human](https://wordpress.org/support/users/non_human/)
 * (@non_human)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-upgrade-problem-from-101-to-115/#post-2590618)
 * ok, I’ll try that. thanks!
    I found by p2p_to and p2p_from fields in db that 
   indeed my `rider_to_ranking` connections were named `class_to_rider` and my `
   class_to_event` connections — `rider_to_event`
 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-upgrade-problem-from-101-to-115/#post-2590619)
 * Yeah, well that’s one of the reasons I added an explicit `p2p_type` column; to
   avoid these kinds of ambiguities in the future.

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

The topic ‘[Plugin: Posts 2 Posts] upgrade problem from 1.0.1 to 1.1.5’ 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/)

 * 11 replies
 * 2 participants
 * Last reply from: [scribu](https://wordpress.org/support/users/scribu/)
 * Last activity: [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-upgrade-problem-from-101-to-115/#post-2590619)
 * Status: not resolved