Error: group_views_query_alter() Call to a member function addMetaData()

Created on 15 October 2020, about 4 years ago
Updated 31 August 2023, about 1 year ago

Problem/Motivation

When I use https://www.drupal.org/project/config_views to Create a view of webform,
There is an error "Error: group_views_query_alter() Call to a member function addMetaData()" in drupal log .

  • drupal-core-version:8.9.4
  • group-version:8.x-1.3
  • config_views-version:2.0.0-beta1
  • webform-version:8.x-5.20

Steps to reproduce

  1. Install https://www.drupal.org/project/config_views
  2. Create a view of webform,and access its view config page
  3. go to /admin/reports/dblog,and you will find error log

Proposed resolution

I could not go into "addMetaData" function in Eclipse.
so , Maybe we used a wrong function in group.module at line 285~286?

    $query->addMetaData('entity_type', $entity_type_id);
    $count_query->addMetaData('entity_type', $entity_type_id);
🐛 Bug report
Status

Needs work

Version

2.0

Component

Code

Created by

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States maxstarkenburg Washington, DC

    I was getting this error when just trying to visit /admin/config/media/image-styles to create a new image style (don't know if other variables factored in). The patch in #2 didn't apply for me (the site's apparently on group 3.1), so I rerolled it. Thanks!

  • 🇧🇪Belgium kristiaanvandeneynde Antwerp, Belgium

    Config entities may have entity query support, but they don't run any actual SQL query. So my best guess is that config_views overlooked this and still allows the query alter to run without the right metadata. They could work around this by adding empty query objects in there, but that would obviously lead to weird situations where people try to use said query objects.

    Either way, at the risk of playing issue queue ping pong, carefully moving this to that module's issue queue as it seems really likely that's where the metadata went missing.

  • 🇺🇸United States jascote

    This issue just moved over from Group module issue queue. It looks like a duplicate of https://www.drupal.org/project/config_views/issues/3358929 🐛 Incompatible with Group 3.x Needs review

Production build 0.71.5 2024