Missing some database tables when attempting to script install


(Johannes Ernst) #1

I’m attempting to bring Matomo to UBOS. This requires me to fully install and configure Matomo from scripts. I realize I’m not the first one attempting to do that without an official console core:install command :wink:

Basically, this is what I’m doing, The relevant script fragments are here:

  1. Dump all the files into DocumentRoot
  2. Provision a database
  3. Generate the config file, parameterized with the database parameters (see generate-config.pl)
  4. Initialize the database (see init-db.pl, which is a simplified version of nebev’s script at nebev/piwik-cli-setup/master/install.php on Github – as a new user apparently I don’t get to link there)
  5. Upgrading the database (basically running console core:update --yes)

This all sort of seems to work, but I end up with only some of the apparently needed database tables. Specifically, I am missing:

  • matomo_privacy_logdata_anonymizations
  • matomo_report
  • matomo_report_subscriptions
  • matomo_segment
  • matomo_user_dashboard
  • matomo_user_language

I suspect that only some of the upgrade scripts are running. Any hints what steps I might be missing to get those tables?


(Johannes Ernst) #2

Apparently these all come from plugins, not core Matomo. So I guess all I need to find out is how to activate the plugins via API.


(Fabian Dellwing) #3

While creating the config file you can also activate this plugins directly.


(Johannes Ernst) #4

I figured it out: once the plugins are listed in the config file, they are assumed to have been activated. So the trick is not to list them there before that.