Ready to get started?Download WordPress


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

  1. pankipan4e
    Posted 8 months 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?



You must log in to post.

About this Plugin

About this Topic