Sounds like a conflict between Matomo and some component of your WordPress setup.
Connecting via PHP API is the fastest solution, but also fragile because two quite complex systems (WordPress and Matomo) are connected on code base. E.g., depending on used plugins etc. this may lead into duplicate class names and similar issues.
You can enable the WordPress debug mode and check the occuring error message. (https://codex.ww.wp.xz.cn/Debugging_in_WordPress) Or have a look into your error.log, usually the error message (should be a FATAL ERROR or an EXCEPTION) should appear there.
Hi braekling,
Thanks for your response. You were right of course. There’s a conflict with Cookiebot it seems.
I have to admit I am having a hard time reading this error message.
I’d greatly appreciate your help.
Fatal error: Uncaught ArgumentCountError: Too few arguments to function DI\Definition\Resolver\FactoryResolver::__construct(), 1 passed in /var/www/vhosts/ezmobility.de/httpdocs/wp-content/plugins/cookiebot/addons/lib/ioc/php-di/php-di/src/DI/Definition/Resolver/ResolverDispatcher.php on line 104 and exactly 2 expected in /var/www/vhosts/ezmobility.de/httpdocs/matomo/vendor/php-di/php-di/src/DI/Definition/Resolver/FactoryResolver.php:47 Stack trace: #0 /var/www/vhosts/ezmobility.de/httpdocs/wp-content/plugins/cookiebot/addons/lib/ioc/php-di/php-di/src/DI/Definition/Resolver/ResolverDispatcher.php(104): DI\Definition\Resolver\FactoryResolver->__construct(Object(DI\Container)) #1 /var/www/vhosts/ezmobility.de/httpdocs/wp-content/plugins/cookiebot/addons/lib/ioc/php-di/php-di/src/DI/Definition/Resolver/ResolverDispatcher.php(73): DI\Definition\Resolver\ResolverDispatcher->getDefinitionResolver(Object(DI\Definition\FactoryDefinition)) #2 /var/www/vhosts/ezmobility.de/httpdocs/wp-content/plugins/cookiebot/addons/lib/ioc/php-di in /var/www/vhosts/ezmobility.de/httpdocs/matomo/vendor/php-di/php-di/src/DI/Definition/Resolver/FactoryResolver.php on line 47
Fatal error: Uncaught ArgumentCountError: Too few arguments to function DI\Definition\Resolver\FactoryResolver::__construct(), 1 passed in /var/www/vhosts/ezmobility.de/httpdocs/wp-content/plugins/cookiebot/addons/lib/ioc/php-di/php-di/src/DI/Definition/Resolver/ResolverDispatcher.php on line 104 and exactly 2 expected in /var/www/vhosts/ezmobility.de/httpdocs/matomo/vendor/php-di/php-di/src/DI/Definition/Resolver/FactoryResolver.php:47 Stack trace: #0 /var/www/vhosts/ezmobility.de/httpdocs/wp-content/plugins/cookiebot/addons/lib/ioc/php-di/php-di/src/DI/Definition/Resolver/ResolverDispatcher.php(104): DI\Definition\Resolver\FactoryResolver->__construct(Object(DI\Container)) #1 /var/www/vhosts/ezmobility.de/httpdocs/wp-content/plugins/cookiebot/addons/lib/ioc/php-di/php-di/src/DI/Definition/Resolver/ResolverDispatcher.php(58): DI\Definition\Resolver\ResolverDispatcher->getDefinitionResolver(Object(DI\Definition\FactoryDefinition)) #2 /var/www/vhosts/ezmobility.de/httpdocs/wp-content/plugins/cookiebot/addons/lib/ioc/php-di in /var/www/vhosts/ezmobility.de/httpdocs/matomo/vendor/php-di/php-di/src/DI/Definition/Resolver/FactoryResolver.php on line 47
Yep, looks like CookieBot also defined a class called FactoryResolver within the same namespace. Shouldn’t be a problem if both classes are doing the same, but obviously the definitions are different.
Cookiebot is running a much older version of PHP-DI (5.0 while Matomo is running 5.4.6), so maybe it would already help to ask the Cookiebot developer to update PHP-DI to the latest version. (Maybe you can do the update on your own on your machine, but I’m not sure if this may cause any incompatibilities with Cookiebot & you have to re-do this every time Cookiebot is updated until they switch to an up-to-date version.)