Matomo (v3.11.0) with FormAnalytics (v3.1.25) explodes in glittery dust

Matomo (v3.11.0) with FormAnalytics (v3.1.25) explodes in glittery dust

Downloaded, unzipped and modified matomo/config/config.ini.php:

Plugins[] = "MultiChannelConversionAttribution"
Plugins[] = "HeatmapSessionRecording"
Plugins[] = "FormAnalytics"

PluginsInstalled[] = "MultiChannelConversionAttribution"
PluginsInstalled[] = "HeatmapSessionRecording"
PluginsInstalled[] = "FormAnalytics"

Explodes in glittery dust in the browser:

An exception has been thrown during the rendering of a template (“SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘piwik.piwik_site_form’ doesn’t exist”).
in /var/www/aaaaaaaa/matomo/plugins/CoreHome/templates/getDefaultIndexView.twig line 7

With a similar message from matomo/tmp/logs/matomo.log:

ERROR FormAnalytics[2019-10-24 07:09:10 UTC] [a536d] Uncaught exception in API: /var/www/aaaaaaaa/matomo/libs/Zend/Db/Statement/Pdo.php(234): SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘piwik.piwik_site_form’ doesn’t exist

I see no reference to the table site_form in the Matomo source:

But I do see several references to it in:

[root@someserver /var/www/aaaaaaaa/matomo/plugins]# grep -r site_form *
FormAnalytics/Updates/3.1.4.php:        $migration = $this->migration->db->changeColumnType('site_form', 'fields', 'MEDIUMTEXT NULL');
FormAnalytics/Dao/LogForm.php:        $sql = sprintf('SELECT DISTINCT log_form.idlogform FROM %s log_form LEFT OUTER JOIN %s site_form ON log_form.idsiteform = site_form.idsiteform WHERE site_form.idsiteform IS NULL or site_form.`status` = "%s" LIMIT %s',
FormAnalytics/Dao/LogForm.php:                        $this->tablePrefixed, Common::prefixTable('site_form'), FormsModel::STATUS_DELETED, (int) $numMaxEntries);
FormAnalytics/Dao/LogForm.php:        $select = sprintf(' as label,
FormAnalytics/Dao/LogForm.php:                           site_form.idsiteform,
FormAnalytics/Dao/LogForm.php:        $where = sprintf('%1$s.idsite = ? and %1$s.form_last_action_time > ? and site_form.`status` = \'running\' ', $this->table);
FormAnalytics/Dao/LogForm.php:        $groupBy = '';
FormAnalytics/Dao/LogForm.php:            'table'  => 'site_form',
FormAnalytics/Dao/LogForm.php:            'joinOn' => 'site_form.idsiteform = log_form.idsiteform'
FormAnalytics/Dao/SiteForm.php:    private $table = 'site_form';
FormAnalytics/VisitorDetails.php:               AS form_name,
FormAnalytics/VisitorDetails.php:                        site_form.idsiteform AS form_id,
FormAnalytics/VisitorDetails.php:                        site_form.status AS form_status,
FormAnalytics/VisitorDetails.php:                                       LEFT JOIN " . Common::prefixTable('site_form') . " AS site_form
FormAnalytics/VisitorDetails.php:                                               ON log_form.idsiteform = site_form.idsiteform
FormAnalytics/VisitorDetails.php:                                       WHERE log_form.idvisit IN (%s) AND log_form.time_spent > 0 AND (site_form.auto_created = 0 OR site_form.status != '". FormsModel::STATUS_DELETED ."')
FormAnalytics/Segment.php:            $sql = 'SELECT idsiteform FROM ' . Common::prefixTable('site_form') . " as site_form WHERE site_form.status = '" . FormsModel::STATUS_RUNNING . "' AND " ;

It’s like the plugin is missing the first step to launch a “CREATE TABLE” statement. Any advice? This setup do not have access to the internet. Plugins installed by hand.


I have forwarded your issue to the Premium Plugin support.

In the meantime one tip:

I am not entirely sure if the plugin is properly installed by adding the lines to config.ini.php. After all it is the list of plugins that are already installed.

I’d recommend you to not modify the config.ini.php, but instead just to unzip the directory and afterwards activate the plugin in the plugin list in Matomo.

That’s because it is the table use/created by the premium plugin.

This particular plugin is installed with alternative 3 from:

Install a new plugin manually : this last technique only works if you have direct access to the Matomo server. Uncompress the Plugin zip file that you wish to install in Matomo. This should create a directory with the name of the plugin. Copy this uncompressed folder into your server in the directory path/to/piwik/plugins/.

Indeed, but as the next section mentions:

By default, when you install a plugin it is not activated. To activate a plugin, go to the “Plugins” page in Administration and click “Activate” next to the plugin name.

Have you tried doing this (instead of editing the config.ini.php)?

I think that actualy resoved the issue. Its now activated and I have a “settings” menu for in the plugins area. I’ll investigate a little further now! Thanks for the assistance so far.

1 Like

no, activation seemed to be working, but after logging out/in - I’m still facing

An exception has been thrown during the rendering of a template (“SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘piwik.piwik_site_form’ doesn’t exist”).
in /var/www/xxxxxxx/matomo/plugins/CoreHome/templates/getDefaultIndexView.twig line 7

some configuration:
host = “somedbhost.tld”
username = “piwik”
password = “xxxxxxxx”
dbname = “piwik”
tables_prefix = “piwik_”

log_writers[] = “file”
log_level = “DEBUG”

assume_secure_protocol = 1
enable_plugin_upload = 1
enable_auto_update = 0
enable_update_communication = 0
enable_marketplace = 0


Seems to be missing a DDL for creating their needed tables in the Piwik database. Downloading newer versions:

Solves this issue.

1 Like