Related block by entity reference I have a 2 content types. 


Article
Page


and the Article content type can reference pages from an entity reference field.

Now I want to display a block on Article nodes that have a same reference.

So I tried this: 


Create a views block listing Articles.
Add some fields.
Add a relationship field_page_reference: Content
Add contexual filters of Content Id and provide default value to Content Id From URl and Specify validation criteria set to Content and select article.


But it doesn't work? Any idea?
You're on the right track, but you're missing another Relationship. 

You've added the Relationship that points to a referenced Page. Now you can show that Page info in your views, but that isn't what you want. You want to show all other articles that reference that page (siblings). 

To do that you need to add another Relationship that goes in reverse, from Page back to article: Content using field_page_reference and make it use the first Relationship (this is where the matching is happening!). 

Then modify your ID Contextual filter to use the second Relationship. 

Now you'll have a list of all articles that reference the page that is referenced on the article you're currently viewing. 



That includes the current article BTW, so if you want to exclude it from the list you have to add another ID Contextual filter "Content Id From URl" but don't use any Relationships and under More select Exclude.