WARNING: /plugins/Goals/API.php(117)

WARNING: /plugins/Goals/API.php(117): Notice - Undefined index: description - Matomo 4.12.0 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already) (Module: API, Action: home, Method: Goals.getGoals, In CLI mode: false)

Matomo 4.12.0
PHP 7.4.30

@SteveG That code was newly added in 4.12.0 (with https://github.com/matomo-org/matomo/pull/19490)

@SSFGizmo Do you know what exactly you did, when that error occured?

@SSFGizmo could you maybe also check your database if the goals table has a description column or not?

@SteveG

DESCRIBE matomo_goal;
+------------------------+--------------+------+-----+---------+-------+
| Field                  | Type         | Null | Key | Default | Extra |
+------------------------+--------------+------+-----+---------+-------+
| idsite                 | int(11)      | NO   | PRI | NULL    |       |
| idgoal                 | int(11)      | NO   | PRI | NULL    |       |
| name                   | varchar(50)  | NO   |     | NULL    |       |
| match_attribute        | varchar(20)  | NO   |     | NULL    |       |
| pattern                | varchar(255) | NO   |     | NULL    |       |
| pattern_type           | varchar(25)  | NO   |     | NULL    |       |
| case_sensitive         | tinyint(4)   | NO   |     | NULL    |       |
| allow_multiple         | tinyint(4)   | NO   |     | NULL    |       |
| revenue                | float        | NO   |     | NULL    |       |
| deleted                | tinyint(4)   | NO   |     | 0       |       |
| event_value_as_revenue | tinyint(4)   | NO   |     | 0       |       |
+------------------------+--------------+------+-----+---------+-------+

On the another Server with the same matomo version (without warnings)

DESCRIBE matomo_goal;
+------------------------+--------------+------+-----+---------+-------+
| Field                  | Type         | Null | Key | Default | Extra |
+------------------------+--------------+------+-----+---------+-------+
| idsite                 | int(11)      | NO   | PRI | NULL    |       |
| idgoal                 | int(11)      | NO   | PRI | NULL    |       |
| name                   | varchar(50)  | NO   |     | NULL    |       |
| description            | varchar(255) | NO   |     |         |       |
| match_attribute        | varchar(20)  | NO   |     | NULL    |       |
| pattern                | varchar(255) | NO   |     | NULL    |       |
| pattern_type           | varchar(25)  | NO   |     | NULL    |       |
| case_sensitive         | tinyint(4)   | NO   |     | NULL    |       |
| allow_multiple         | tinyint(4)   | NO   |     | NULL    |       |
| revenue                | float        | NO   |     | NULL    |       |
| deleted                | tinyint(4)   | NO   |     | 0       |       |
| event_value_as_revenue | tinyint(4)   | NO   |     | 0       |       |
+------------------------+--------------+------+-----+---------+-------+

@Lukas

Mouse click on ‘Administration’.

  • index.php?module=CoreAdminHome&action=home&idSite=XXX&period=day&date=yesterday

@SSFGizmo That column should actually already have been added with Matomo 3.0.0
See https://github.com/matomo-org/matomo/blob/c11469e4199405628e97650914f0cdbdea94dac7/plugins/Goals/Updates/3.0.0-b1.php#L36
You can add it manually to fix that error.

@SteveG OK, thank you

ALTER TABLE matomo_goal ADD COLUMN description VARCHAR(255) NOT NULL DEFAULT '' AFTER name;