allow user to choose from his own referenced nodes I have two content types: business listing, product listing.
"Product listing" has an Entity Reference field. This field points to the nodes of "business listing".
I want to allow user to choose from his own "business listing" nodes (during adding a "product listing" node).
I have created a view to list the nodes of "business listing" type and have Added a Entity Reference display to the view. Then have selected the view Under "Entity selection".
Now, I have a problem in adding proper contextual filter.
I have added a contextual filter of "Content: Author Uid" and selected "provide default value".

a) if I select "USER ID from logged in user" as default value:

This solution will break if an admin is editing the node. The field will then show only nodes the current user (admin) has created.

b) if I select {"User ID from URL" and "Also look for a node and use the node author"}:
This solution will break if an user is adding a new node. The field will not show any nodes!

How can I achieve this?
No need to write any code for this.
Use reference_option_limit module properly in your content types &amp; when you create view and provide default value 'User ID from URL' - Please mark the checkbox 'Also look for a node and use the node author' to true.

Enjoy !!!