cc1
(Chris Croome)
December 13, 2018, 11:45am
1
When I try to add a website to a Matomo site I’m getting this error:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'creator_login' in 'field list'
The Matomo install is up to date and doesn’t report any errors:
php console core:update --version
Matomo version 3.7.0
php console core:update
Everything is already up to date.
Should I be posting this to GitHub rather than here?
cc1
(Chris Croome)
December 13, 2018, 11:59am
2
Looking at the MySQL Schema there should be a creator_login
field in the site
tables; however this is missing for me:
MariaDB [stats]> describe matomo_site;
+--------------------------------+------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------------------------------+------------------+------+-----+---------+----------------+
| idsite | int(10) unsigned | NO | PRI | NULL | auto_increment |
| name | varchar(90) | NO | | NULL | |
| main_url | varchar(255) | NO | | NULL | |
| ts_created | timestamp | YES | | NULL | |
| ecommerce | tinyint(4) | YES | | 0 | |
| sitesearch | tinyint(4) | YES | | 1 | |
| sitesearch_keyword_parameters | text | NO | | NULL | |
| sitesearch_category_parameters | text | NO | | NULL | |
| timezone | varchar(50) | NO | | NULL | |
| currency | char(3) | NO | | NULL | |
| exclude_unknown_urls | tinyint(1) | YES | | 0 | |
| excluded_ips | text | NO | | NULL | |
| excluded_parameters | text | NO | | NULL | |
| excluded_user_agents | text | NO | | NULL | |
| group | varchar(250) | NO | | NULL | |
| type | varchar(255) | NO | | NULL | |
| keep_url_fragment | tinyint(4) | NO | | 0 | |
+--------------------------------+------------------+------+-----+---------+----------------+
17 rows in set (0.00 sec)
So adding the missing column:
MariaDB [stats]> ALTER TABLE matomo_site ADD COLUMN creator_login VARCHAR(100) NULL;
Query OK, 0 rows affected (0.12 sec)
Records: 0 Duplicates: 0 Warnings: 0
MariaDB [stats]> describe matomo_site;
+--------------------------------+------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------------------------------+------------------+------+-----+---------+----------------+
| idsite | int(10) unsigned | NO | PRI | NULL | auto_increment |
| name | varchar(90) | NO | | NULL | |
| main_url | varchar(255) | NO | | NULL | |
| ts_created | timestamp | YES | | NULL | |
| ecommerce | tinyint(4) | YES | | 0 | |
| sitesearch | tinyint(4) | YES | | 1 | |
| sitesearch_keyword_parameters | text | NO | | NULL | |
| sitesearch_category_parameters | text | NO | | NULL | |
| timezone | varchar(50) | NO | | NULL | |
| currency | char(3) | NO | | NULL | |
| exclude_unknown_urls | tinyint(1) | YES | | 0 | |
| excluded_ips | text | NO | | NULL | |
| excluded_parameters | text | NO | | NULL | |
| excluded_user_agents | text | NO | | NULL | |
| group | varchar(250) | NO | | NULL | |
| type | varchar(255) | NO | | NULL | |
| keep_url_fragment | tinyint(4) | NO | | 0 | |
| creator_login | varchar(100) | YES | | NULL | |
+--------------------------------+------------------+------+-----+---------+----------------+
18 rows in set (0.00 sec)
And now everything appears to be working… perhaps the next version of Matomo should check for this missing column?
cc1
(Chris Croome)
December 13, 2018, 12:03pm
3
I just checked 4 other servers running Matomo and none of them were missing this column, I don’t know why this one server had this issue.
Lukas
(Lukas Winkler)
December 13, 2018, 12:30pm
4
Hi,
The feature was added in 3.6.1 (https://github.com/matomo-org/matomo/pull/13362 )
Maybe that update didn’t go through correctly.
1 Like
cc1
(Chris Croome)
December 13, 2018, 12:58pm
5
That makes sense. Perhaps a command line and / or web interface check, on the System Check page, could be added to check that the database has all the tables and columns it should have sometime?
fdellwing
(Fabian Dellwing)
December 13, 2018, 1:05pm
6
I do think this is a good idea. All needed information are already there (Mysql.php
and mysqls DESCRIBE
), but it still is somethat complex to match that together.
2 Likes