Open NicoHood opened 3 months ago
Hi @NicoHood, can you check the webserver error logs for the exact error message? Or enable debug logging in WordPress and see if the error message is displayed there?
To enable debug logging in WordPress, add the following to your wp-config.php file:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
(make sure to add it before the part of the file that says "stop editing").
After enabling debug logging, trigger thr fatal error and check for a debug.log
file at /path/to/wordpress/wp-content/debug.log
.
Can you also provide what version you're updating from and tell me how you updated (ie, through the WP admin or manually via FTP or something else)?
I got an email that the plugin 'Heatmap & Session Recording for Matomo' is causing the issue.
Here are some more details:
WordPress-Version 6.4.4
Aktives Theme: Astra (Version 4.6.16)
Aktuelles Plugin: Heatmap & Session Recording for Matomo (Version 4.6.6)
PHP-Version 8.3.6
Fehler-Details
==============
Ein Fehler vom Typ E_ERROR wurde in der Zeile 17 der Datei /var/www/vhosts/hosting145063.a2e91.netcup.net/httpdocs/test.partyborn.de/wp-content/plugins/HeatmapSessionRecording/config/config.php verursacht. Fehlermeldung: Uncaught Error: Call to undefined function DI\add() in /var/www/vhosts/hosting145063.a2e91.netcup.net/httpdocs/test.partyborn.de/wp-content/plugins/HeatmapSessionRecording/config/config.php:17
Stack trace:
#0 /var/www/vhosts/hosting145063.a2e91.netcup.net/httpdocs/test.partyborn.de/wp-content/plugins/matomo/app/vendor/prefixed/php-di/php-di/src/Definition/Source/DefinitionFile.php(49): require()
#1 /var/www/vhosts/hosting145063.a2e91.netcup.net/httpdocs/test.partyborn.de/wp-content/plugins/matomo/app/vendor/prefixed/php-di/php-di/src/Definition/Source/DefinitionFile.php(33): Matomo\Dependencies\DI\Definition\Source\DefinitionFile->initialize()
#2 /var/www/vhosts/hosting145063.a2e91.netcup.net/httpdocs/test.partyborn.de/wp-content/plugins/matomo/app/vendor/prefixed/php-di/php-di/src/Definition/Source/SourceChain.php(47): Matomo\Dependencies\DI\Definition\Source\DefinitionFile->getDefinition('Piwik\\Applicati...')
#3 /var/www/vhosts/hosting145063.a2e91.netcup.net/httpdocs/test.partyborn.de/wp-content/plugins/matomo/app/vendor/prefixed/php-di/php-di/src/Container.php(129): Matomo\Dependencies\DI\Definition\Source\SourceChain->getDefinition('Piwik\\Applicati...')
#4 /var/www/vhosts/hosting145063.a2e91.netcup.net/httpdocs/test.partyborn.de/wp-content/plugins/matomo/app/vendor/prefixed/php-di/php-di/src/Container.php(112): Matomo\Dependencies\DI\Container->getDefinition('Piwik\\Applicati...')
#5 /var/www/vhosts/hosting145063.a2e91.netcup.net/httpdocs/test.partyborn.de/wp-content/plugins/matomo/app/core/Container/Container.php(32): Matomo\Dependencies\DI\Container->get('Piwik\\Applicati...')
#6 /var/www/vhosts/hosting145063.a2e91.netcup.net/httpdocs/test.partyborn.de/wp-content/plugins/matomo/app/core/Application/Environment.php(165): Piwik\Container\Container->get('Piwik\\Applicati...')
#7 /var/www/vhosts/hosting145063.a2e91.netcup.net/httpdocs/test.partyborn.de/wp-content/plugins/matomo/app/core/Application/Environment.php(88): Piwik\Application\Environment->validateEnvironment()
#8 /var/www/vhosts/hosting145063.a2e91.netcup.net/httpdocs/test.partyborn.de/wp-content/plugins/matomo/classes/WpMatomo/Bootstrap.php(88): Piwik\Application\Environment->init()
#9 /var/www/vhosts/hosting145063.a2e91.netcup.net/httpdocs/test.partyborn.de/wp-content/plugins/matomo/classes/WpMatomo/Bootstrap.php(118): WpMatomo\Bootstrap->bootstrap()
#10 /var/www/vhosts/hosting145063.a2e91.netcup.net/httpdocs/test.partyborn.de/wp-content/plugins/matomo/classes/WpMatomo/Installer.php(66): WpMatomo\Bootstrap::do_bootstrap()
#11 /var/www/vhosts/hosting145063.a2e91.netcup.net/httpdocs/test.partyborn.de/wp-content/plugins/matomo/classes/WpMatomo/Updater.php(75): WpMatomo\Installer::is_intalled()
#12 /var/www/vhosts/hosting145063.a2e91.netcup.net/httpdocs/test.partyborn.de/wp-content/plugins/matomo/classes/WpMatomo/Updater.php(88): WpMatomo\Updater->get_plugins_requiring_update()
#13 /var/www/vhosts/hosting145063.a2e91.netcup.net/httpdocs/test.partyborn.de/wp-content/plugins/matomo/classes/WpMatomo.php(222): WpMatomo\Updater->update_if_needed()
#14 /var/www/vhosts/hosting145063.a2e91.netcup.net/httpdocs/test.partyborn.de/wp-includes/class-wp-hook.php(324): WpMatomo->init_plugin('')
#15 /var/www/vhosts/hosting145063.a2e91.netcup.net/httpdocs/test.partyborn.de/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#16 /var/www/vhosts/hosting145063.a2e91.netcup.net/httpdocs/test.partyborn.de/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#17 /var/www/vhosts/hosting145063.a2e91.netcup.net/httpdocs/test.partyborn.de/wp-settings.php(643): do_action('init')
#18 /var/www/vhosts/hosting145063.a2e91.netcup.net/httpdocs/test.partyborn.de/wp-config.php(120): require_once('/var/www/vhosts...')
#19 /var/www/vhosts/hosting145063.a2e91.netcup.net/httpdocs/test.partyborn.de/wp-load.php(50): require_once('/var/www/vhosts...')
#20 /var/www/vhosts/hosting145063.a2e91.netcup.net/httpdocs/test.partyborn.de/wp-admin/admin.php(34): require_once('/var/www/vhosts...')
#21 /var/www/vhosts/hosting145063.a2e91.netcup.net/httpdocs/test.partyborn.de/wp-admin/update-core.php(10): require_once('/var/www/vhosts...')
#22 {main}
thrown
This is a screenshot before the upgrade:
I upgrades from the wordpress admin dashboard via firefox browser.
If you need more info, just ask. I guess the error log from the email is identical to the debug output?
@NicoHood I see, the problem is just that the HeatmapSessionRecording plugin (and possibly other plugins) are not working well with the upgrade to Matomo 5.0 (they need to be upgraded as well, but WordPress won't upgrade all of them at once). To workaround this issue, you could try:
I'll see if I can fix the issue in the plugin so it doesn't occur for anyone else. Thanks for reporting it!
@NicoHood Looked into this a little more and it looks like the code the error is referencing is strangely out of date (the line numbers are incorrect).
Can you /path/to/wordpress/wp-content/plugins/matomo/classes/WpMatomo/Bootstrap.php
file and do a search for this text: matomo_filter_incompatible_plugins
?
If it's there, but the fatal error is still occurring for you, can you try restarting your webserver and see if that has an effect?
matomo_filter_incompatible_plugins
is not there in this file.
So it seems the heatmap plugin causes the issue. Maybe I should try to update this one first? Also I am wondering how can I even update those marktplace plugin? There seems to be no update button at all?
So if I disable all plugins, then update matomo und the marketplace it all works fine. however the heatmap plugin is still at an old version, wouldnt this cause conflicts of which I dont know yet? I dont want to run into undefined behavior and crash any database because of too old versions.
If I click search for update then I will get an update suggestion for the campaigns plugin, but not for the heatmap one. why?
Also If i update the campaign plugin the website starts to crash again
@NicoHood
matomo_filter_incompatible_plugins is not there in this file.
That code is present in the 5.0.6 version of Matomo for WordPress. This means the plugin update was incomplete and not all the files were updated correctly.
Are you able to manually delete the matomo plugin folder and then manually extract the 5.0.6 archive in its place? As opposed to updating the plugin through the WordPress admin?
Once you're able to do that, you should be able to update the other plugins without issue.
Before the update:
After the aktivation of the heatmap plugin it now (27.6.2024) all works fine:
But the plugin itself seems old. There is no update button for the heatmap plugin, but for the campaign reporting plugin there is. Why? How can I update the heatmap plugin?
Did you change anything in the meantime? Cause it now all worked if I first disable, then upgrade, then enable step by step.
@NicoHood
But the plugin itself seems old. There is no update button for the heatmap plugin, but for the campaign reporting plugin there is. Why? How can I update the heatmap plugin?
Do you have the Matomo for WordPress Marketplace plugin installed? (If not, you would see a setup wizard in Matomo Analytics > Marketplace > Install Plugins
.) If you do, did you enter your premium plugin license into the appropriate Marketplace page and download the HeatmapSessionRecording plugin from the marketplace? If not, updates will not be available through the WordPress plugins admin.
@NicoHood
Missed this question:
Did you change anything in the meantime? Cause it now all worked if I first disable, then upgrade, then enable step by step.
No we didn't change anything. As I said earlier, it was likely due to an incomplete plugin update, and thus a random error caused by WordPress.
For the compaigns reporting plugin I do get the check for updates update button:
For the heatmap plugin there is no such option:
I do have the premium license key entered:
And yes, there is now this update button:
So it seems to now work fine. However I do get this error. It might be outdated in the meanwhile, maybe it was generated just when I did the update?
So it seems to now work fine.
I assume this means the update button also shows up on the WordPress plugins admin page? WordPress saves the list of plugins that need an update and doesn't always update the list immediately. (The Matomo marketplace forces this list to be updated again when it is viewed.)
However I do get this error.
If the error is still relevant, it looks like part of the database update did not execute. Can you try:
Matomo Analytics > Diagnostics > Troubleshooting
and clicking the 'Run Updater' button? (There's currently no success message, the page just reloads on success.)The Run updater just reloaded the page (as expected) and the archive reports ended in a blank page:
The errors in the system report are still there. Also we have less traffic in the matomo report which is unusual, but maybe a normal summar gap, i dont know.
archive main:
4 total errors during this script execution, please investigate and try and fix these errors. => CronArchive.php:473; CronArchive.php:468; CronArchive.php:226; Access.php:567; CronArchive.php:230; ScheduledTasks.php:361; class-wp-hook.php:322; class-wp-hook.php:348; plugin.php:565; wp-cron.php:191;
archive error:
'Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2024-06-28&format=json&trigger=archivephp. Response was \'WordPress database error Unknown column \'log_conversion.pageviews_before\' in \'field list\' for query SELECT /*+ MAX_EXECUTION_TIME(7200000) */ /* sites 1 */ /* 2024-06-27,2024-06-28 */ /* Actions ActionReports */ /* trigger = CronArchive */ log_conversion.idvisit AS idvisit, 1 AS idgoal, 1 AS `type`, lac.idaction AS idaction, COUNT(*) AS `1`, ROUND(SUM(log_conversion.revenue),2) AS `2`, COUNT(log_conversion.idvisit) AS `3`, ROUND(SUM(1 / log_conversion.pageviews_before * log_conversion.revenue_subtotal),2) AS `4`, ROUND(SUM(1 / log_conversion.pageviews_before * log_conversion.revenue_tax),2) AS `5`, ROUND(SUM(1 / log_conversion.pageviews_before * log_conversion.revenue_shipping),2) AS `6`, ROUND(SUM(1 / log_conversion.pageviews_before * log_conversion.revenue_discount),2) AS `7`, SUM(1 / log_conversion.pageviews_before * log_conversion.items) AS `8`, log_conversion.pageviews_before AS `9`, SUM(1 / log_conversion.pageviews_before) AS `10`, COUNT(*) AS `12`, ROUND(SUM(1 / log_conversion.pageviews_before * log_conversion.revenue),2) AS `15` FROM 9aISZzD3Nr_matomo_log_conversion AS log_conversion RIGHT JOIN 9aISZzD3Nr_matomo_log_link_visit_action AS logva ON log_conversion.idvisit = logva.idvisit LEFT JOIN 9aISZzD3Nr_matomo_log_action AS lac ON logva.idaction_url = lac.idaction WHERE log_conversion.server_time >= \'2024-06-27 22:00:00\' AND log_conversion.server_time <= \'2024-06-28 21:59:59\' AND log_conversion.idsite IN (\'1\')AND log_conversion.idgoal = 1 AND logva.server_time <= log_conversion.server_time AND lac.type = 1 GROUP BY log_conversion.idvisit, lac.idaction made by Matomo\\Dependencies\\Symfony\\Component\\Console\\Application->run, Piwik\\Console->doRun, Piwik\\Console->doRunImpl, Piwik\\Access::doAsSuperUser, Piwik\\Console->Piwik\\{closure}, call_user_func, Piwik\\Console->originDoRun, Matomo\\Dependencies\\Symfony\\Component\\Console\\Application->doRun, Matomo\\Dependencies\\Symfony\\Component\\Console\\Application->doRunCommand, Piwik\\Plugin\\ConsoleCommand->run, Matomo\\Dependencies\\Symfony\\Component\\Console\\Command\\Command->run, Piwik\\Plugin\\ConsoleCommand->execute, Piwik\\CliMulti\\RequestCommand->doExecute, require_once(\'/plugins/matomo/app/index.php\'), require_once(\'/plugins/matomo/app/core/dispatch.php\'), Piwik\\FrontController->dispatch, Piwik\\FrontController->doDispatch, call_user_func_array, Piwik\\Plugins\\API\\Controller->index, Piwik\\API\\Request->process, Piwik\\API\\Proxy->call, Piwik\\Context::executeWithQueryParameters, Piwik\\API\\Proxy->Piwik\\API\\{closure}, call_user_func_array, Piwik\\Plugins\\CoreAdminHome\\API->archiveReports, Piwik\\ArchiveProcessor\\Loader->prepareArchive, Piwik\\Context::changeIdSite, Piwik\\ArchiveProcessor\\Loader->Piwik\\ArchiveProcessor\\{closure}, Piwik\\ArchiveProcessor\\Loader->prepareArchiveImpl, Piwik\\ArchiveProcessor\\Loader->insertArchiveData, Piwik\\ArchiveProcessor\\Loader->prepareAllPluginsArchive, Piwik\\ArchiveProcessor\\PluginsArchiver->callAggregateAllPlugins, Piwik\\Plugin\\Archiver->callAggregateDayReport, Piwik\\ArchiveProcessor\\RecordBuilder->buildFromLogs, Piwik\\Plugins\\Actions\\RecordBuilders\\ActionReports->aggregate, Piwik\\Plugins\\Actions\\RecordBuilders\\ActionReports->archiveDayActionsGoals, Piwik\\Plugins\\Actions\\RecordBuilders\\ActionReports->archiveDayActionsGoalsPages, Piwik\\DataAccess\\LogAggregator->queryConversionsByPageView, Piwik\\DataAccess\\ArchivingDbAdapter->query, Piwik\\DataAccess\\ArchivingDbAdapter->callFunction, call_user_func_array, Piwik\\Db\\Adapter\\WordPress->query, Piwik\\Db\\Adapter\\WordPress->fetchAll {"result":"error","message":"WP DB Error: [1054] Unknown column \'log_conversion.pageviews_before\' in \'field list\' SQL: SELECT \\/*+ MAX_EXECUTION_TIME(7200000) *\\/ \\/* sites 1 *\\/ \\/* 2024-06-27,2024-06-28 *\\/ \\/* Actions ActionReports *\\/ \\/* trigger = CronArchive *\\/ \\t\\t\\t\\t log_conversion.idvisit AS idvisit, 1 AS idgoal, 1 AS `type`, lac.idaction AS idaction, COUNT(*) AS `1`, ROUND(SUM(log_conversion.revenue),2) AS `2`, COUNT(log_conversion.idvisit) AS `3`, ROUND(SUM(1 \\/ log_conversion.pageviews_before * log_conversion.revenue_subtotal),2) AS `4`, ROUND(SUM(1 \\/ log_conversion.pageviews_before * log_conversion.revenue_tax),2) AS `5`, ROUND(SUM(1 \\/ log_conversion.pageviews_before * log_conversion.revenue_shipping),2) AS `6`, ROUND(SUM(1 \\/ log_conversion.pageviews_before * log_conversion.revenue_discount),2) AS `7`, SUM(1 \\/ log_conversion.pageviews_before * log_conversion.items) AS `8`, log_conversion.pageviews_before AS `9`, SUM(1 \\/ log_conversion.pageviews_before) AS `10`, COUNT(*) AS `12`, ROUND(SUM(1 \\/ log_conversion.pageviews_before * log_conversion.revenue),2) AS `15` \\t\\t\\tFROM \\t\\t\\t\\t9aISZzD3Nr_matomo_log_conversion AS log_conversion RIGHT JOIN 9aISZzD3Nr_matomo_log_link_visit_action AS logva ON log_conversion.idvisit = logva.idvisit LEFT JOIN 9aISZzD3Nr_matomo_log_action AS lac ON logva.idaction_url = lac.idaction \\t\\t\\tWHERE \\t\\t\\t\\tlog_conversion.server_time >= ? \\t\\t\\t\\tAND log_conversion.server_time <= ? \\t\\t\\t\\tAND log_conversion.idsite IN (?)AND log_conversion.idgoal = 1 AND logva.server_time <= log_conversion.server_time AND lac.type = 1 \\t\\t\\tGROUP BY \\t\\t\\t\\tlog_conversion.idvisit, lac.idaction - in plugin Actions. #0 ... p\\/console(32): Matomo\\\\Dependencies\\\\Symfony\\\\Component\\\\Console\\\\Application->run()\\n#44 {main}"}\'' 'Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2024-06-28&format=json&trigger=archivephp: \'WordPress database error Unknown column \'log_conversion.pageviews_before\' in \'field list\' for query SELECT /*+ MAX_EXECUTION_TIME(7200000) */ /* sites 1 */ /* 2024-06-27,2024-06-28 */ /* Actions ActionReports */ /* trigger = CronArchive */ log_conversion.idvisit AS idvisit, 1 AS idgoal, 1 AS `type`, lac.idaction AS idaction, COUNT(*) AS `1`, ROUND(SUM(log_conversion.revenue),2) AS `2`, COUNT(log_conversion.idvisit) AS `3`, ROUND(SUM(1 / log_conversion.pageviews_before * log_conversion.revenue_subtotal),2) AS `4`, ROUND(SUM(1 / log_conversion.pageviews_before * log_conversion.revenue_tax),2) AS `5`, ROUND(SUM(1 / log_conversion.pageviews_before * log_conversion.revenue_shipping),2) AS `6`, ROUND(SUM(1 / log_conversion.pageviews_before * log_conversion.revenue_discount),2) AS `7`, SUM(1 / log_conversion.pageviews_before * log_conversion.items) AS `8`, log_conversion.pageviews_before AS `9`, SUM(1 / log_conversion.pageviews_before) AS `10`, COUNT(*) AS `12`, ROUND(SUM(1 / log_conversion.pageviews_before * log_conversion.revenue),2) AS `15` FROM 9aISZzD3Nr_matomo_log_conversion AS log_conversion RIGHT JOIN 9aISZzD3Nr_matomo_log_link_visit_action AS logva ON log_conversion.idvisit = logva.idvisit LEFT JOIN 9aISZzD3Nr_matomo_log_action AS lac ON logva.idaction_url = lac.idaction WHERE log_conversion.server_time >= \'2024-06-27 22:00:00\' AND log_conversion.server_time <= \'2024-06-28 21:59:59\' AND log_conversion.idsite IN (\'1\')AND log_conversion.idgoal = 1 AND logva.server_time <= log_conversion.server_time AND lac.type = 1 GROUP BY log_conversion.idvisit, lac.idaction made by Matomo\\Dependencies\\Symfony\\Component\\Console\\Application->run, Piwik\\Console->doRun, Piwik\\Console->doRunImpl, Piwik\\Access::doAsSuperUser, Piwik\\Console->Piwik\\{closure}, call_user_func, Piwik\\Console->originDoRun, Matomo\\Dependencies\\Symfony\\Component\\Console\\Application->doRun, Matomo\\Dependencies\\Symfony\\Component\\Console\\Application->doRunCommand, Piwik\\Plugin\\ConsoleCommand->run, Matomo\\Dependencies\\Symfony\\Component\\Console\\Command\\Command->run, Piwik\\Plugin\\ConsoleCommand->execute, Piwik\\CliMulti\\RequestCommand->doExecute, require_once(\'/plugins/matomo/app/index.php\'), require_once(\'/plugins/matomo/app/core/dispatch.php\'), Piwik\\FrontController->dispatch, Piwik\\FrontController->doDispatch, call_user_func_array, Piwik\\Plugins\\API\\Controller->index, Piwik\\API\\Request->process, Piwik\\API\\Proxy->call, Piwik\\Context::executeWithQueryParameters, Piwik\\API\\Proxy->Piwik\\API\\{closure}, call_user_func_array, Piwik\\Plugins\\CoreAdminHome\\API->archiveReports, Piwik\\ArchiveProcessor\\Loader->prepareArchive, Piwik\\Context::changeIdSite, Piwik\\ArchiveProcessor\\Loader->Piwik\\ArchiveProcessor\\{closure}, Piwik\\ArchiveProcessor\\Loader->prepareArchiveImpl, Piwik\\ArchiveProcessor\\Loader->insertArchiveData, Piwik\\ArchiveProcessor\\Loader->prepareAllPluginsArchive, Piwik\\ArchiveProcessor\\PluginsArchiver->callAggregateAllPlugins, Piwik\\Plugin\\Archiver->callAggregateDayReport, Piwik\\ArchiveProcessor\\RecordBuilder->buildFromLogs, Piwik\\Plugins\\Actions\\RecordBuilders\\ActionReports->aggregate, Piwik\\Plugins\\Actions\\RecordBuilders\\ActionReports->archiveDayActionsGoals, Piwik\\Plugins\\Actions\\RecordBuilders\\ActionReports->archiveDayActionsGoalsPages, Piwik\\DataAccess\\LogAggregator->queryConversionsByPageView, Piwik\\DataAccess\\ArchivingDbAdapter->query, Piwik\\DataAccess\\ArchivingDbAdapter->callFunction, call_user_func_array, Piwik\\Db\\Adapter\\WordPress->query, Piwik\\Db\\Adapter\\WordPress->fetchAll {"result":"error","message":"WP DB Error: [1054] Unknown column \'log_conversion.pageviews_before\' in \'field list\' SQL: SELECT \\/*+ MAX_EXECUTION_TIME(7200000) *\\/ \\/* sites 1 *\\/ \\/* 2024-06-27,2024-06-28 *\\/ \\/* Actions ActionReports *\\/ \\/* trigger = CronArchive *\\/ \\t\\t\\t\\t log_conversion.idvisit AS idvisit, 1 AS idgoal, 1 AS `type`, lac.idaction AS idaction, COUNT(*) AS `1`, ROUND(SUM(log_conversion.revenue),2) AS `2`, COUNT(log_conversion.idvisit) AS `3`, ROUND(SUM(1 \\/ log_conversion.pageviews_before * log_conversion.revenue_subtotal),2) AS `4`, ROUND(SUM(1 \\/ log_conversion.pageviews_before * log_conversion.revenue_tax),2) AS `5`, ROUND(SUM(1 \\/ log_conversion.pageviews_before * log_conversion.revenue_shipping),2) AS `6`, ROUND(SUM(1 \\/ log_conversion.pageviews_before * log_conversion.revenue_discount),2) AS `7`, SUM(1 \\/ log_conversion.pageviews_before * log_conversion.items) AS `8`, log_conversion.pageviews_before AS `9`, SUM(1 \\/ log_conversion.pageviews_before) AS `10`, COUNT(*) AS `12`, ROUND(SUM(1 \\/ log_conversion.pageviews_before * log_conversion.revenue),2) AS `15` \\t\\t\\tFROM \\t\\t\\t\\t9aISZzD3Nr_matomo_log_conversion AS log_conversion RIGHT JOIN 9aISZzD3Nr_matomo_log_link_visit_action AS logva ON log_conversion.idvisit = logva.idvisit LEFT JOIN 9aISZzD3Nr_matomo_log_action AS lac ON logva.idaction_url = lac.idaction \\t\\t\\tWHERE \\t\\t\\t\\tlog_conversion.server_time >= ? \\t\\t\\t\\tAND log_conversion.server_time <= ? \\t\\t\\t\\tAND log_conversion.idsite IN (?)AND log_conversion.idgoal = 1 AND logva.server_time <= log_conversion.server_time AND lac.type = 1 \\t\\t\\tGROUP BY \\t\\t\\t\\tlog_conversion.idvisit, lac.idaction - in plugin Actions. #0 \\/va ... p\\/console(32): Matomo\\\\Dependencies\\\\Symfony\\\\Component\\\\Console\\\\Application->run()\\n#44 {main}"}\'' 'Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2024-06-28&format=json&segment=referrerType%3D%3Dcampaign&trigger=archivephp. Response was \'WordPress database error Unknown column \'log_conversion.pageviews_before\' in \'field list\' for query SELECT /*+ MAX_EXECUTION_TIME(7200000) */ /* segmenthash TOKEN_REPLACED */ /* sites 1 */ /* 2024-06-27,2024-06-28 */ /* Actions ActionReports */ /* trigger = CronArchive */ log_conversion.idvisit AS idvisit, 1 AS idgoal, 1 AS `type`, lac.idaction AS idaction, COUNT(*) AS `1`, ROUND(SUM(log_conversion.revenue),2) AS `2`, COUNT(log_conversion.idvisit) AS `3`, ROUND(SUM(1 / log_conversion.pageviews_before * log_conversion.revenue_subtotal),2) AS `4`, ROUND(SUM(1 / log_conversion.pageviews_before * log_conversion.revenue_tax),2) AS `5`, ROUND(SUM(1 / log_conversion.pageviews_before * log_conversion.revenue_shipping),2) AS `6`, ROUND(SUM(1 / log_conversion.pageviews_before * log_conversion.revenue_discount),2) AS `7`, SUM(1 / log_conversion.pageviews_before * log_conversion.items) AS `8`, log_conversion.pageviews_before AS `9`, SUM(1 / log_conversion.pageviews_before) AS `10`, COUNT(*) AS `12`, ROUND(SUM(1 / log_conversion.pageviews_before * log_conversion.revenue),2) AS `15` FROM 9aISZzD3Nr_matomo_logtmpsegmentTOKEN_REPLACED AS logtmpsegmentTOKEN_REPLACED INNER JOIN 9aISZzD3Nr_matomo_log_conversion AS log_conversion ON log_conversion.idvisit = logtmpsegmentTOKEN_REPLACED.idvisit RIGHT JOIN 9aISZzD3Nr_matomo_log_link_visit_action AS logva ON log_conversion.idvisit = logva.idvisit LEFT JOIN 9aISZzD3Nr_matomo_log_action AS lac ON logva.idaction_url = lac.idaction WHERE log_conversion.idgoal = 1 AND logva.server_time <= log_conversion.server_time AND lac.type = 1 GROUP BY log_conversion.idvisit, lac.idaction made by Matomo\\Dependencies\\Symfony\\Component\\Console\\Application->run, Piwik\\Console->doRun, Piwik\\Console->doRunImpl, Piwik\\Access::doAsSuperUser, Piwik\\Console->Piwik\\{closure}, call_user_func, Piwik\\Console->originDoRun, Matomo\\Dependencies\\Symfony\\Component\\Console\\Application->doRun, Matomo\\Dependencies\\Symfony\\Component\\Console\\Application->doRunCommand, Piwik\\Plugin\\ConsoleCommand->run, Matomo\\Dependencies\\Symfony\\Component\\Console\\Command\\Command->run, Piwik\\Plugin\\ConsoleCommand->execute, Piwik\\CliMulti\\RequestCommand->doExecute, require_once(\'/plugins/matomo/app/index.php\'), require_once(\'/plugins/matomo/app/core/dispatch.php\'), Piwik\\FrontController->dispatch, Piwik\\FrontController->doDispatch, call_user_func_array, Piwik\\Plugins\\API\\Controller->index, Piwik\\API\\Request->process, Piwik\\API\\Proxy->call, Piwik\\Context::executeWithQueryParameters, Piwik\\API\\Proxy->Piwik\\API\\{closure}, call_user_func_array, Piwik\\Plugins\\CoreAdminHome\\API->archiveReports, Piwik\\ArchiveProcessor\\Loader->prepareArchive, Piwik\\Context::changeIdSite, Piwik\\ArchiveProcessor\\Loader->Piwik\\ArchiveProcessor\\{closure}, Piwik\\ArchiveProcessor\\Loader->prepareArchiveImpl, Piwik\\ArchiveProcessor\\Loader->insertArchiveData, Piwik\\ArchiveProcessor\\Loader->prepareAllPluginsArchive, Piwik\\ArchiveProcessor\\PluginsArchiver->callAggregateAllPlugins, Piwik\\Plugin\\Archiver->callAggregateDayReport, Piwik\\ArchiveProcessor\\RecordBuilder->buildFromLogs, Piwik\\Plugins\\Actions\\RecordBuilders\\ActionReports->aggregate, Piwik\\Plugins\\Actions\\RecordBuilders\\ActionReports->archiveDayActionsGoals, Piwik\\Plugins\\Actions\\RecordBuilders\\ActionReports->archiveDayActionsGoalsPages, Piwik\\DataAccess\\LogAggregator->queryConversionsByPageView, Piwik\\DataAccess\\ArchivingDbAdapter->query, Piwik\\DataAccess\\ArchivingDbAdapter->callFunction, call_user_func_array, Piwik\\Db\\Adapter\\WordPress->query, Piwik\\Db\\Adapter\\WordPress->fetchAll {"result":"error","message":"WP DB Error: [1054] Unknown column \'log_conversion.pageviews_before\' in \'field list\' SQL: SELECT \\/*+ MAX_EXECUTION_TIME(7200000) *\\/ \\/* segmenthash TOKEN_REPLACED *\\/ \\/* sites 1 *\\/ \\/* 2024-06-27,2024-06-28 *\\/ \\/* Actions ActionReports *\\/ \\/* trigger = CronArchive *\\/ \\t\\t\\t\\t log_conversion.idvisit AS idvisit, 1 AS idgoal, 1 AS `type`, lac.idaction AS idaction, COUNT(*) AS `1`, ROUND(SUM(log_conversion.revenue),2) AS `2`, COUNT(log_conversion.idvisit) AS `3`, ROUND(SUM(1 \\/ log_conversion.pageviews_before * log_conversion.revenue_subtotal),2) AS `4`, ROUND(SUM(1 \\/ log_conversion.pageviews_before * log_conversion.revenue_tax),2) AS `5`, ROUND(SUM(1 \\/ log_conversion.pageviews_before * log_conversion.revenue_shipping),2) AS `6`, ROUND(SUM(1 \\/ log_conversion.pageviews_before * log_conversion.revenue_discount),2) AS `7`, SUM(1 \\/ log_conversion.pageviews_before * log_conversion.items) AS `8`, log_conversion.pageviews_before AS `9`, SUM(1 \\/ log_conversion.pageviews_before) AS `10`, COUNT(*) AS `12`, ROUND(SUM(1 \\/ log_conversion.pageviews_before * log_conversion.revenue),2) AS `15` \\t\\t\\tFROM \\t\\t\\t\\t9aISZzD3Nr_matomo_logtmpsegmentTOKEN_REPLACED AS logtmpsegmentTOKEN_REPLACED INNER JOIN 9aISZzD3Nr_matomo_log_conversion AS log_conversion ON log_conversion.idvisit = logtmpsegmentTOKEN_REPLACED.idvisit RIGHT JOIN 9aISZzD3Nr_matomo_log_link_visit_action AS logva ON log_conversion.idvisit = logva.idvisit LEFT JOIN 9aISZzD3Nr_matomo_log_action AS lac ON logva.idaction_ur ... p\\/console(32): Matomo\\\\Dependencies\\\\Symfony\\\\Component\\\\Console\\\\Application->run()\\n#44 {main}"}\'' 'Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2024-06-28&format=json&segment=referrerType%3D%3Dcampaign&trigger=archivephp: \'WordPress database error Unknown column \'log_conversion.pageviews_before\' in \'field list\' for query SELECT /*+ MAX_EXECUTION_TIME(7200000) */ /* segmenthash TOKEN_REPLACED */ /* sites 1 */ /* 2024-06-27,2024-06-28 */ /* Actions ActionReports */ /* trigger = CronArchive */ log_conversion.idvisit AS idvisit, 1 AS idgoal, 1 AS `type`, lac.idaction AS idaction, COUNT(*) AS `1`, ROUND(SUM(log_conversion.revenue),2) AS `2`, COUNT(log_conversion.idvisit) AS `3`, ROUND(SUM(1 / log_conversion.pageviews_before * log_conversion.revenue_subtotal),2) AS `4`, ROUND(SUM(1 / log_conversion.pageviews_before * log_conversion.revenue_tax),2) AS `5`, ROUND(SUM(1 / log_conversion.pageviews_before * log_conversion.revenue_shipping),2) AS `6`, ROUND(SUM(1 / log_conversion.pageviews_before * log_conversion.revenue_discount),2) AS `7`, SUM(1 / log_conversion.pageviews_before * log_conversion.items) AS `8`, log_conversion.pageviews_before AS `9`, SUM(1 / log_conversion.pageviews_before) AS `10`, COUNT(*) AS `12`, ROUND(SUM(1 / log_conversion.pageviews_before * log_conversion.revenue),2) AS `15` FROM 9aISZzD3Nr_matomo_logtmpsegmentTOKEN_REPLACED AS logtmpsegmentTOKEN_REPLACED INNER JOIN 9aISZzD3Nr_matomo_log_conversion AS log_conversion ON log_conversion.idvisit = logtmpsegmentTOKEN_REPLACED.idvisit RIGHT JOIN 9aISZzD3Nr_matomo_log_link_visit_action AS logva ON log_conversion.idvisit = logva.idvisit LEFT JOIN 9aISZzD3Nr_matomo_log_action AS lac ON logva.idaction_url = lac.idaction WHERE log_conversion.idgoal = 1 AND logva.server_time <= log_conversion.server_time AND lac.type = 1 GROUP BY log_conversion.idvisit, lac.idaction made by Matomo\\Dependencies\\Symfony\\Component\\Console\\Application->run, Piwik\\Console->doRun, Piwik\\Console->doRunImpl, Piwik\\Access::doAsSuperUser, Piwik\\Console->Piwik\\{closure}, call_user_func, Piwik\\Console->originDoRun, Matomo\\Dependencies\\Symfony\\Component\\Console\\Application->doRun, Matomo\\Dependencies\\Symfony\\Component\\Console\\Application->doRunCommand, Piwik\\Plugin\\ConsoleCommand->run, Matomo\\Dependencies\\Symfony\\Component\\Console\\Command\\Command->run, Piwik\\Plugin\\ConsoleCommand->execute, Piwik\\CliMulti\\RequestCommand->doExecute, require_once(\'/plugins/matomo/app/index.php\'), require_once(\'/plugins/matomo/app/core/dispatch.php\'), Piwik\\FrontController->dispatch, Piwik\\FrontController->doDispatch, call_user_func_array, Piwik\\Plugins\\API\\Controller->index, Piwik\\API\\Request->process, Piwik\\API\\Proxy->call, Piwik\\Context::executeWithQueryParameters, Piwik\\API\\Proxy->Piwik\\API\\{closure}, call_user_func_array, Piwik\\Plugins\\CoreAdminHome\\API->archiveReports, Piwik\\ArchiveProcessor\\Loader->prepareArchive, Piwik\\Context::changeIdSite, Piwik\\ArchiveProcessor\\Loader->Piwik\\ArchiveProcessor\\{closure}, Piwik\\ArchiveProcessor\\Loader->prepareArchiveImpl, Piwik\\ArchiveProcessor\\Loader->insertArchiveData, Piwik\\ArchiveProcessor\\Loader->prepareAllPluginsArchive, Piwik\\ArchiveProcessor\\PluginsArchiver->callAggregateAllPlugins, Piwik\\Plugin\\Archiver->callAggregateDayReport, Piwik\\ArchiveProcessor\\RecordBuilder->buildFromLogs, Piwik\\Plugins\\Actions\\RecordBuilders\\ActionReports->aggregate, Piwik\\Plugins\\Actions\\RecordBuilders\\ActionReports->archiveDayActionsGoals, Piwik\\Plugins\\Actions\\RecordBuilders\\ActionReports->archiveDayActionsGoalsPages, Piwik\\DataAccess\\LogAggregator->queryConversionsByPageView, Piwik\\DataAccess\\ArchivingDbAdapter->query, Piwik\\DataAccess\\ArchivingDbAdapter->callFunction, call_user_func_array, Piwik\\Db\\Adapter\\WordPress->query, Piwik\\Db\\Adapter\\WordPress->fetchAll {"result":"error","message":"WP DB Error: [1054] Unknown column \'log_conversion.pageviews_before\' in \'field list\' SQL: SELECT \\/*+ MAX_EXECUTION_TIME(7200000) *\\/ \\/* segmenthash TOKEN_REPLACED *\\/ \\/* sites 1 *\\/ \\/* 2024-06-27,2024-06-28 *\\/ \\/* Actions ActionReports *\\/ \\/* trigger = CronArchive *\\/ \\t\\t\\t\\t log_conversion.idvisit AS idvisit, 1 AS idgoal, 1 AS `type`, lac.idaction AS idaction, COUNT(*) AS `1`, ROUND(SUM(log_conversion.revenue),2) AS `2`, COUNT(log_conversion.idvisit) AS `3`, ROUND(SUM(1 \\/ log_conversion.pageviews_before * log_conversion.revenue_subtotal),2) AS `4`, ROUND(SUM(1 \\/ log_conversion.pageviews_before * log_conversion.revenue_tax),2) AS `5`, ROUND(SUM(1 \\/ log_conversion.pageviews_before * log_conversion.revenue_shipping),2) AS `6`, ROUND(SUM(1 \\/ log_conversion.pageviews_before * log_conversion.revenue_discount),2) AS `7`, SUM(1 \\/ log_conversion.pageviews_before * log_conversion.items) AS `8`, log_conversion.pageviews_before AS `9`, SUM(1 \\/ log_conversion.pageviews_before) AS `10`, COUNT(*) AS `12`, ROUND(SUM(1 \\/ log_conversion.pageviews_before * log_conversion.revenue),2) AS `15` \\t\\t\\tFROM \\t\\t\\t\\t9aISZzD3Nr_matomo_logtmpsegmentTOKEN_REPLACED AS logtmpsegmentTOKEN_REPLACED INNER JOIN 9aISZzD3Nr_matomo_log_conversion AS log_conversion ON log_conversion.idvisit = logtmpsegmentTOKEN_REPLACED.idvisit RIGHT JOIN 9aISZzD3Nr_matomo_log_link_visit_action AS logva ON log_conversion.idvisit = logva.idvisit LEFT JOIN 9aISZzD3Nr_matomo_log_action AS lac ON logva.idaction_url = ... p\\/console(32): Matomo\\\\Dependencies\\\\Symfony\\\\Component\\\\Console\\\\Application->run()\\n#44 {main}"}\'' '4 total errors during this script execution, please investigate and try and fix these errors.' => ScheduledTasks.php:375; class-wp-hook.php:322; class-wp-hook.php:348; plugin.php:565; wp-cron.php:191;
Ok, I'm not sure how it occurred, but the original update finished but for some reason silently failed to actually do what it needed to. Are you able to run SQL directly? And can you tell me what hosting provider you are using?
@NicoHood if you're still interested in fixing this, let me know. I've added an easier way to apply the fix to the plugin (though it's not yet released so to use it you'll have to update some plugin files).
@diosmosis Sorry for responding late, i was on vacation and I dont look into github that often. tagging me however is good, to get a push.
I am using https://uberspace.de/de/ as hosting. I am not so happy about manual editing. Not that I am not "good" at this, but I want to avoid manual editing as much as possible, especially if you rollout the update anyways. Any plans, when it will be available?
@NicoHood you shouldn't need to now, it was released yesterday. Now there should be a text input next to the "Run Updater" button that says "Run updates from version". If you enter, 4.14.1 and click the button, it should re-run the specific database update that wasn't run originally.
I just checked my wordpress installation (without updating yet) and the error seems gone now. Maybe it took some time to update the error log? So should I still rerun the database update? Is it safe to rerun multiple times?
@NicoHood odd. If you don't see the error, you shouldn't need to rerun the database update. Though, yes, they are safe to run multiple times.
Hi! The latest update completely crashes my site on an upgrade. I've seen some reports in the wordpress forum and though that by waiting long enough this issue will solve, but it did not. I have a testing site where I always test the upgrades (luckly), so I am happy to try out everything you need.
Do you need more information from me or is this a known bug?