Critical error when activating plugin

Hi guys. I’m getting a critical error when activating version 1.1.1 of the plugin. The error causes my entire site and wp-admin to become inaccessible so I have to manually delete the plugin folder to restore access.

I’ve tried disabling all other plugins but the problem persists. I’ve also attempted replacing the content of wp-content/plugins/matomo/classes/WpMatomo/Db/WordPress.php as per this post.

Here the error details I received via email:

WordPress version 5.4.1
Current theme: Eveland (version 1.4.0)
Current plugin: Matomo Analytics - Ethical Stats. Powerful Insights. (version 1.1.1)
PHP version 7.4.5

An error of type E_ERROR was caused in line 311 of the file /home/runcloud/webapps/fightsupplies/wp-content/plugins/matomo/classes/WpMatomo/Db/WordPress.php. Error message: Uncaught Zend_Db_Statement_Exception: WP DB Error: [1146] Table ‘fightsupplies_1574943059.wpfs65963_matomo_option’ doesn’t exist SQL: SELECT option_value, option_name FROM wpfs65963_matomo_option WHERE autoload = 1 in /home/runcloud/webapps/fightsupplies/wp-content/plugins/matomo/classes/WpMatomo/Db/WordPress.php:311
Stack trace:
#0 /home/runcloud/webapps/fightsupplies/wp-content/plugins/matomo/classes/WpMatomo/Db/WordPress.php(323): Piwik\Db\Adapter\WordPress->after_execute_query()
#1 /home/runcloud/webapps/fightsupplies/wp-content/plugins/matomo/app/core/Db.php(297): Piwik\Db\Adapter\WordPress->fetchAll()
#2 /home/runcloud/webapps/fightsupplies/wp-content/plugins/matomo/app/core/Option.php(267): Piwik\Db::fetchAll()
#3 /home/runcloud/webapps/fightsupplies/wp-content/plugins/matomo/app/core/Option.php(173): Piwik\Option->autoload()
#4 /home/runcloud/webapps/fightsupplies/wp-content/plugins/matomo/app/core/Option.php(46): Piwik\Option->getValue()
#5 /home/runcloud/webapps/fightsupplies/wp-content/plugins/ma

Seems like the Matomo tables were missing. Did you get an error while you were installing the plugin? Please try to re-install.

I forgot to mention - no tables or Matomo related entries are being added to the database during installation or activation. I’ve tried to re-install a number of times including just now, and can verify no tables are being created. Other plugins are creating tables fine.

@alpha044 could you maybe post the output of the system report see How do I find and copy the system report in Matomo for WordPress? FAQ - Analytics Platform - Matomo ? It should be anonymised.

Also if maybe the config file exists in wp-content/uploads/matomo/config/config.ini.php then it might help to remove the file and reload the WP admin as it might then try to reinstall Matomo for WordPress. However, this file should not have been created if the installation was not successful.

In the next hour we’ll also release an update of the plugin maybe that helps too with the reinstallation.

Thanks - this was it. I had a config file back from December 2019 when I installed the beta directly from the Matomo site for testing. I deleted the matomo folder and its contents and install works fine now. Thanks for your help!