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

Tracking request may trigger a warning when providing an invalid regex #16153

Closed
tsteur opened this issue Mar 15, 2018 · 3 comments · Fixed by #18158
Closed

Tracking request may trigger a warning when providing an invalid regex #16153

tsteur opened this issue Mar 15, 2018 · 3 comments · Fixed by #18158
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc. c: Custom Dimensions For issues related to the Custom Dimensions plugin.
Milestone

Comments

@tsteur
Copy link
Member

tsteur commented Mar 15, 2018

For example to reproduce create dimension in action scope using below regex:

[{"dimension":"url","pattern":"/abcdefghijkl(*)/"}]

See https://3v4l.org/8ENBl trigggers a warning in the logs:

PHP Warning: preg_match(): Compilation failed: nothing to repeat at offset 15 in plugins/CustomDimensions/Dimension/Extraction.php on line 117

Ideally, in all plugins where it is possible to define a regex, we validate that the regex is at "valid". For example Goals etc. This will increase the correctness of the tracked data.

If the regex is not valid, then an error should be shown.

@tsteur
Copy link
Member Author

tsteur commented Apr 6, 2018

Be good if this is something that could be looked at. @mattab

@mattab
Copy link
Member

mattab commented Apr 9, 2018

Sounds good. From now on we'll take a closer look at the Current sprint issues. cc @diosmosis

@diosmosis diosmosis self-assigned this Apr 9, 2018
@tsteur tsteur transferred this issue from matomo-org/plugin-CustomDimensions Jun 29, 2020
@tsteur tsteur added Bug For errors / faults / flaws / inconsistencies etc. c: Custom Dimensions For issues related to the Custom Dimensions plugin. labels Jun 29, 2020
@tsteur tsteur added this to the 4.2.0 milestone Jun 29, 2020
@tsteur
Copy link
Member Author

tsteur commented Jul 22, 2021

Logic is done in the premium features (eg funnels) but not in custom dimensions

@peterhashair peterhashair self-assigned this Oct 12, 2021
@peterhashair peterhashair linked a pull request Oct 15, 2021 that will close this issue
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. c: Custom Dimensions For issues related to the Custom Dimensions plugin.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants