Title: [Plugin: Posts 2 Posts] Relations not saved
Last modified: August 19, 2016

---

# [Plugin: Posts 2 Posts] Relations not saved

 *  Resolved [pavelevap](https://wordpress.org/support/users/pavelevap/)
 * (@pavelevap)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-relations-not-saved/)
 * Hi, great plugin!
 * But there is problem – I can add reletions between my CPT and posts, I can find
   posts from CPT edit page, I can select them – but they are not saved. When I 
   open my CPT item again, there are no saved relations (also MySQL table is empty)…
 * And one feature request – It would be fine to display not only post titles during
   searching, but for example also category (or publish date)…
 * Thank you very much for your help…

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

 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-relations-not-saved/#post-1726146)
 * So you have the wp_p2p and wp_p2pmeta tables in your database, but they remain
   empty?
 * Do you hit the save button after selecting connected posts?
 *  Thread Starter [pavelevap](https://wordpress.org/support/users/pavelevap/)
 * (@pavelevap)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-relations-not-saved/#post-1726147)
 * Yes, exactly. I found some notes about this problem in other topics and tried
   deactivate / activate once again, but it was not helpfull.
 * I also tried development version, but then searching was broken (no posts found)
   so I switched back to 0.4.
 * My code:
 *     ```
       function my_propojeni_sluzeb() {
           if ( !function_exists('p2p_register_connection_type') )
               return;
   
           p2p_register_connection_type( 'sluzba', 'post' );
       }
       add_action('init', 'my_propojeni_sluzeb', 100);
       ```
   
 * Edit: Yes, I tried Publish and Update buttons. Or is there any other button for
   metabox? I do not see it…
 *  Thread Starter [pavelevap](https://wordpress.org/support/users/pavelevap/)
 * (@pavelevap)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-relations-not-saved/#post-1726150)
 * I tried to catch AJAX requests with Firebug, but there were only search requests.
   I thought that after selecting there will be also AJAX database updating request,
   but there was not. But maybe it works other way…
 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-relations-not-saved/#post-1726310)
 * > I tried to catch AJAX requests with Firebug, but there were only search requests.
   > I thought that after selecting there will be also AJAX database updating request,
   > but there was not. But maybe it works other way…
 * Yes, the connections are stored when you save the post.
 * So, there’s a problem with the table creation.
 * Please try to run these following two queries in phpMyAdmin and tell me if you
   get any errors:
 *     ```
       CREATE TABLE wp_p2p (
       	p2p_id bigint(20) unsigned NOT NULL auto_increment,
       	p2p_from bigint(20) unsigned NOT NULL,
       	p2p_to bigint(20) unsigned NOT NULL,
       	PRIMARY KEY  (p2p_id),
       	KEY p2p_from (p2p_from),
       	KEY p2p_to (p2p_to)
       );
       ```
   
 *     ```
       CREATE TABLE wp_p2pmeta (
       	meta_id bigint(20) unsigned NOT NULL auto_increment,
       	p2p_id bigint(20) unsigned NOT NULL default '0',
       	meta_key varchar(255) default NULL,
       	meta_value longtext,
       	PRIMARY KEY  (meta_id),
       	KEY p2p_id (p2p_id),
       	KEY meta_key (meta_key)
       );
       ```
   
 *  Thread Starter [pavelevap](https://wordpress.org/support/users/pavelevap/)
 * (@pavelevap)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-relations-not-saved/#post-1726317)
 * Sorry, but I am not sure if I understand. Tables are correctly in database with
   all specified columns above, but they remain empty even if I tried to save many
   relations…
 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-relations-not-saved/#post-1726467)
 * Please try the [development version](http://downloads.wordpress.org/plugin/posts-to-posts.zip)(
   0.4.1-alpha).
 *  Thread Starter [pavelevap](https://wordpress.org/support/users/pavelevap/)
 * (@pavelevap)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-relations-not-saved/#post-1726471)
 * Latest development version tried – no change, selected relationships are not 
   saved when updating post…
 *  Thread Starter [pavelevap](https://wordpress.org/support/users/pavelevap/)
 * (@pavelevap)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-relations-not-saved/#post-1726557)
 * Oh, I found it!
    I forgot that I have active another your plugin (Custom Field
   Images). After deactivating it works well. Maybe there is any conflict with scbFramework?
 * What should I do to use both of your plugins?
 * I know that this plugin is no longer supported, but what should current users
   do when there are many data stored? I tried to [ask](http://wordpress.org/support/topic/plugin-custom-field-images-migration)
   for migration script, but no answer 🙁
 * Thank you very much for your help…
 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-relations-not-saved/#post-1726558)
 * > Maybe there is any conflict with scbFramework?
 * Yes, that’s probably it.
 * Try installing scbFramework standalone, as described here:
 * [http://wordpress.org/extend/plugins/scb-framework/installation/](http://wordpress.org/extend/plugins/scb-framework/installation/)
 *  Thread Starter [pavelevap](https://wordpress.org/support/users/pavelevap/)
 * (@pavelevap)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-relations-not-saved/#post-1726559)
 * It did not help me, relations not saved.
 * I moved all unzipped files and directory into mu-plugins directory, but “Installation
   page” is probably deprecated, because I did not find any scb-load.php file? So,
   I am not sure if I installed it the right way?
 * Thank you for your help…
 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-relations-not-saved/#post-1726560)
 * Yeah, it won’t work without scb-load.php. Don’t know how it dissapeared.
 * It’s present in the [development version](http://downloads.wordpress.org/plugin/scb-framework.zip).
 * Note that your directory structure should look like this:
 *     ```
       mu-plugins/scb/
       mu-plugins/scb-load.php
       ```
   
 *  Thread Starter [pavelevap](https://wordpress.org/support/users/pavelevap/)
 * (@pavelevap)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-relations-not-saved/#post-1726561)
 * Great, now it works!

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

The topic ‘[Plugin: Posts 2 Posts] Relations not saved’ 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/)

 * 12 replies
 * 2 participants
 * Last reply from: [pavelevap](https://wordpress.org/support/users/pavelevap/)
 * Last activity: [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-relations-not-saved/#post-1726561)
 * Status: resolved