since the 4.12 update, we’re getting the following notice both in the PHP log and from one of our cronjobs:
PHP Notice: Undefined index: excluded_referrers in /tools/piwik/piwik-4.12.1/plugins/SitesManager/SitesManager.php on line 320
2022-10-25 00:02:07,808: [INFO] bulk tracking returned invalid JSON
2022-10-25 00:02:07,808: [INFO] tracker response:
<br />
<b>Notice</b>: Undefined index: excluded_referrers in
<b>/tools/piwik/piwik-4.12.1/plugins/SitesManager/SitesManager.php</b>
on line <b>320</b><br />
I’m at a loss as to what could cause this. It seems the error stems from a Matomo PHP file (SitesManager.php). I gather excluded referrers are a new feature. I found no previous case of this problem on Google.
Could someone more knowledgeable than me take a look at this?
Hi Philippe, I upgraded from 4.11.0 directly to 4.12.1. Right now we have version 4.12.1, and that’s the one producing the PHP notice. Do you think 4.12.2 might fix this?
Jonas
Hi,
the upate to 4.12.2 did not change anything - but the core:update did.
Your Matomo database is out-of-date, and must be upgraded before you can continue.
Matomo database will be upgraded from version 4.11.0 to the new version 4.12.2.
The database upgrade process may take a while, so please be patient.
Executing ALTER TABLE `piwik_site` ADD COLUMN `excluded_referrers` TEXT NOT NULL AFTER `excluded_user_agents`;... Done. [1 / 3]
Executing ALTER TABLE `piwik_user` ADD UNIQUE KEY uniq_email (`email`);... Done. [2 / 3]
Executing ALTER TABLE `piwik_user` ADD COLUMN `invite_link_token` VARCHAR(191) DEFAULT null;... Done. [3 / 3]
Matomo has been successfully updated!
It looks like there was a database update needed.
I’m pretty sure that the Matomo Web GUI did not display any “database update needed” message after the 4.12 update like it usually does.
We’ve had problems with missing database table updates in other Matomo installations just recently. I found myself manually repairing the database, adding missing fields about invites, which I believe was another recent feature.
I guess I will simply run core:update after every update in the future, then.