Drupal google analytics counter module failing cron run hence data is not fetched

56 Views Asked by At

The plan is to use the google analytics counter module to show the view count of some belonging to a certain content type. So i followed the documentation that is being provided (https://www.drupal.org/docs/contributed-modules/google-analytics-counter) Now after following the steps and doing the necessary configurations when i am running cron i am getting this error

`Warning: Trying to access array offset on value of type null in Drupal\Core\Cron->processQueue() (line 264 of core/lib/Drupal/Core/Cron.php).
Drupal\Core\Cron->processQueue(Object, Object) (Line: 233)
Drupal\Core\Cron->processQueues() (Line: 162)
Drupal\Core\Cron->run() (Line: 75)
Drupal\Core\ProxyClass\Cron->run() (Line: 272)
Drupal\admin_toolbar_tools\Controller\ToolbarController->runCron()`

So i checked out the code and what i figured out is when the cron is run, and the worker is google analytics counter the pluginid,plugindefintion, and the configuration is not getting passed and hence $lease_time = $worker->getPluginDefinition()['cron']['time']; this is receiving null value, and the cron run is stopped abruptly and it's throwing error/warning mentioned above.

1

There are 1 best solutions below

0
Stefan Borchert On

This has been fixed in issue #3387501. Please update to the latest release (4.0.3 as of today).