Problem/Motivation
Error: Call to a member function getRowCount() on array in Drupal\google_analytics_counter\GoogleAnalyticsCounterAppManager->queryTotalPaths() (line 469 of /home1/demo-project/public_html/modules/contrib/google_analytics_counter/src/GoogleAnalyticsCounterAppManager.php).
I get this error on cron run
| Comment | File | Size | Author |
|---|
Issue fork google_analytics_counter-3510521
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
steffenrI had a look into the code. It looks like the cache handling in method
gacGetFeed.This method should return RunReportResponse, but returns an array in case the results are cached.
The change was introduced in https://git.drupalcode.org/project/google_analytics_counter/-/commit/fbb...
Comment #3
steffenrComment #5
steffenrComment #6
nicholassThank you! - Given that I introduced this error it seems only proper I test it. Yeah I didn't catch it since it involved having to wait long enough to have a cached response, but I was getting the same error today when developing locally, a work around was to clear cache before running cron.
But I tested the patch and it works.
Comment #7
nicholassComment #8
nicholassFor me it logged as having invalid or empty data. So I do wonder if the cache-data is working correctly... I may dig into this a bit deeper today.