As the the view field is global, it may be added in all view area, like header, footer or empty text. In such cases, the arguments are not set correctly.
The patch below fixes that (in a proper but quick way, see below).
On the other hand, I think the view field handler should be different than the area handler. Like that the code could be simpler and edge cases handled more easily.
If you need some help on that, I would be glad to become a co-maintainer.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | views_field_view-view-arguments-ignored-in-area-1525420-5.patch | 904 bytes | b-prod |
| #1 | views_field_view-arguments-ignored-on-area-1525420-1.patch | 1.73 KB | b-prod |
Comments
Comment #1
b-prod commentedPatch attached
Comment #2
damiankloip commentedIs this with query aggregation on or off? Will have a look at the patch shortly!
Comment #3
damiankloip commentedI have just committed a patch that should fix this. I don't think we need to create a mock view object. We can just populate the values object at the start of render if we need to.
Comment #5
b-prod commentedThis is not fixed in the new version. I set this issue as critical because the bug becomes aged and is pretty simple to test and fix.
To reproduce such bug, just create a view (content) with 2 displays:
In the first display, create in the header or footer a views field that uses the second display and pass the [tid] as argument.
You expect to see a table, followed by an HTML list containing the node titles.
But you will only see the table, because there are no field handlers loaded to use with the tokens.
I saw fixed a part of the code in the previous patch, about empty values in areas. So the only issue to fix now is simply to ensure that the field handlers are loaded before trying to make the replacements.
Comment #6
vladimirausThank you for your contributions.
Drupal 7 is no longer supported.
Closing the issue.