Enabling Matomo display extender causes PHP Fatal error

Created on 19 January 2023, almost 2 years ago
Updated 24 January 2023, almost 2 years ago

Problem/Motivation

I successfully upgraded Matomo to 1.20 on 3 websites without problem. However, on the fourth site, it caused a PHP fatal error under.

Steps to reproduce

1. Enable/upgrade to Matomo 1.20
2. Enable the Matomo Display extender on /admin/structure/views/settings/advanced
3. Try to load any page and see the following errors:

PHP Fatal error: Uncaught TypeError: Cannot assign null to property Drupal\matomo\Plugin\views\display_extender\Matomo::$facetsManager of type Drupal\facets\FacetManager\DefaultFacetManager in /web/modules/contrib/matomo/src/Plugin/views/display_extender/Matomo.php:54
Stack trace:
#0 /web/core/lib/Drupal/Core/Plugin/Factory/ContainerFactory.php(21): Drupal\matomo\Plugin\views\display_extender\Matomo::create(Object(Drupal\Core\DependencyInjection\Container), Array, 'matomo', Array)

4. Uncheck the box to allow the site to function again.

NOTE: I cannot reproduce this error locally (PHP 8.1.2) and I only see it on one production site (running PHP 8.1.9). I don't see anything obviously wrong with the code on line 54, but I thought I'd open this just in case others encounter it, too.

πŸ› Bug report
Status

Fixed

Version

1.20

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States mtift Minnesota, USA

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