WordPress.org

Ready to get started?Download WordPress

Forums

Posts 2 Posts
Connections lost after update tp 1.4.2 (6 posts)

  1. tmfrnz
    Member
    Posted 1 year ago #

    just a little feedback on your latest plugin update that broke my connections.

    maybe my connection type is wrong?

    p2p_register_connection_type( array(
            'name' => 'CONNECTION',
            'from' => 'product',
            'from_query_vars' => array(
                'product_cat' => 'CAT1'
            ),
    	'to' => 'product',
            'to_query_vars' => array(
                'product_cat' => 'CAT2'
            ),
            'fields' => array(
                'standard' => array(
                    'title' => 'Standard',
                    'type' => 'checkbox'
                ),
            ),
            'title' => 'TITLE',
    	'sortable' => 'any',
    	'admin_box' => 'from'
        ) );

    to retrieve the connections i use:

    function get_options($base_id, $connection_type){
        $options = get_posts( array(
            'connected_type' => $connection_type,
            'connected_items' => intval($base_id),
            'nopaging' => true,
            'suppress_filters' => false,
            'orderby' => 'title',
            'order' => 'ASC'
        ) );
    
        return $options;
    
        }

    Thanks for this great plugin!

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

    [Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your code may now have been permanently damaged/corrupted by the forum's parser.]

  2. scribu
    Member
    Plugin Author

    Posted 1 year ago #

    Are they gone from WP-Admin too or just on the front-end?

  3. tmfrnz
    Member
    Posted 1 year ago #

    Both from front- and backend =(
    With v 1.4.1 all good.

  4. scribu
    Member
    Plugin Author

    Posted 1 year ago #

    I can reproduce the problem. It's related to the 'from_query_vars' / 'to_query_vars' args.

  5. scribu
    Member
    Plugin Author

    Posted 1 year ago #

    The connections show up fine for me in 1.4.3. Are you able to create new connections in wp-admin?

  6. tmfrnz
    Member
    Posted 1 year ago #

    Just updated the plugin to the latest version (1.4.3) on our test environment with the following result:

    - connections disappeared both in front- and backend
    - both for the FROM as well as the TO posts of the connection the FROM posts are listed as available connections
    - after having connected a post from the TO category to the FROM category the connections will not show neither front- nor backend.
    - interestingly when trying to add them again, the "Duplicate connections are not allowed." error message comes up, as if the connections have been established.

    sorry to not have better news for you and thanks again for looking into this. please let me know if i can be of any help.

    version 1.4.1 continues to work fine, so all good from our side for now.

    best regards,
    Timo

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.