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?
- The topic ‘Query returns empty when $from is pending even though $to is published’ is closed to new replies.