Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Archiving seems to still fail when a custom dimension is deleted and custom reports are archived #19969

Closed
tsteur opened this issue Nov 8, 2022 · 2 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@tsteur
Copy link
Member

tsteur commented Nov 8, 2022

This was supposed to be fixed in core as part of #16152 but maybe it requires a special change for custom reports as well. In #16152 (comment) 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}"}

@tsteur tsteur added the Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. label Nov 8, 2022
@tsteur tsteur changed the title Archiving seems to still fail when a custom dimension is deleted Archiving seems to still fail when a custom dimension is deleted and custom reports are archived Nov 8, 2022
@sgiehl
Copy link
Member

sgiehl commented Nov 8, 2022

@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 tsteur added answered For when a question was asked and we referred to forum or answered it. and removed Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. labels Nov 8, 2022
@tsteur
Copy link
Member Author

tsteur commented Nov 8, 2022

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.

@tsteur tsteur closed this as completed Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

2 participants