• Resolved Valentin

    (@valentinalisch)


    Hey there,

    I’m using Matomo an many sites and I always liked it – after configuration everything was running smoothly all the time.

    Today I first tried to install Matomo inside a multisite setup. After installation I get redirected to the last subsite I was using and can activate the tracking which will happen network-wide. After activation though the tracking on the subsite I did activate Matomo on works fine – all the other sides are failing with a fatal error when trying to access the “Summary” tab in the WordPress admin interface.

    The following fatal error is displayed (and hints to not all database tables being created):

    Fatal error: Uncaught Zend_Db_Statement_Exception: WP DB Error: [1146] Table 'multi_db01.wp_3_matomo_option' doesn't exist SQL: SELECT option_value, option_name FROM wp_3_matomo_option WHERE autoload = 1 in […]web/wp-content/plugins/matomo/classes/WpMatomo/Db/WordPress.php:407 Stack trace: #0 […]web/wp-content/plugins/matomo/classes/WpMatomo/Db/WordPress.php(419): Piwik\Db\Adapter\WordPress->after_execute_query() #1 […]web/wp-content/plugins/matomo/app/core/Db.php(302): Piwik\Db\Adapter\WordPress->fetchAll() #2 […]web/wp-content/plugins/matomo/app/core/Option.php(288): Piwik\Db::fetchAll() #3 […]web/wp-content/plugins/matomo/app/core/Option.php(178): Piwik\Option->autoload() #4 […]web/wp-content/plugins/matomo/app/core/Option.php(48): Piwik\Option->getValue() #5 […]web/wp-content/plugins/matomo/app/plugins/UsersManager/API. in […]web/wp-content/plugins/matomo/classes/WpMatomo/Db/WordPress.php on line 407

    Any help is appreciated!
    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support emermatomo

    (@emermatomo)

    Hello @valentinalisch Sorry to hear that you’re experiencing this error. Can you please send us a copy of your system check report so we can investigate what’s causing the issue?

    Thread Starter Valentin

    (@valentinalisch)

    See the system report attached.
    Thanks!

    				  # Errors
    
    * Error plugin_update: 2023-03-20 13:17:09 (Please reach out to us and include the copied system report (<a  target="_blank">more info</a>)<br><br>You can also retry the update manually by clicking in the top on the "Troubleshooting" tab and then clicking on the "Run updater" button.WP DB Error: [1146] Table '$DB_NAME.wp_2_matomo_log_visit' doesn't exist SQL: SHOW COLUMNS FROM wp_2_matomo_log_visit => WordPress.php:407; WordPress.php:419; Mysql.php:435; Schema.php:199; DbHelper.php:54; Updater.php:205; Updater.php:550; Updater.php:221; Updater.php:147; Access.php:670; Updater.php:149; Updater.php:88; ScheduledTasks.php:195; ScheduledTasks.php:276; class-wp-hook.php:306; class-wp-hook.php:332; plugin.php:565; wp-cron.php:188;)
    * Error DB tables exist: No (Some tables may be missing: wp_2_matomo_access, wp_2_matomo_archive_invalidations, wp_2_matomo_brute_force_log, wp_2_matomo_changes, wp_2_matomo_goal, wp_2_matomo_locks, wp_2_matomo_log_action, wp_2_matomo_log_conversion, wp_2_matomo_log_conversion_item, wp_2_matomo_log_link_visit_action, wp_2_matomo_log_profiling, wp_2_matomo_log_visit, wp_2_matomo_logger_message, wp_2_matomo_option, wp_2_matomo_plugin_setting, wp_2_matomo_privacy_logdata_anonymizations, wp_2_matomo_report, wp_2_matomo_report_subscriptions, wp_2_matomo_segment, wp_2_matomo_sequence, wp_2_matomo_session, wp_2_matomo_site, wp_2_matomo_site_setting, wp_2_matomo_site_url, wp_2_matomo_tracking_failure, wp_2_matomo_twofactor_recovery_code, wp_2_matomo_user, wp_2_matomo_user_dashboard, wp_2_matomo_user_language, wp_2_matomo_user_token_auth)
    
    # Matomo
    
    * Matomo-Plugin-Version: 4.13.5
    * Config existiert und ist schreibbar.: Ja ("$abs_path/wp-content/uploads/sites/2/matomo/config/config.ini.php" )
    * JS Tracker existiert und ist schreibbar.: Ja ("$abs_path/wp-content/uploads/sites/2/matomo/matomo.js" )
    * Plugin-Verzeichnisse: Yes ([{"pluginsPathAbsolute":"$abs_path\/wp-content\/plugins\/matomo\/plugins","webrootDirRelativeToMatomo":"..\/"}])
    * Tmp-Verzeichnis schreibbar: Yes ($abs_path/wp-content/uploads/sites/2/matomo/tmp)
    * Matomo-Systemprüfung: Failed to run Matomo system check. (WP DB Error: [1146] Table '$DB_NAME.wp_2_matomo_option' doesn't exist SQL: SELECT option_value, option_name FROM wp_2_matomo_option WHERE autoload = 1)
    * Matomo Blog idSite: 0
    * Installierte Matomo-Version: No
    * Upgrades outstanding: Yes ({"matomo-plugin-version-matomo":"4.13.5"})
    * Upgrade in progress: No
    
    ## Endpoints
    
    * Matomo JavaScript Tracker URL:  ($site_url/wp-content/uploads/sites/2/matomo/matomo.js)
    * Matomo JavaScript Tracker - WP Rest API:  ($site_url/wp-json/matomo/v1/hit/)
    * Matomo HTTP Tracking API:  ($site_url/wp-content/plugins/matomo/app/matomo.php)
    * Matomo HTTP Tracking API - WP Rest API:  ($site_url/wp-json/matomo/v1/hit/)
    
    ## Crons
    
    * Server-Zeit: 2023-03-20 12:19:54
    * Blog-Zeit: 2023-03-20 13:19:54 (Die nachfolgenden Daten werden in der Blog-Zeitzone angezeigt)
    * Sync users & sites: Next run: 2023-03-21 13:17:09 (23 hours 57 min) ( Last started: 2023-03-20 13:17:09 (-2 min 45s). Last ended: 2023-03-20 13:17:09 (-2 min 45s). Interval: daily)
    * Archive: Next run: 2023-03-20 14:17:09 (57 min 15s) ( Last started: 2023-03-20 13:17:09 (-2 min 45s). Last ended: 2023-03-20 13:17:09 (-2 min 45s). Interval: hourly)
    * Update GeoIP DB: Next run: 2023-04-19 14:17:09 (29 days 23 hours) ( Last started: 2023-03-20 13:17:09 (-2 min 45s). Last ended: Unbekannt. Interval: matomo_monthly)
    
    ## Matomo Settings
    
    * Track mode: default
    * Track codeposition: footer
    * Track api endpoint: default
    * Track js endpoint: default
    * Version history: 4.13.5
    * Core version: 4.13.3
    * Last tracking settings update: 1679314626
    * Last settings update: 1679314626
    
    ## Logs
    
    * matomo_url_sync: 2023-03-20 13:17:09 (WP DB Error: [1146] Table '$DB_NAME.wp_2_matomo_option' doesn't exist SQL: SELECT option_value, option_name FROM wp_2_matomo_option WHERE autoload = 1 => WordPress.php:407; WordPress.php:419; Db.php:302; Option.php:288; Option.php:178; Option.php:48; SettingsPiwik.php:182; Installer.php:189; ScheduledTasks.php:258; class-wp-hook.php:306; class-wp-hook.php:332; plugin.php:565; wp-cron.php:188;)
    * Error plugin_update: 2023-03-20 13:17:09 (Please reach out to us and include the copied system report (<a  target="_blank">more info</a>)<br><br>You can also retry the update manually by clicking in the top on the "Troubleshooting" tab and then clicking on the "Run updater" button.WP DB Error: [1146] Table '$DB_NAME.wp_2_matomo_log_visit' doesn't exist SQL: SHOW COLUMNS FROM wp_2_matomo_log_visit => WordPress.php:407; WordPress.php:419; Mysql.php:435; Schema.php:199; DbHelper.php:54; Updater.php:205; Updater.php:550; Updater.php:221; Updater.php:147; Access.php:670; Updater.php:149; Updater.php:88; ScheduledTasks.php:195; ScheduledTasks.php:276; class-wp-hook.php:306; class-wp-hook.php:332; plugin.php:565; wp-cron.php:188;)
    * update_geoip2: 2023-03-20 13:17:09 (WP DB Error: [1146] Table '$DB_NAME.wp_2_matomo_option' doesn't exist SQL: UPDATE wp_2_matomo_option SET option_value = ?, autoload = ? WHERE option_name = ? => WordPress.php:407; WordPress.php:286; Db.php:281; Option.php:198; Option.php:74; ScheduledTasks.php:229; class-wp-hook.php:306; class-wp-hook.php:332; plugin.php:565; wp-cron.php:188;)
    
    # WordPress
    
    * Home URL: $site_url
    * Site URL: $site_url
    * WordPress Version: 6.1.1
    * Number of blogs: 3
    * Multisite Enabled: Yes
    * Network Enabled: Yes
    * WP_DEBUG: Yes
    * WP_DEBUG_DISPLAY: Yes
    * WP_DEBUG_LOG: No
    * DISABLE_WP_CRON: -
    * FORCE_SSL_ADMIN: Yes
    * WP_CACHE: No
    * CONCATENATE_SCRIPTS: -
    * COMPRESS_SCRIPTS: -
    * COMPRESS_CSS: -
    * ENFORCE_GZIP: -
    * WP_LOCAL_DEV: -
    * WP_CONTENT_URL: $site_url/wp-content
    * WP_CONTENT_DIR: $abs_path/wp-content
    * UPLOADS: -
    * BLOGUPLOADDIR: -
    * DIEONDBERROR: -
    * WPLANG: -
    * ALTERNATE_WP_CRON: -
    * WP_CRON_LOCK_TIMEOUT: 60
    * WP_DISABLE_FATAL_ERROR_HANDLER: -
    * MATOMO_SUPPORT_ASYNC_ARCHIVING: -
    * MATOMO_TRIGGER_BROWSER_ARCHIVING: -
    * MATOMO_ENABLE_TAG_MANAGER: -
    * MATOMO_SUPPRESS_DB_ERRORS: -
    * MATOMO_ENABLE_AUTO_UPGRADE: -
    * MATOMO_DEBUG: -
    * MATOMO_SAFE_MODE: -
    * MATOMO_GLOBAL_UPLOAD_DIR: -
    * MATOMO_LOGIN_REDIRECT: -
    * Permalink Structure: /%postname%/
    * Possibly uses symlink: No
    * Upload base url: $site_url/wp-content/uploads/sites/2
    * Upload base dir: $abs_path/wp-content/uploads/sites/2
    * Upload url: $site_url/wp-content/uploads/sites/2/2023/03
    * Custom upload_path: 
    * Custom upload_url_path: 
    * Compatible content directory: Yes
    
    # WordPress Plugins
    
    * Advanced Custom Fields PRO: 5.10.2
    * Classic Editor: 1.6.2
    * DevKit: 0.9.6b
    * Matomo Analytics - Ethical Stats. Powerful Insights.: 4.13.5
    * Polylang: 3.3.2
    * Polylang Pro: 3.2.2
    * WP Query Multisite: 1.0.0
    * Theme: twentytwentythree (twentytwentythree)
    
    # Server
    
    * Server Info: nginx/1.18.0
    * PHP OS: Linux
    * PHP Version: 7.4.29
    * PHP SAPI: fpm-fcgi
    * PHP Binary Name: /usr/sbin/php-fpm7.4
    * PHP Maxmind DB extension: Not loaded
    * PHP Error Reporting:  After bootstrap: 0
    * PHP Found Binary: /usr/bin/php -q
    * Timezone: UTC
    * WP timezone: Europe/Berlin
    * Locale: de_DE
    * User Locale: de_DE
    * Memory Limit: 128M (At least 128MB recommended. Depending on your traffic 256MB or more may be needed.)
    * WP Memory Limit: 64M
    * WP Max Memory Limit: 256M
    * Timezone version: 0.system
    * Time: 1679314794
    * Max Execution Time: 30
    * Max Post Size: 8M
    * Max Upload Size: 2097152
    * Max Input Vars: 1000
    * Disabled PHP functions: Yes (pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,)
    * zlib.output_compression is off: Yes
    * Curl Version: 7.74.0, OpenSSL/1.1.1n
    * Suhosin installed: No
    
    # PHP cli
    
    * PHP cli Version: 7.4.29
    * MySQLi support: ok
    
    # Database
    
    * MySQL Version: 5.5.5
    * Mysqli Connect: Yes
    * Force MySQL over Mysqli: No
    * DB Prefix: wp_2_
    * DB CHARSET: utf8mb4
    * DB COLLATE: 
    * SHOW ERRORS: Yes
    * SUPPRESS ERRORS: No
    * Uses Socket: No
    * Uses IPv6: No
    * Matomo tables found: 0
    * Error DB tables exist: No (Some tables may be missing: wp_2_matomo_access, wp_2_matomo_archive_invalidations, wp_2_matomo_brute_force_log, wp_2_matomo_changes, wp_2_matomo_goal, wp_2_matomo_locks, wp_2_matomo_log_action, wp_2_matomo_log_conversion, wp_2_matomo_log_conversion_item, wp_2_matomo_log_link_visit_action, wp_2_matomo_log_profiling, wp_2_matomo_log_visit, wp_2_matomo_logger_message, wp_2_matomo_option, wp_2_matomo_plugin_setting, wp_2_matomo_privacy_logdata_anonymizations, wp_2_matomo_report, wp_2_matomo_report_subscriptions, wp_2_matomo_segment, wp_2_matomo_sequence, wp_2_matomo_session, wp_2_matomo_site, wp_2_matomo_site_setting, wp_2_matomo_site_url, wp_2_matomo_tracking_failure, wp_2_matomo_twofactor_recovery_code, wp_2_matomo_user, wp_2_matomo_user_dashboard, wp_2_matomo_user_language, wp_2_matomo_user_token_auth)
    * Matomo users found: table not exists
    * Matomo sites found: table not exists
    * Erforderliche Berechtigungen: OK
    
    # Browser
    
    * Browser:  (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15)
    * Language: de-de,de
    
    	
    Thread Starter Valentin

    (@valentinalisch)

    Hey there,
    I actually found the problem – it’s caused by myself. Oops. I’m doing some things to unify the media library across all multisite installations and therefore using the “upload_dir” filter to return the same folder across all subsites of my multisite installation. When I do disable this function matomo gets installed flawlessly and sets up some folders in the upload directories of the subsites.

    I know this is a lot to ask but is there anyway to make Matomo use another path than the uploads directory?

    Plugin Support emermatomo

    (@emermatomo)

    @valentinalisch Sorry for the late response. Glad to hear that the issue has been resolved.

    On your other question, Matomo for WordPress files are inside your WordPress website files directory and it’s not possible to use another path. The workaround for this is to use the Matomo On-Premise which you can install in another path.

    Thread Starter Valentin

    (@valentinalisch)

    That’s interesting – thanks a lot!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Multisite: Fatal Errors’ is closed to new replies.