I have multiple arguments on a field_view: first argument is a taxonomy_term_reference field, the second is the nid.

As I discovered, that the wrong items are displayed, I digged a bit in the code and discovered, that both values in $args array are the same; they are both the nid. The reason for that is, that both field_aliases are set to "nid" .

UPDATE: for some reason the field_alias is always nid, whatever field I use for the argument :/

Comments

damiankloip’s picture

Hmmm, I'm not getting this problem. Are you using the dev version? Does your view (that's in he view field) work ok then you pass args into the view preview? Can you export your view maybe?

if the token doesn't match/hasn't found the field it wouldn't add anything, not sure if that has anything to do with it?

bachomp’s picture

I am having the same issue.

The subview returns the results it should when both params are passed.

The Parent view returns the correct results with exception to the subview.

below is the export of both views. The subview is first.

edit: exports attached in next post.

damiankloip’s picture

Version: 7.x-1.x-dev » 7.x-1.0-rc1

Sorry, not sure what you mean?! So the sub view is correct?

Next time, can you post the view exports as an attachment? Lots of clutter on comments otherwise :)

bachomp’s picture

StatusFileSize
new19.94 KB
new19.39 KB

Both views work independently of each other however when you embed the misc view into the attendance view the misc returns no data.

Parent View: attendance
Sub View: misc

Drupal 7.10
Views: 7.x-3.1
Views Field View: 7.x-1.0-rc1

setvik’s picture

Similar issue.

I'm setting the argument for the view field to a node field in the view (using tokens)...

The problem is that:

$view->field[$argument]->field_alias;

is nid so the token value is never correct.

Pretty sure the attached patch is not the correct way to approach this. It worked in my case though, so if anyone needs a quick, temporary fix.

damiankloip’s picture

This is done slightly differently now, but should work ok. It may cause some complications with query aggregation turned on, but without this should be more reliable.

damiankloip’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

updating text