Here is what I am after:

I have an entity reference field that references nodes.

I want to build a view that shows a list of all revisions that have this field referencing a given entity.

Here is what I have tried so far:

New view displaying content revisions. New relationship: Referenced entity. New contextual filter NID using the relationship.

Now this works, but only returns one result: the current node that is referencing the nid argument in the contextual filter. I want it to list all revisions that have historical data referencing the NID in the argument of the contextual filter.

Has anybody built a view that uses a contextual filter to show revisions that reference a given NID by an entityreference field?

1 Answer 1


So if I am reading this correctly, Content Type A references Content Type B. You want to show all revisions of Type A nodes that reference a certain Type B node.

  1. Contextual Filter: Content: Reference Field for Type B Provide Default: ___
  2. There are two revision relationships.. ID and NID. The one with ID is provided by default. Add the one for NID and for its relationship, choose the one with ID.
  3. After it's added, move it above the ID relationship. This is vital and I don't even know why..
  4. Make sure your Title field doesn't use any relationship.

Now, all revisions that reference Type B will show and be linked properly.

If anyone can explain the significance of reordering the relationships, please post in the comments. I spent far too long working on this a few months ago and a reason would be great!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.