@sgiehl opened this Pull Request on April 5th 2022 Member

Description:

While testing the vue migration of the GDPR tools, my log was spammed with a lot warnings like

WARNING API[2022-04-05 16:36:18 UTC] [aae03] /srv/matomo/core/DataTable/Row.php(808): Trying to add two strings in DataTable\Row::sumRowArray

I'm pretty sure we already had a couple of issues on that one. Digging deeper into the code showed that a call to PrivacyManager.findDataSubjects applies the Datatable PostProcessor to the result. This also tries to generate a totals row by default, resulting in the warnings, as almost all columns are strings.

I'm not sure if that is the most elegant solution, but disabling the PostProcessor for the API method fixes the issue. As PrivacyManager.findDataSubjects internally only calls Live.getLastVisitsDetails, which already applies the PostProcessor, it shouldn't be needed anyway.

Review

@sgiehl commented on April 6th 2022 Member

@tsteur I have added two tests for that method

@sgiehl commented on April 7th 2022 Member

I tested it in the UI and it shows null. Not sure if that's a regression or always been there?

That seems to have been a regression from 4.7.0 where it was migrated to vue. Just pushed a fix.

@tsteur commented on April 7th 2022 Member

👍 lgtm if tests pass

@sgiehl commented on April 8th 2022 Member

Test failures are unrelated to the changes here.

This Pull Request was closed on April 8th 2022
Powered by GitHub Issue Mirror