Closed smeierzubiesen closed 4 years ago
This is weird. Looks like Matomo 3.12.0 doesn't create the required table for the plugin anymore.
Same as in #9 you have to create the table manually. Try executing the following command:
CREATE TABLE `mthr_loginoidc_provider` (
`user` varchar(100) NOT NULL,
`provider_user` varchar(255) NOT NULL,
`provider` varchar(255) NOT NULL,
`date_connected` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`provider_user`,`provider`),
UNIQUE KEY `user_provider` (`user`,`provider`),
CONSTRAINT `mthr_loginoidc_provider_ibfk_1` FOREIGN KEY (`user`) REFERENCES `mthr_user` (`login`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Please report back if it worked for you.
I will take a closer look at the issue soon.
Did you install the plugin through the marketplace?
yeah, installed through the market place, and after inserting the data into MySQL, it now works flawlessly :)
check #11
Thanks for the PR. I'm not sure if this actually fixes the issue because the sql statement worked in the past before version 3.12.0 but I will have a closer look at it.
ok, no probs, just thought i'd have a look :)
I tried to reproduce the issue with a fresh Matomo installation and an empty database but it worked just fine. So apparently Matomo 3.12.0 is not the cause.
Which database (MariaDB or MySQL) and which database version are you using?
here's my version readout :
my matomo was freshly installed on this server and i had tried to implement login via LDAP, but wasn't happy with the security implications there, and so i decided on OAuth instead via my existing GitLab instance. and then during install of the plugin, everything ok, i set it up, create a user that also existed in my GitLab and boom error
Thanks for the PR. I'm not sure if this actually fixes the issue because the sql statement worked in the past before version 3.12.0 but I will have a closer look at it.
regarding this, i have noticed that the two sql queries had some significant(?) differences, and thus i reworked the script to run as it proved to work
I got the SQL statement earlier in this thread from running mysqldump on my own database so technically they shouldn't be any different.
Maybe its some part of the syntax MySQL doesn't like but even then it should have shown a proper error message because errors are caught here: LoginOIDC.php
So I am not sure if the install
function actually ran in your case.
Anyways, I guess I'm going to accept your PR and wait to see if any other people run into this issue.
danke vielmals ;)
I'm installing this plugin into the official matomo docker container via a custom ansible playbook, and install
didn't seem to run for me as well. The playbook does the following:
.../matomo/plugins
php console plugin:activate LoginOIDC
I think that's all mostly working, the OIDC flow happens correctly, but then I get the same error, about a missing table.
EDIT: Ah! Actually, I had an extra step in between 2 & 3. Additionally, I added LoginOIDC to the PluginsInstalled
array, but then plugin:activate
doesn't run the installation step since, well, it's "installed" already! That step is entirely unneeded, removing that step makes it all work.
i know this might not officially be supported, but here goes anyways:
I have configured an endpoint on my gitlab instance
https://gitlab.mitos-kalandiel.me/.well-known/openid-configuration
and then I have configured LoginOIDC with the parameters from my gitlab instance.
when attempting any oauth operation I get this:
A fatal error occurred
The following error just broke Matomo (v3.12.0):
An exception has been thrown during the rendering of a template ("Mysqli prepare error: Table 'redacted.mthr_loginoidc_provider' doesn't exist"). in /home/mzbcompa/stats.mzb.company/plugins/UsersManager/templates/userSettings.twig line 157