Unique index constraint on wp_matomo_users breaks site
-
Hi!
Trying to install the matomo wordpress plugin on a wordpress multisite installation. There are users in the existing website without an email adress (“”). When activating Matomo plugin it tries to create a a matomo for ALL users in the network, which is not ideal.
But the problem lies in the plugin doing this automatically upon activation, and with users missing email, the unique index constraint on email in wp_matomo_user table will fail and result in a server 500 error when trying to access /wp-admin.
From the server error log:PHP message: WordPress database error Duplicate entry '' for key 'uniq_email' for query INSERT INTO
wp_matomo_user
(login
,password
,email
,date_registered
,superuser_access
,ts_password_modified
,idchange_last_viewed
,invited_by
)?
(VALUES not shown cause of privacy)
Removing the index constraint on the table solves the issue and the users imports successfully.
Is it possible to delay this import or simply avoid importing users with no email adress if this mandatory for matomo?
- The topic ‘Unique index constraint on wp_matomo_users breaks site’ is closed to new replies.