Issue upgrading 3.0.3 -> 3.6.1 - SQL Fatal error (Ubuntu 16.04 LTS, Apache 2.4.18, MySQL 5.7, PHP7.2)

Hi,
I have some trouble while upgrading from 3.0.3 to 3.6.1. I ran the One-Click-Update and besides some file check errors, which I solved, update process ran smooth till restart of the webserver and reload of the Matomo website. First I couldn’t log in and had to use the way with " index.php?i_am_super_user=salt_value_from_config&". That worked, but then I got the next fatal error:

An exception has been thrown during the rendering of a template (“SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘user_login’ in ‘where clause’”).
in /piwik/plugins/Morpheus/templates/layout.twig line 51

So I switched back by restoring the DB and ran the Manual Three-Step-Update, but to no avail. Database updates finished without any issue, restarted the webserver, but got same fatal error after.

Any help would be appreciated.

Hi there,

Looks like something went wrong, can you try adding a field user_login' => "VARCHAR(100) NOT NULL DEFAULT to the table plugin_setting ?

Hi Matthieu,

First up, I have inherited the system with it’s Piwik system installed with no documentation. What I did meanwhile: After the restore to 3.0.3 I encountered the same error message (“SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘user_login’ in ‘where clause’”) when I logged in, switched to Administration–>Diagnostic–>Config file. So this error starts not with update 3.6.1. I ran some additional tests and updated my old system step by step (3.0.3->3.4.0->3.5.0->3.6.0). All is fine (except the missing column) till I updated to 3.6.0. That destroyed it completely and might be a consecutive fault.

Question is, in which file can I find the SQL installation code for all the tables to add the missing columns. And is this a way to go? I would rather do a plain new installation with import of the collected data and config(?) than manual manipulation of tables.

So, what’s your recommendation?

Ok, solved the problem by dropping the (empty) table ‘plugin_setting’ and creating a new one from the code in ‘core/Db/Schema/Mysql.php’. Apart from the missing column ‘user_login’ I had a column ‘idsite’ in the table, which not exist in the current code. That is fixed also. Update to 3.6.1 went smooth, system is working. Thx!

1 Like