WordPress.org

Forums

Posts 2 Posts
Query returns empty when $from is pending even though $to is published (1 post)

  1. pankipan4e
    Member
    Posted 1 year ago #

    I have a connection from courses to chapters and when all are published, the query is alright. However, when course is pending and chapter is still published, the request string has an inner sub-select that has AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private') which is the cause for the empty result. That part is generated in /core/query.php line 172: $part .= " AND $wpdb->p2p.$to IN ($search)"; and line 169: $search = $this->do_other_query( $directed, 'current' ); but I seem to lose myself if I go deeper to try and find the source of that select.

    Can anyone please help and see if I can get the same result back even when CPT is not published?

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Posts 2 Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic