-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
What happened?
This seems to be a Matomo 5 regression.
This fatal error happened on 5.0.0-rc8
Error: {"message":"Call to a member function getSqlSegment() on null","file":"/core/Segment.php","line":407,"request_id":"c983d","backtrace":" on /core/Segment.php(407)\n#0 /core/Segment.php(269): Piwik\Segment->getCleanedExpression(Array)\n#1 /core/Segment.php(151): Piwik\Segment->initializeSegment('dimension3==mon...', Array)\n#2 /plugins/SegmentEditor/API.php(421): Piwik\Segment->__construct('dimension3==mon...', Array)\n#3 /plugins/SegmentEditor/API.php(398): Piwik\Plugins\SegmentEditor\API->filterSegmentsWithDisabledElements(Array, false)\n#4 [internal function]: Piwik\Plugins\SegmentEditor\API->getAll(false)\n#5 /core/API/Proxy.php(255): call_user_func_array(Array, Array)\n#6 /core/Context.php(28): Piwik\API\Proxy->Piwik\API\{closure}()\n#7 /core/API/Proxy.php(346): Piwik\Context::executeWithQueryParameters(Array, Object(Closure))\n#8 /core/API/Request.php(272): Piwik\API\Proxy->call('\\Piwik\\Plugins\\...', 'getAll', Array)\n#9 /core/API/Request.php(583): Piwik\API\Request->process()\n#10 /plugins/SegmentEditor/SegmentEditor.php(390): Piwik\API\Request::processRequest('SegmentEditor.g...', Array, Array)\n#11 /core/Segment.php(681): Piwik\Plugins\SegmentEditor\SegmentEditor::getAllSegmentsForSite(false)\n#12 /plugins/API/Filter/DataComparisonFilter.php(393): Piwik\Segment->getStoredSegmentName(false)\n#13 /plugins/API/Filter/DataComparisonFilter.php(218): Piwik\Plugins\API\Filter\DataComparisonFilter->getMetadataFromModifiedParams(Array)\n#14 /core/API/DataTablePostProcessor.php(519): Piwik\Plugins\API\Filter\DataComparisonFilter->compare(Object(Piwik\DataTable))\n#15 /core/API/DataTablePostProcessor.php(124): Piwik\API\DataTablePostProcessor->applyComparison(Object(Piwik\DataTable))\n#16 /core/Plugin/Visualization.php(561): Piwik\API\DataTablePostProcessor->process(Object(Piwik\DataTable))\n#17 /core/Plugin/Visualization.php(194): Piwik\Plugin\Visualization->applyFilters()\n#18 /core/Plugin/Report.php(344): Piwik\Plugin\Visualization->render()\n#19 /plugins/CoreHome/Controller.php(59): Piwik\Plugin\Report->render()\n#20 [internal function]: Piwik\Plugins\CoreHome\Controller->renderReportWidget(Object(Piwik\Plugins\Referrers\Reports\GetReferrerType))\n#21 /core/FrontController.php(637): call_user_func_array(Array, Array)\n#22 /core/FrontController.php(169): Piwik\FrontController->doDispatch('Referrers', 'getReferrerType', Array)\n#23 /core/dispatch.php(32): Piwik\FrontController->dispatch()\n#24 /index.php(25): require_once('/c...')\n#25 {main}","safemode_backtrace":"#0 [internal function]: Piwik\Plugins\Cloud\Controller->safemode(Array)\n#1 /core/FrontController.php(637): 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/FrontController.php(196): Piwik\FrontController::(Object(Error))\n#6 /core/dispatch.php(32): Piwik\FrontController->dispatch()\n#7 /index.php(25): require_once('/c...')\n#8 {main}"}
URL: /index.php?segment=revenueOrder%3C0.01&date=2023-08-01,2023-11-19&module=Referrers&format=html&forceView=1&viewDataTable=tableGoals&action=getReferrerType&documentationForGoalsPage=1&idGoal=0&idSite=11&period=range&comparePeriods%5B%5D=range&compareDates%5B%5D=2023-04-13%2C2023-07-31&widget=&showtitle=1&random=6750
Referrer: /index.php?module=CoreHome&action=index&idSite=11&period=day&date=yesterday&updated=1
Similar issue happens for some when sending scheduled reports:
[2023-11-20 02:32:05] piwik.DEBUG: Task Piwik\Plugins\ScheduledReports\API.sendReport_1 is scheduled to run again for 2023-11-27. {"task":"Piwik\Plugins\ScheduledReports\API.sendReport_1","date":"[object] (Piwik\Date: 2023-11-27)"} {"class":"CoreAdminHome","request_id":"26468"}
[2023-11-20 02:32:05] piwik.INFO: Scheduler: executing task Piwik\Plugins\ScheduledReports\API.sendReport_1... {"taskName":"Piwik\Plugins\ScheduledReports\API.sendReport_1"} {"class":"CoreAdminHome","request_id":"26468"}
[2023-11-20 02:32:05] piwik.ERROR: Scheduler: Error Call to a member function getSqlSegment() on null for task 'Piwik\Plugins\ScheduledReports\API.sendReport_1' {"errorMessage":"Call to a member function getSqlSegment() on null","task":"Piwik\Plugins\ScheduledReports\API.sendReport_1"} {"class":"CoreAdminHome","request_id":"26468"}
What should happen?
No error
How can this be reproduced?
Unsure.
Maybe the stack trace helps?
Matomo major version
Matomo 5
Matomo minor or patch Version
0
PHP version
.
Server operating system
.
What browsers are you seeing the problem on?
No response
Computer operating system
.
Relevant log output
No response
Validations
- Read our Contributing Guidelines.
- Follow our Security Policy.
- Check that there isn't already an issue that reports the same bug to avoid creating duplicates.
- The provided steps to reproduce is a minimal reproducible of the Bug.