WordPress.org

Ready to get started?Download WordPress

Forums

Posts 2 Posts
problem with revisions (7 posts)

  1. gasparking
    Member
    Posted 3 years ago #

    Since the last version, when i try to connect posts, the admin box shows me a list of all the revisions of the same post.

    Any idea ?

    Eric

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

  2. scribu
    Member
    Plugin Author

    Posted 3 years ago #

    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.

  3. Twansparant
    Member
    Posted 2 years ago #

    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!

  4. scribu
    Member
    Plugin Author

    Posted 2 years ago #

    Are you sure your connection type is called 'posts_to_pages'?

  5. Twansparant
    Member
    Posted 2 years ago #

    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

  6. scribu
    Member
    Plugin Author

    Posted 2 years ago #

  7. Twansparant
    Member
    Posted 2 years ago #

    And thanks again! It works again :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic