Support » Plugin: Posts 2 Posts » [Plugin: Posts 2 Posts] problem with revisions

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author scribu

    (@scribu)

    Try deactivating all other plugins and see if the problem persists. Furthermore, try switching to the bundled theme, currently Twenty Ten.

    If still no go, please paste the code you are using to register the connection type.

    Twansparant

    (@twansparant)

    I have the same issue. I turned off revisions for most of my custom post types, but for some I want to keep them.
    When I make my connection types ‘reciprocal’ and edit one of the posts, I get a list of 100 posts with the text ‘inherit’ when clicking ‘view all’, while I only have 2 posts that can be connected, the rest are (old) revisions of those 2 posts.

    I tried using ‘post_status’ in your new ‘order_pages_by_title’ function but that doesn’t work:

    function order_pages_by_title( $args, $context ) {
    	if ( 'posts_to_pages' == $context->id ) {
    		$args['orderby'] = 'title';
    		$args['order'] = 'ASC';
    		$args['post_status'] = 'publish';
    	}
    	return $args;
    }
    add_filter( 'p2p_connectable_args', 'order_pages_by_title', 10, 2 );

    I also disabled my plugin ‘Delete-Revision’ but that didn’t make a difference either.
    How can I prevent revisions from showing up as available connection posts in the admin box without coding the admin box myself?

    Thanks for your help!

    Plugin Author scribu

    (@scribu)

    Are you sure your connection type is called ‘posts_to_pages’?

    Twansparant

    (@twansparant)

    Oh duh… I missed that one, great it works now! 🙂
    One thing I noticed though after today’s update to 1.0.1, my metaboxes are not in the main edit area anymore, the moved to the right side, even when I set all my connections to ‘context’ => ‘advanced’.
    Any idea? Thanks again

    Plugin Author scribu

    (@scribu)

    Twansparant

    (@twansparant)

    And thanks again! It works again 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Posts 2 Posts] problem with revisions’ is closed to new replies.