Found this problem on my 'real' site. so I set up a fresh install of drupal 8 and tried there. got the error to reproduce.

Setup:
(make sure all errors visible) /admin/config/development/logging
Followed the steps in https://www.drupaleasy.com/video/2016/04/using-group-module-administrato...
(Created some users, a few groups, and an 'article' piece of content and article node assigned to a group

Then installed -TWO- available content plugins.

Made an 'article' assigned to a group

Warning appears on the groups node page group/{groupid}/nodes:
Warning: Illegal offset type in isset or empty in views_query_views_alter() (line 663 of core/modules/views/views.module).

First line of backtrace points to:
views_query_views_alter(Object, NULL, NULL) (Line: 501)

If i uninstall the second available content plugin, warnings go away.

Comments

mu5a5hi created an issue. See original summary.

aamouri’s picture

Hello mu5a5hi,

I have the same problem.
I will try to find a solution for this bug

Thx

achton’s picture

This has to do with the way the join is prepared in GroupContentToEntityBase->query() where the arguments provided to Views (views_query_views_alter()) end up being an multidimensional array. This means an array is passed to isset() as a parameter, which obviously breaks.
Example:

 [node_field_data_group_content_field_data] => Array
        (
            [join type] => LEFT
            [table] => node_field_data
            [alias] => node_field_data_group_content_field_data
            [condition] => group_content_field_data.entity_id = node_field_data_group_content_field_data.nid AND group_content_field_data.type IN ( :views_join_condition_0[] )
            [arguments] => Array
                (
                    [:views_join_condition_0[]] => Array
                        (
                            [0] => group-group_node-event
                            [1] => group-group_node-news
                            [2] => group-group_node-page
                        )
                )
        )

The relevant code from GroupContentToEntityBase->query():

      $def['extra'][] = [
        $this->getJoinFieldType() => 'type',
        'value' => $group_content_type_ids,
      ];

I'm honestly not sure how to fix this. Views' documentation for the Join handler indicates that 'value' may be an array, and will activate the IN operator, which it does here.

achton’s picture

Ah, this seems to be a Views bug after all - see #2744069: views_query_views_alter() does not handle IN queries.

achton’s picture

kristiaanvandeneynde’s picture

Status: Active » Closed (works as designed)

Yeah this is broken in core right now :)

Thanks for the investigation though, achton. Sorry I couldn't get to this issue earlier to save you the trouble.

rogertcd’s picture

Thanks achton the patch works for me