@tsteur opened this Issue on November 8th 2022 Member

This was supposed to be fixed in core as part of https://github.com/matomo-org/matomo/issues/16152 but maybe it requires a special change for custom reports as well. In https://github.com/matomo-org/matomo/issues/16152#issuecomment-372429476 it was mentioned that this was supposed to work for custom reports as well. Feel free to move this to custom reports issue project if needed.

Executed command:

./console customreports:archive --date=2022-03-01,today

We're still getting a failed archive email when a custom dimension is deleted:

Error: {"message":"Segment 'dimension1' is not a supported segment.","file":"/core/Segment.php","line":228,"backtrace":" on /core/Segment.php(228)\n#0 /core/Segment.php(276): Piwik\Segment->getSegmentByName('dimension1')\n#1 /core/Segment.php(254): Piwik\Segment->getExpressionsWithUnionsResolved(Array)\n#2 /core/Segment.php(168): Piwik\Segment->initializeSegment('dimension1==Con...', Array)\n#3 /plugins/CustomReports/Commands/ArchiveReports.php(191): Piwik\Segment->__construct('dimension1==Con...', Array)\n#4 /plugins/CustomReports/Commands/ArchiveReports.php(95): Piwik\Plugins\CustomReports\Commands\ArchiveReports->archiveCustomReports('4', Object(Piwik\Period\Day), 'dimension1==Con...', NULL)\n#5 /vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Piwik\Plugins\CustomReports\Commands\ArchiveReports->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))\n#6 /vendor/symfony/console/Symfony/Component/Console/Application.php(874): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))\n#7 /vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(Piwik\Plugins\CustomReports\Commands\ArchiveReports), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))\n#8 [internal function]: Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))\n#9 /core/Console.php(135): call_user_func(Array, Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))\n#10 /core/Access.php(670): Piwik\Console->Piwik{closure}()\n#11 /core/Console.php(136): Piwik\Access::doAsSuperUser(Object(Closure))\n#12 /core/Console.php(87): Piwik\Console->doRunImpl(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))\n#13 /vendor/symfony/console/Symfony/Component/Console/Application.php(126): Piwik\Console->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))\n#14 /console(32): Symfony\Component\Console\Application->run()\n#15 {main}","safemode_backtrace":"#0 [internal function]: Piwik\Plugins\Cloud\Controller->safemode(Array)\n#1 /core/FrontController.php(631): call_user_func_array(Array, Array)\n#2 /core/FrontController.php(169): Piwik\FrontController->doDispatch('Cloud', 'safemode', Array)\n#3 /core/FrontController.php(100): Piwik\FrontController->dispatch('CorePluginsAdmi...', 'safemode', Array)\n#4 /core/FrontController.php(140): Piwik\FrontController::(Array)\n#5 /core/Console.php(90): Piwik\FrontController::(Object(Exception))\n#6 /vendor/symfony/console/Symfony/Component/Console/Application.php(126): Piwik\Console->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))\n#7 /console(32): Symfony\Component\Console\Application->run()\n#8 {main}"}

@sgiehl commented on November 8th 2022 Member

@tsteur That seems more to be an issue of the CustomReports plugin. Looking at the stacktrace it seems the ArchiveReports command of the plugin is executed. That doesn't use the normal archiving process...

@tsteur commented on November 8th 2022 Member

OK. I was hoping we had fixed this in core or so. I've created the issue in Jira in PG-1542 and will close this.

This Issue was closed on November 8th 2022
Powered by GitHub Issue Mirror