Since the update to version 1.1.3 existing connections are not being shown within admin panel, although they work normally from the front-end... any ideas how to fix this?
Since the update to version 1.1.3 existing connections are not being shown within admin panel, although they work normally from the front-end... any ideas how to fix this?
What version did you upgrade from?
Also, add this line to your wp-config.php file:
define( 'WP_DEBUG', true );
You might see a lot of notices, but some of them might be from P2P.
I've updated from 1.1.2
Where will I see the notices?
You should see them at the top of the page, if you have error reporting turned on your server.
Alternatively, you could install the Debug Bar plugin and see the notices there.
I did intall the Debug Bar, but with no results i.e no info on p2p appears...
Ok, then just paste the code you're using to register the connection types.
If it's rather long, use http://pastebin.com
<?php
function my_connection_types() {
// Make sure the Posts 2 Posts plugin is active.
if ( !function_exists( 'p2p_register_connection_type' ) )
return;
// Keep a reference to the connection type; we'll need it later
global $my_connection_type;
$my_connection_type = p2p_register_connection_type( array(
'from' => 'post',
'to' => 'osobe',
'fields' => array(
'uloga' => 'uloga:',
'lik' => 'lik:'
),
'reciprocal' => true,
'prevent_duplicates' => false,
));
$my_connection_type = p2p_register_connection_type( array(
'from' => 'osobe',
'to' => 'filmovi',
'fields' => array(
'uloga' => 'uloga:',
'lik' => 'lik:'
),
'reciprocal' => true,
'prevent_duplicates' => false,
));
}
add_action( 'init', 'my_connection_types', 100 );?>
Just below the function my_connection_types() { line, add this:
var_dump( post_type_exists( 'osobe' ) );
var_dump( post_type_exists( 'filmovi' ) );
exit;
And tell me what you get.
bool(true) bool(true)
Strange... the connection boxes show up fine for me.
I see the boxes as well, it's just that they are empty even for the posts that have been conncted and that display connections on the front end
I see the boxes as well, it's just that they are empty even for the posts that have been conncted and that display connections on the front end
Well, it's working fine on my install.
Maybe it's a plugin conflict or you have some other code in your theme that's causing the problem.
I'll try turning other plugins off later on when ther's less traffic on the site, but everything was working super-fine untill the last update?
I JUST upgraded to 1.1.4 and now get this error:
Warning: Connection types without a 'name' parameter are deprecated. in /home/content/56/8615756/html/wp-content/plugins/posts-to-posts/core/api.php on line 59
Does anyone have any thoughts on this??
You can fix it by adding a 'name' parameter to your p2p_register_connection_type() call, as shown in the wiki:
https://github.com/scribu/wp-posts-to-posts/wiki/Basic-usage
Thanks! Worked like a charm!
You must log in to post.