Skip to content

Matomo 5 Upgrade issue, userId is not a supported segment, archiving fails #21339

@tsteur

Description

@tsteur

This is likely related to https://github.com/matomo-org/matomo/pull/21218/files

refs #21318

We updated to Matomo 5, now archiving fails for some customers with below error and reports are no longer being processed. The update should probably delete any segment that uses this segment as it's no longer available for the given site?

[2023-10-02 21:06:08] piwik.ERROR: Uncaught exception in API: Exception: Segment 'userId' is not a supported segment. in /Segment.php:235 Stack trace: #0 /Segment.php(283): Piwik\Segment->getSegmentByName('userId') #1 /Segment.php(261): Piwik\Segment->getExpressionsWithUnionsResolved(Array) #2 /Segment.php(169): Piwik\Segment->initializeSegment('userId!=', Array) #3 /var/www/html/plugins/CoreAdminHome/API.php(285): Piwik\Segment->__construct('userId%21%3D', Array, Object(Piwik\Date), Object(Piwik\Date)) #4 [internal function]: Piwik\Plugins\CoreAdminHome\API->archiveReports('47', Object(Piwik\Period\Month), '2023-10-01', 'userId%21%3D', false, false) #5 /API/Proxy.php(255): call_user_func_array(Array, Array) #6 /Context.php(28): Piwik\API\Proxy->Piwik\API\{closure}() #7 /API/Proxy.php(346): Piwik\Context::executeWithQueryParameters(Array, Object(Closure)) #8 /API/Request.php(272): Piwik\API\Proxy->call('\\Piwik\\Plugins\\...', 'archiveReports', Array) #9 /var/www/html/plugins/API/Controller.php(45): Piwik\API\Request->process() #10 [internal function]: Piwik\Plugins\API\Controller->index() #11 /FrontController.php(637): call_user_func_array(Array, Array) #12 /FrontController.php(169): Piwik\FrontController->doDispatch('API', false, Array) #13 /dispatch.php(32): Piwik\FrontController->dispatch() #14 /var/www/html/index.php(25): require_once('/var/www/html/c...') #15 /CliMulti/RequestCommand.php(75): require_once('/var/www/html/i...') #16 /Plugin/ConsoleCommand.php(110): Piwik\CliMulti\Req

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugFor errors / faults / flaws / inconsistencies etc.not-in-changelogFor issues or pull requests that should not be included in our release changelog on matomo.org.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions