matthewcolab
Forum Replies Created
-
Forum: Plugins
In reply to: [Posts 2 Posts] [Plugin: Posts 2 Posts] All existing connection gone?the problem wasn’t that we couldn’t figure out the current hash, the problem I was experiencing was that the hash was changing – I needed to find a listing of orphaned hashes so that I could recover my relations without re-entering them.
Which I guess brings me to my next question: what paramaters get combined to make the hash? I still don’t know for sure what paramater it was that changed to result in a different hash.
Forum: Plugins
In reply to: [Posts 2 Posts] [Plugin: Posts 2 Posts] All existing connection gone?Firstly, thanks scribu you got me going in the right direction.
The issue ended up being that I wasn’t setting the name of the connection type, one of the paramaters that makes up the hash must have changed on update. This resulted in a different hash after the update, and the apparent “loss” of data that I was experiencing.
To fix without reentering data:
I changed the name of my connection in the p2p_register_connection_type to whatever it was going to be, then looked in my wp_p2p table to find what the hash types hook up to using a query like this one:SELECT DISTINCT p2p_type, fromtype.post_type AS fromtype, totype.post_type AS totype from wp_p2p inner join wp_posts as fromtype ON wp_p2p.p2p_from = fromtype.ID inner join wp_posts as totype ON wp_p2p.p2p_to = totype.ID
Then after determining which hash type relates to which connection name, run this on each one to update
UPDATE wp_p2p SET p2p_type = "nameofconnection" WHERE p2p_type="f79b8d19b8b7dc1b5b357bd518c8d620";
Let me know if this ends up helping anyone having the same problem
Forum: Plugins
In reply to: [Posts 2 Posts] [Plugin: Posts 2 Posts] All existing connection gone?The P2P boxes show up, just without the connections. I’m curious: what is the p2p_type column in the database? Is it a hash and how does it get generated?
This happened last time i updated, and i went in and manually redid the connections. They keep until updating this plugin, and the problem occurs again.
Debug mode showed a couple warnings, nothing really related:
Notice: Undefined index: post in /mnt/target02/349133/606198/www.selectproperties.com/web/content/wp/wp-content/themes/selectproperties/functions/meta-box/meta-box-usage.php on line 449 Notice: Undefined index: post_ID in /mnt/target02/349133/606198/www.selectproperties.com/web/content/wp/wp-content/themes/selectproperties/functions/meta-box/meta-box-usage.php on line 449 Notice: automatic_feed_links is deprecated since version 3.0! Use add_theme_support( 'automatic-feed-links' ) instead. in /mnt/target02/349133/606198/www.selectproperties.com/web/content/wp/wp-includes/functions.php on line 3458 Notice: Use of undefined constant core_mods - assumed 'core_mods' in /mnt/target02/349133/606198/www.selectproperties.com/web/content/wp/wp-content/themes/selectproperties/functions.php on line 42 Notice: wp_deregister_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or init hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.) in /mnt/target02/349133/606198/www.selectproperties.com/web/content/wp/wp-includes/functions.php on line 3578
Forum: Plugins
In reply to: [Posts 2 Posts] [Plugin: Posts 2 Posts] All existing connection gone?Do you know what would cause it to not show the connections on the admin panel and front end, but they still exist in the database?
Forum: Plugins
In reply to: [Posts 2 Posts] [Plugin: Posts 2 Posts] All existing connection gone?Also, tried doing a
var_dump( post_type_exists( 'posttype' ) ); exit;
and it returned bool(false) bool(false) bool(false).UPDATE: Sorry, my init priorities between custom post types and the registering p2p relation weren’t in the correct order. Now they are, and it’s returning true, but the problem still exists. No connections on admin panel or front end, but I can still see them in the database.
Forum: Plugins
In reply to: [Posts 2 Posts] [Plugin: Posts 2 Posts] All existing connection gone?Hi. I updated to wordpress 3.3 and upgraded the plugin to 1.1.3 and all my connections have been erased. They are still in the database, but in the admin screens AND on the front end, they are not showing up. I went to options.php and changed the p2p_storage to 3 and was prompted to Proceed with updating the connections. However, when i click on that, it says “Upgraded 0 connections” and still my posts are not connected.
The p2p table shows all the to and from connections with p2p types.