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

JS error in segment filter widget in custom reports #16369

Closed
tsteur opened this issue Sep 2, 2020 · 2 comments · Fixed by #16496
Closed

JS error in segment filter widget in custom reports #16369

tsteur opened this issue Sep 2, 2020 · 2 comments · Fixed by #16496
Labels
Bug For errors / faults / flaws / inconsistencies etc. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Milestone

Comments

@tsteur
Copy link
Member

tsteur commented Sep 2, 2020

image

Happens when you click on "add and condition"

image

seems to fail here:
image

Creating this here since the segment widget is in core. The feature still seems to work without any issues so far so if it's not an easy fix we might just ignore it.

refs #16368

@tsteur tsteur added the Bug For errors / faults / flaws / inconsistencies etc. label Sep 2, 2020
@tsteur tsteur modified the milestones: 4.0.0, 4.0.0 RC Sep 2, 2020
@sgiehl
Copy link
Member

sgiehl commented Sep 29, 2020

That was a real though one to debug. It is indeed triggered by the closest method. But while bubbling up the elements somewhere in the deep of materialize' javascript it tries to access the matches method of an element. But in that special case the element seems to be the form element, which contains the segment editor. The segment editor itself contains an element with the name matches, which thus is part of the form. That causes el.matches not to contain the actual method it should be, but to hold the matches form element instead. That causes the error as it tries to use the form element as callback later...
A possible fix would be to rename the form field or to remove it's name completely.

@tsteur
Copy link
Member Author

tsteur commented Sep 29, 2020

Great find @sgiehl Sounds good to rename the form field 👍

@mattab mattab added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Nov 23, 2020
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. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants