Views filter string not working

Created on 6 March 2023, over 1 year ago
Updated 27 June 2023, over 1 year ago

Problem/Motivation

Some queries with views filter not working.

I'm using a fullPageUrl (G4) filter with operator contains.
I get the following error:

Error: Using $this when not in object context in Drupal\google_analytics_reports\Plugin\views\query\GoogleAnalyticsQuery::Drupal\google_analytics_reports\Plugin\views\query\{closure}() (line 584 of modules/contrib/google_analytics_reports/src/Plugin/views/query/GoogleAnalyticsQuery.php).

Steps to reproduce

  1. Edit the views Google Analytics Summary
  2. Edit the attachment Top Pages
  3. Add a filter Full page URL
  4. Use the operator contains with a string
  5. Generate the preview
🐛 Bug report
Status

Needs review

Version

4.0

Component

Reports module

Created by

🇮🇹Italy marco.aresu Cagliari

Live updates comments and jobs are added and updated live.
  • views

    Involves, uses, or integrates with views. In Drupal 8 core, use the “VDC” tag instead.

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.

  • First commit to issue fork.
  • 🇺🇞United States zenphp Norwood, NY

    There are a couple of levels of Lambda functions contained within the GoogleAnalyticsQuery::query() method. They have all been defined as static lambdas, but buried within them is a call to $this->t().

  • @zenphp opened merge request.
  • Status changed to Needs review over 1 year ago
  • 🇮🇹Italy marco.aresu Cagliari

    Operator dimension filters are wrong.
    I fixed operator as described in this article
    I fixed these operators.

    1. contains: =@
    2. not: !@
    3. regular_expression: =~
    4. not_regular_expression: !~
Production build 0.71.5 2024