Both with the aggregation method enabled and in get_token_values() the argument special tokens "!" and "%" are not available.

So either they should be removed from the available tokens or the values should be get from the argument.

CommentFileSizeAuthor
#9 parent_view.txt4.59 KBdagmar
#9 child_view.txt4.59 KBdagmar
#1 1439672.patch1.2 KBdagmar

Comments

dagmar’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new1.2 KB

What about this?

scoff’s picture

if I use [!nid] as an argument I get "recursion stop!"
if I use static value 8 (it's nid of one of the nodes) I get static output of child nodes (target view expects parent_id contextual filter)
So the token doesn't work obviously.
That recursion error is also looks unexpected.

damiankloip’s picture

This seems to be working ok for me (or atleast I think). Can someone export a view of theirs that isn't working? This is only when aggregation is turned on?

dagmar’s picture

No, it is not working for me. Even more, I have used that patch to fix my problem.

As far I can see in the source code, there is no place where the !1, !2 and !3 are being processed at all.

The patch do this, after search for a value in the $view->field[...] the function will look if the token has a value in for the arguments of parent view.

damiankloip’s picture

It seems the the original post and comments and #1 are about one thing, and #2 is another issue in that case? No, they are not being processed as you describe.

dagmar’s picture

Sure, I was talking about the patch posted in #1 related to the main issue. IMO #2 is caused by an error in the view design and should be discussed in other thread.,

damiankloip’s picture

I agree with that. @scoff, I think you issue is different to this one, can you please start a new issue? and prefereably provide an export of your view.

damiankloip’s picture

@dagmar: Do you have an view you can export that shows this behaviour?

dagmar’s picture

StatusFileSize
new4.59 KB
new4.59 KB

I'm attaching two views. They are not the same that I'm using but can be used to replicate the problem.

The Parent view will list all the user of the site.

The child view is used as a header of the parent view and it displays two nodes that were created by the author defined in the arguments of the parent view.

I know this doesn't make sense, but again is for testing purposes and it shows that the !argument token is not working.

When you go to /content-by-users/admin (where admin is a name of a valid user) the parent view will be filtered showing only the admin user, but the child view will not be recibe 'admin' as a argument, and as you can see, the parent view is configured to pass the first argument to the embeb view.

I hope this can help to replicate the problem.

damiankloip’s picture

Assigned: Unassigned » damiankloip

@dagmar: awesome thanks :) I will try this out later on, or tomorrow.

damiankloip’s picture

I have just given this a quick test, and it seems to work fine. I might just test a bit more before committing.

damiankloip’s picture

Status: Needs review » Active

Thanks all for your help and input, committed a modified patch to 7.x: http://drupalcode.org/project/views_field_view.git/commitdiff/fa1fcb4

damiankloip’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

capellic’s picture

Thank you. The patch works beautifully.

capellic’s picture

Issue summary: View changes

Add some information