Forums

Posts 2 Posts
bug in 1.1.3? (19 posts)

  1. MoBlaise
    Member
    Posted 5 months ago #

    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?

    http://wordpress.org/extend/plugins/posts-to-posts/

  2. scribu
    Member
    Posted 5 months ago #

    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.

  3. MoBlaise
    Member
    Posted 5 months ago #

    I've updated from 1.1.2
    Where will I see the notices?

  4. scribu
    Member
    Posted 5 months ago #

    You should see them at the top of the page, if you have error reporting turned on your server.

  5. scribu
    Member
    Posted 5 months ago #

    Alternatively, you could install the Debug Bar plugin and see the notices there.

  6. MoBlaise
    Member
    Posted 5 months ago #

    I did intall the Debug Bar, but with no results i.e no info on p2p appears...

  7. scribu
    Member
    Posted 5 months ago #

    Ok, then just paste the code you're using to register the connection types.

    If it's rather long, use http://pastebin.com

  8. MoBlaise
    Member
    Posted 5 months ago #

    <?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 );?>

  9. scribu
    Member
    Posted 5 months ago #

    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.

  10. MoBlaise
    Member
    Posted 5 months ago #

    bool(true) bool(true)

  11. scribu
    Member
    Posted 5 months ago #

    Strange... the connection boxes show up fine for me.

  12. MoBlaise
    Member
    Posted 5 months ago #

    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

  13. MoBlaise
    Member
    Posted 5 months ago #

    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

  14. scribu
    Member
    Posted 5 months ago #

    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.

  15. MoBlaise
    Member
    Posted 5 months ago #

    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?

  16. scribu
    Member
    Posted 5 months ago #

  17. Mark
    Member
    Posted 4 months ago #

    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??

  18. scribu
    Member
    Posted 4 months ago #

    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

  19. Mark
    Member
    Posted 4 months ago #

    Thanks! Worked like a charm!

Reply

You must log in to post.

About this Plugin

About this Topic