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

Fix warning Trying to add two strings in DataTable\Row::sumRowArray #21420

Merged
merged 2 commits into from
Oct 19, 2023

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Oct 19, 2023

Description:

fixes DEV-17267 #21373

In the stack trace you can see this happens with label "-2". The evolution metric fails with an exception because the site -2 does not exist when trying to determine the currency symbol.

I reproduced it multiple times with this patch and without. With this patch the scheduled report works but not without.

image

Review

@tsteur tsteur requested a review from mneudert October 19, 2023 21:34
@tsteur tsteur added the Needs Review PRs that need a code review label Oct 19, 2023
@tsteur
Copy link
Member Author

tsteur commented Oct 19, 2023

I believe the issue might be only reproducible if the ProxySite plugin is enabled and configured. See fromProxySite=1 parameter
image

@tsteur
Copy link
Member Author

tsteur commented Oct 19, 2023

Without this patch, below exception happens and the totals aren't processed correctly thus leading to issues later on
image

Copy link
Member

@mneudert mneudert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can confirm all of the initial exception, the ProxySite plugin creating the warning and the PR fixing it 👍

Will update the changed fixture and merge after final check the test is also affected by the problem.

@michalkleiner
Copy link
Contributor

Is it a valid scenario that the site ID can be -2? Do we need to look at where that might come from? Or is it a feature of the proxysite to use negative number IDs?

@mneudert
Copy link
Member

It should never be below zero, in this case the label being -2 (for the totals, like summary being magic -1) is passed as the siteId to fetch the currency label.

Will have a deeper look into the inner working why exactly that plugin highlights this issue, my guess is some shenanigans with API-Call-Interception, but it is not the actual cause of the problem.

@mneudert mneudert merged commit 2ce56ce into 5.x-dev Oct 19, 2023
@mneudert mneudert deleted the fixevo branch October 19, 2023 23:44
@@ -342,5 +342,16 @@
</result>
</reportMetadata>
<reportTotal>
<nb_visits>9</nb_visits>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice this fixed a bug 👍

@sgiehl sgiehl added this to the 5.0.0 milestone Oct 30, 2023
@sgiehl sgiehl added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review 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 this pull request may close these issues.

4 participants