-
Notifications
You must be signed in to change notification settings - Fork 14
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
WARNING | Trying to add two strings in DataTable\Row::sumRowArray #76
Comments
I didn't get this warning but it seems to be connected to some reports. Did you alter one of the BotTracker-reports, e.g. add columns or change the format/graph? |
Indeed, changing the reports table to bar graph and back to simple table triggers exactly these errors, but only with And now I found the trigger for those with Okay, so it's not about tracking bots, but about reading/visualising the report. |
OK, one step after the other. |
Many thanks. Let me know if I can help or do further tests here. I'll have a look through the related code Matomo-side as well. |
Sorry, but I cannot reproduce the error. My test enviroment is: I have no production-data so I wrote a simple php-page to simulate some bot-hits. Can you describe, how I can trigger the warning and where I can see it? |
With this two ways I can trigger the error is: Via Matomo Android app
Via Matomo web interface
The logs of warning severity appear in the Matomo log file, while I usually use the Log Viewer app to see them. When I trigger them freshly, then reload the log viewer on the other browser tab, they are additionally shown as large orange/yellow notice above the actual log viewer content: Interesting on web interface: When only "Visit Count" is selected from within the "Vertical bar graph" view, then changed to the pie chart, it does not trigger the error anymore. But when switching back to "Simple table" and back to "Pie graph", it re-appears. And now, after switching several times back and forth, suddenly the graphs show only one bot "Others", covering 100% of all visits. It seems to depend on whether the simple table is sorted by visits count or by e.g. bot name or last visit. And the behaviour also changes depending on whether the visualisation is switched from table view to graph or from one graph view to the other. The "Others 100%" reminds me of this issue: matomo-org/matomo#17615 The other thing is that obviously the BotTracker graph views do not switch/handle selected/shown metrics correctly. When switching to bar chart, also last visit, bot name and keyword are selected and get an individual graph (bot name and key word with zero height), instead of having the bot name on the x-axis below the bars. On the pie chart, only one metric is shown, which is bot name by default, which does not make any sense of course. When changing to the only reasonable visits count, the associated bot names are not shown (similar to bar chart), when then switching back to simple table view, only the visits count is in the table and a page reload required to have again all columns. The error is triggered with nearly every change in the visualisation. The "Top 10 Bots" report btw doesn't have any issue, it shows the visit counts with bot names associated correctly in every visualisation. The widgets suffers from the same issue for me. Here a screenshot from the bar chart when changing from simple table to it: The two empty check boxes (without label) show the "idsite" and "extra_stats" (strangely both with a number of 33, instead of expected 1, matching the log messages where those got confused as well) on bars and an extra "bot" named "Others" which based on the visit count seems to be the sum of all bots. To me it looks like this new handling of the summary row plays a role, as this "Others" entry appears here often combined with wrong visualised data. Just to rule it out, we have quite some plugins disabled:
|
OK, thanks for the detailed bug report.:thumbsup: I can now see the warnings. Then appear as soon as I switvh to the extendet table. As long as I use the simple table everything (even the pie graph and the vertival bar graph) looks good. |
Many thanks. Let me know if I can be of help, for testing a commit or so. |
I tried some changes but I didn't find the real problem or how I can tell matomo, which columns are numbers and which are not. If you want to test it, download the dev-4,.x-branch oder exchange at least the files: Maybe you have to reset your dashboard after that. |
Jep, I agree that the other visualisations don't make much sense anyway and the But the Matomo Android app still produces the error, trying to create three graphs but ending up with "No data for this graph" as mentioned above. Probably it makes sense to replace those with a single table with bot name and visits count. The other graphs in the app are mostly time series/evolution graphs while BotTracker has a single accumulated visits table only. The app uses the ImageGraph plugin which uses the Metadata API. It allows to produce other Graphs as well, but funnily on the here linked documentation page, the Pie chart is failing as well, so probably there is a bug in the API itself, or an incompatibility between the API the the ImageGraph plugin. |
I've bee trying for hours now, but I think it's impossible to create a report with 2 columns, that aren't numbers. The next thing I will try is to hide the lastVisit-column in the metadata, but I haven't found a way to add this data to the report. |
Sometimes, every 1-3 days, a random bot access causes large number of such log entries:
...
Those are the first and the last of such entries, framing a three-digits number of such logs, like once for each bot and each column/field. As can be seen, somehow two neighbour field values are somehow tried to be added to a single field and another field may hence be empty (
botActive
in first log). And then values seem to be shifted, to get a'botId' => 735
and'idsite' => 35
, which both do not exist (also not in the raw database), so even the logging itself seems to mix something up.First I though it might happen when the BotTracker settings are saved, as then all those database entries are written, but neither could I find an issue in the related code, nor could I replicate it. The log error instead appears independently of settings changes and repeatedly without touching settings.
Most likely it has something to do with PHP8.0 and I'm not sure if the Matomo archive CLI/cron job may be involved, if it includes archiving the current BotTracker data and does something wrong there? The database itself btw looks pretty fine, no errors no suspicious entries. The extended stats table is not affected by this.
The text was updated successfully, but these errors were encountered: