Incompatible with Group 3.x

Created on 8 May 2023, almost 2 years ago

Problem/Motivation

If I attempt to install this module on a site running Group 3.x (in my case, specifically 3.0.0) certain admin pages, which are modified by Configuration Views, no longer load and instead throw the following error: "The website encountered an unexpected error. Please try again later."

Steps to reproduce

  1. Set up a new Drupal 10 site and install / configure the group module (3.x branch)
  2. Visit /admin/content (a view) and note the page loads fine
  3. Visit /admin/structure/types (not currently a view) and note the page loads fine
  4. Now install Configuration Views
  5. Visit /admin/content (a view) and note the page still loads fine
  6. Visit /admin/structure/types (NOW A VIEW) and note the page will not load
  7. You should see the message "The website encountered an unexpected error. Please try again later."
  8. The issue starts on line 372 in the group_views_query_alter function in group.module

More Details

For views provided by Drupal core, Line 372 sets the $view->build_info['query'] item properly. But for views provided by the Configuration Views module this line does nothing. The $view->build_info['query'] item remains an empty string. As a result, line 376 sets $query to an empty string for these views provided by the Configuration Views module. As a result, line 378 (where we attempt to call $query->addMetaData) fails.

Proposed resolution

Unsure how to fix. I'm not sure if the group module is making an assumption about the structure of the provided $view and $query parameters that isn't always true or if the new views provided by Configuration Views are not properly formatted.

Remaining tasks

Determine if the group code needs an update or if the Configuration Views module needs to alter the data structure for their views.

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Related Issue (Group)

https://www.drupal.org/project/group/issues/3358525 🐛 Incompatible with Configuration Views / Content Model Documentation Active

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇨🇦Canada JayDarnell Guelph, Ontario

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024