Re-Envisioned › Support › MB Relationships › pre_get_posts to get all posts connected to single object › Reply To: pre_get_posts to get all posts connected to single object
I am following the video EXACTLY and am still seeing errors. OMG this is so frustrating. Your video is perfect and is not throwing errors. I setup the freshest install and just installed metabox and mb relationships with custom post types built all in the same file. Made the relationships and ran the query on the default theme like your video. Still seeing the post type being stripped for certain functions like get_post_type_object. I actually think get_post_type_object is returning null since the post type is being sent as a string not an array or object. Is_scalar is exiting early for get_post_type_object.
See the screenshots. I am getting the exact same query you producing with post type being sent as a string.
Running WP 4.9.8 on Flywheel
PHP 7.2 and 7.0.3
Twenty Seventeen theme
Could that have anything to do with it?