Fix Error: Class 'Filter\StringFilter\MatchType' not found

Created on 7 March 2022, over 2 years ago
Updated 13 February 2023, almost 2 years ago

Problem/Motivation

When using some query filters in views, you get the following error:

Error: Class 'Filter\StringFilter\MatchType' not found in Drupal\google_analytics_reports\Plugin\views\query\GoogleAnalyticsQuery::Drupal\google_analytics_reports\Plugin\views\query\{closure}() (line 549 of web/modules/contrib/google_analytics_reports/src/Plugin/views/query/GoogleAnalyticsQuery.php)

Proposed resolution

The offending line is caused by this:

use Filter\StringFilter\MatchType;

which should be:

use Google\Analytics\Data\V1beta\Filter\StringFilter\MatchType;

Remaining tasks

  • ✅ File an issue
  • ✅ Addition/Change/Update/Fix
  • ✅ Testing to ensure no regression
  • ➖ Automated unit testing coverage
  • ➖ Automated functional testing coverage
  • ➖ UX/UI designer responsibilities
  • ➖ Readability
  • ➖ Accessibility
  • ➖ Performance
  • ➖ Security
  • ➖ Documentation
  • ✅ Code review by maintainers
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Release notes snippet
  • ✅ Release google_analytics_reports-4.0.0-alpha3

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

🐛 Bug report
Status

Fixed

Version

4.0

Component

Reports module

Created by

🇳🇿New Zealand dieuwe Auckland, NZ

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.

Production build 0.71.5 2024