The module is serious magic! But can somebody give a hand (sorry, the dumb me day) maybe?

The view is properly attached to node. But lost with supposedly simple thing: say the node is about beer(taxonomy term) and view should show anything filtered by "beer" (but not "coffee" or anything else). Arguments? Relationship?



artatac’s picture

Ditto - I have set up a view that has the node ID as an argument. Using Live Preview > display Defaults Arguments 51 > preview, I get exactly what I am expecting

But previewing the Entity Content in the same way - nothing appears - I attach screenshots plus demo site access

marko42’s picture

I am getting the same thing. I followed the screencast and I think I've translated everything to Views 3 - bundles and entities, etc.

The only thing I wonder about is that the contextual filter for the node reference field is listed as "Fields:"... not "Content:"... I guess that's the new structure? As you say, the Auto preview works well.

(I am going to close my previous ticket since I've advanced enough that this issue fits.)

scotself’s picture

After setting up the view, seeing success in the views preview, clear cache. Still seeing a small error when editing the view (see #1117008: Notices from eva_plugin_display_entity->pre_execute() in but doesn't seem to affect anything really.

That being said, here's my setup and hopefully it will help, at least for a similar, typical related nodes setup. Shouldn't be much different for other applications.

  • Two content types: One content is a person, the other is articles.
  • The view displays articles, which has a references field for "people mentioned in this article".
  • The articles will be attached to the individual peoples' nodes.

Entity Content Settings

  • Entity type = node,
  • Bundles = People
  • Not using the argument there because I need the relationship
  • Relationship is the reference field
  • Contextual Filters (arguments) = nid with the relationship

Hope that helps.

nordicmaterial’s picture

I achieved the same result as #4 in a slightly different way. (#4 didn't work for me)

  • 2 content types: Director and Movies.
  • Content type movie gets a CCK node-reference-field to Director. I name this field "field_ref_dir"
  • Several movies will show op on the Director page: "Movies by this director:"
  • Make a couple of Director nodes.
  • Make a couple of Movie nodes, choose a Director for each one.

Entity Content Settings

  • Entity type = node
  • Bundles = Director
  • Arguments:id
  • Now add Contextual Filters (arguments) = Content: Director (field_ref_dir)
  • Configure this contextual filter: Display all results for the specified field.
  • Save the view.
  • Surfing to the page of a Director, you should be able to see the movies he made.

Hope it's useful to anyone. Great module!!

dale386’s picture

Having issues? Take #3's (phrancescot) advice. I had the same issue as artatac -- 3 hours later I cleared all caches and everything worked! So frustrating. So much lost time.

yaworsk’s picture

I was having issues as well, here's what worked:

- I have events and registrations (registrations have a url reference to events)
- entity type = content
- bundles = events
- arguments = id, Use the ID of the entity the view is attached to
- contextual filters = registrations (my node reference field) key here for me was to provide a default value when the filter value is not in the url. I set this to provide a default value, content id from url. -- without this, my view didn't work.

Hope this helps someone.

BTMash’s picture

While I got things to work with content a while ago, I am trying to get this to work with taxonomy and the taxonomy displays but I'm finding a lot of difficulty in getting the view to show up - is it currently configured to only work with content or should it be working with all entities? I tried to get something from the view to show if there is no content but even that doesn't show up :/

trothwell’s picture

I seem to have a ton of issues using this and caching. No idea why but it decides to disappear constantly.

Marshcast’s picture

I've tried #3, #4 and your version, but none of them are working for me.

I have
- content-type: events
- content-type: article
- articles have event_ref field to link them to articles

in the view:
- filter criteria = published: yes (wanted to leave as much as poss open to try to get results)
- Entity content settings:
- type: node
- bundles: article
- Arguments: id
- title: yes (in the hopes that I'll see it at some point!)
- contextual filter: field_event_ref (nid)
- relationships - none at the moment - I've tried them, but can't get a result, also tried them without id in entity args, but no joy :(

As it is, I have a result in the views preview, but none if I enter an event nid number in the 'preview with contextual filters' box (i'm using 80 - i know it has articles related to it. I also get nothing on the related (referred to (event) node)

The 'related article' view field shows up in the article content-type fields (and is visible), but it's in the article - not in the event. I cant seem to get it to go in the event (where the articles should be showing. is this right?

I'm hoping someone can shed some light, i'm very confused :(!

hopeful, M. :)

BTMash’s picture

I ended up posting my issue as another issue (as it is code related).

@Marshcast, for the contextual filter when you have field_event_ref (nid), are you setting where it would get the argument from if it is not provided? It should be set to get a default argument which would be the node id from url. That way, the article should show up on the event page. Also when you go to the manage fields page for your event, do you see the views field showing up in there?

My other guess is that the bundle that you should be attaching should be 'events' and not 'article' as the bundles is what this view would be getting attached to.

iancu35’s picture

Assigned: Unassigned » iancu35

How can I use EVA module to display an embedded view in this scenario:
- article contains a page_ref field (node reference type), for related pages

I want to display kind of a related view, to:
- show all articles from the same related page
- show other articles from the same related page, except the article nid, in the URL

Partial solution:
I created a view with 2 contextual filters (arguments):
- 1st arg: page_ref - settings: when no value in URL: provide default value: content id from URL(page id); when value is provided: basic validation, if not: hide view
- 2nd arg: nid - settings: when no value in URL: provide default value: content id from URL(article id); when value is provided: basic validation, if not: hide view; more: exclude

This view works fine on master!

I added an Entity Content display (it came from EVA module), with both the same arguments from master.
- bundle: page
- arguments: ID of the entity the view is attached to (i.e page_ref)
- 1st arg: page_ref - works OK - displays all articles relating to the same page in the URL
- 2nd arg: nid - doesn't filter anything - displays all articles relating to the same page in the URL, as above - the embedded view is not sensitive to the 2nd arg

PS: I have this problem in a related block and I hoped to solve this using EVA since is working as a view :-(

Any clue will be rewarded with a big hug :-)
Many thks.

yaworsk’s picture

Assigned: iancu35 » Unassigned

Hi iancu35,
i think you're question should really be posted in the forums and not the issue queue as you are looking for specific support. Also, unless you were planning on providing the documentation, i don't think you should have assigned this ticket to yourself.

that said, i have a video tutorial on my site about using eva / node references in d7 that may help you.

iancu35’s picture

Hi yaworsk,

Many thanks for your advice. Appreciate it :)

I watched both video, your and Bob's, but still no clue on how to achieve what I want.

I have an article having a field: related_page (type: node reference, widget: reference from URL).

I made a view with an Entity Content display
- bundle: page
- arguments: ID of the entity the view is attached to (page)

I've solved the 1st step:
- to show all articles from the same related_page nid; 1st contextual filter: related_page nid

But fail to do the 2nd one:
- click on an article, to show other articles from the same related_page, excluding the article nid, in the URL; 2nd contextual filter: article nid

The 2nd filter doesn't work at all.

I guess EVA only fetch the 1st arg: related_page nid, but not the 2nd arg: article nid - maybe because they are 2 different content types nids: page & article

Can you help me a bit, please, maybe make a short video cast on your site, too.

Thanks. again :)

ryantollefson’s picture

I was having issues where the preview would work, but I wouldn't see the view attached to the node. I cleared caches, double checked everything, but still couldn't get the table attached to the node view. Turns out I forgot I had been using display suite, and I had to enable the field under Manage Display for that content type.

Hope my dumb mistake helps someone else. :)

badrun’s picture

Status: Active » Fixed


Thank you for the advice. It works for me.

adamdicarlo’s picture

Great screencast at uses EVA to show a list of registerations as an attached view on an event node.

l_o_l’s picture

The screencast by yaworsk is really very helpfull. Now I see whats wrong: if yaworsk selects an item for 'contextual filters', he has also the options with 'Fields: xxxxxx'. But I do not see those ? Strange.

I run on Drupal 7.7 with all required modules updated to the latest (I checked with Modules->Update).

Then I retried again with a fresh Drupal 7.7 install. Only added ctools plus views with drush. With this I followed the steps in the screencast. The 'Fields: xxxxx' are still not visible, only 'Content: xxxxx'. Because I cannot get this to work with only 'Content: xxxx', I assume the 'Fields: xxxxx' must be used.

Anybody any idea why I cannot see the 'Fields: xxxx' options ? Or how I can add them ?


If I now choose 'Content: field_node_reference', then this works. Strange, because I am sure I tried this before. Maybe not in combination with the 'clear cache' as mentioned in the screencast. That is indeed really important.

And I still do not understand why I don't see the 'Fields: xxxxx' stuff ?

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

karlos007’s picture

Status: Closed (fixed) » Active

Please can someone check and tell me how to set up EVA or if it is some bug for displaying: children terms of term.
Create view of Terms. Only thing is Field: title. No filters.

1) If I do that as block display then it works well.
2) If I put argument to live preview of entity content then i see result (same settings as 3) ).
3) If I create Entity content display, and set:
Entity content settings
Entity type: Taxonomy term
Bundles: Categories
Arguments: id
Show title: Yes

Contextual filters
Taxonomy term: Parent term
=> Provide default value => Taxonomy term ID from URL => Load default filter from term page

this does not show at taxonomy term page. Of course I flushed caches, i went to vocabulary - manage display.
I also tried: Custom display settings and check Term page and set displaying for that...

I use successfuly EVA with nodes etc, i was using arguments and views_attach at D6 so i think this seems like a bug.

BTMash’s picture

@karlos007, Are you using the 1.1 branch? It should all be working now.

Just to provide some context on the whole thing, this is actually a core drupal bug: see (or maybe even help out with) #1067120: Missing hook_taxonomy_term_view() or hook_entity_view() when viewing a term

karlos007’s picture

eva 7.x-1.1, Drupal 7.8, views 7.x-3.0-rc1
It really seems like issue which you posted - so related to core. Will take a look on it probably.

erald’s picture

Not sure if this belongs here but trying to find a way to use EVA for the different views I need. The situation:
Have a main video node with a reference field to video sub nodes. This sub node holds a video of a certain type.
I made a view displaying the main node with all referenced sub video nodes this is working, but want to have different views where I display a main video with let us say video sub type one and two. Another view with sub videos nodes three and four.

I noticed I can only attach one entity view to a bundle. I tried to pass an argument to the entity view via url but this does not work.
Am stuck here how to create a the two different views: main node with referenced subnodes of type one and two and a main node with referenced sub nodes of type three and four. (will have even more than two different views)

would appreciate some input here.

haggins’s picture

Is there any way to show attributes (title, price etc.) of commerce products which are referenced by the same node at which the eva view will be attached to?

Product reference field: field_product_ref (multiple selection allowed)

Currently, I can only do the following:

  • Entity type = node
  • Bundles = myContentType
  • Arguments:id

Then add Contextual Filters (arguments) = Content: Products (field_product_ref)
Configure this contextual filter: Provide default value => Content ID from URL.

Of course, that results in showing exactly that product which has the same ID as the node has. Instead I would need an option for Contextual Filters like "is referenced by node:id".

Do you have any idea?

My ultimate goal is to show one add to cart form for multiple products attached to the node which is referencing the products. That can be done with commerce add to cart extras (but still needs to be attached to the node with eva).

mkadin’s picture

Status: Active » Closed (fixed)

Instead of passing the id of the node in as an argument. Use the tokens option under argument. Then you can use the token for the node reference. That should handle that for you.

I'm going to close this issue as its become all over the map. If you want to ask a question about how to use EVA, please open a new support request issue.