Skip to content

Output Segment ID or Name with Exception #18436

@Starker3

Description

@Starker3

When users run a database update and have segments that use unsupported segment conditions (For example when a plugin was removed or a dimension disabled) it results in an exception during the database upgrade.

For example, when a dimension is disabled but used in a segment we will see the following sort of error:

./console core:update --yes -vvv
*** Update ***
Database Upgrade Required
Your Matomo database is out-of-date, and must be upgraded before you can continue.
Matomo database will be upgraded from version 4.5.0 to the new version 4.6.1.

ERROR [2021-12-01 11:47:55] 51704 Uncaught exception: /matomo/core/Segment.php(215): Segment 'dimension1' is not a supported segment. [Query: , CLI mode: 1]
DEBUG [2021-12-01 11:47:55] 51704 Loaded plugins: (...)

[Exception]
Segment 'dimension1' is not a supported segment.

Exception trace:
(...)

It would be much easier to troubleshoot if we were to output the Segment name or Segment ID that has the unsupported condition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Easier debuggingFor issues that make troubleshooting issues for developers easier.EnhancementFor new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.Help wantedBeginner friendly issues or issues where we'd highly appreciate community's help and involvement.c: PlatformFor Matomo platform changes that aren't impacting any of our APIs but improve the core itself.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions