To reproduce: Add filter, select view to filter by. Apply.

Additional details:
Notice: Undefined property: view::$base_field_alias in views_filter_view_get_items() (line 40 of views_filter_view.module).
Notice: Undefined offset: 1 in views_filter_view_handler_filter_view->query() (line 55 of views_filter_view_handler_view.inc).

Comments

13rac1’s picture

Status: Active » Needs review
StatusFileSize
new710 bytes

Using the alias if available, and using $base_field otherwise seems to work correctly. I'm not an expert on Views so there may be a better method. Either way, this module works correctly now. Thanks!

dawehner’s picture

+++ b/views_filter_view.moduleundefined
@@ -36,8 +36,14 @@ function views_filter_view_get_items($name, $display) {
+        $base_field = $view->base_table;

Using the base_table as field seems simply wrong. What about using $this->view->query->base_field ?

deciphered’s picture

StatusFileSize
new4.39 KB

Ok, so I also had this issue, but the problem for me was that I was using a User view with a Representative Node relationship as the View filter for a Node view, so the base field of the User view was UID where the data that needed to be returned was NID.

To resolve the issue I did a fair amount of work to the module so that the base field of the View that is to be filtered is sent to the View that is being used as the filter.

I tested it with a quick Node to Node view setup as well as my User to Node view and it worked well.

Patch attached.