I add relationship field(post type: attachment & Location taxonomy term) for custom taxonomy.
First, I didn’t get any post(attachment) selected for custom taxonomy with relationship field.
Second in admin side, when I select attachment for that taxonomy & refresh the page it shows me php error Trying to get property of non-object in core\fields\relationship.php on line 496
I check that line. It’s problem in $post_type_object variable, it’s null.
I got displayed selected attachment in admin side. The error only occurs when I select Elements setting in Custom Field setting.