-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Fatal error: ceil(): Argument #1 ($num) must be of type int|float, string given in BaseDraw.php #19940
Comments
This is yet another issue with numbers that a formatted to early. The ImageGraph fetches the numbers formatted from the database. Using those for calculations might result in failures. matomo/plugins/ImageGraph/API.php Lines 557 to 573 in a36b45a
But this part actually might result in a invalid number. The error above seems to come from a revenue like I tried simply using the unformatted metrics for ImageGraph (see https://github.com/matomo-org/matomo/compare/m19940?expand=1), which fixes the problem above. But that means that most percent values, like conversion rate, are then not formatted at all and are used as their rate value, e.g. This is actually a more general problem. Not sure if we already have a extra issue about that or only discussed that on various other ones. But the percentage metrics should actually not do any calculations while formatting. We might need to implement a way, that those metrics are always "calculated" automatically and formatted only when needed. |
Do we now have an issue tracking the more general case @sgiehl, or could you please create one? |
FYI this happened again a few times in GridGraph.php . Not BaseDraw.php |
This has happened again in |
This happened again: |
This happened again |
I've seen multiple reports of this in cloud alerts/logs. Payload example:
|
This happened again |
2 similar comments
This happened again |
This happened again |
This is still happening regularly |
This is still happening |
This error is still happening in Matomo 5. Note that below is about GridGraph.php and not BaseDraw.php. I comment them in here as my other specific issue for this in #20616 was closed with a reference being a duplicate. Can we have a fix for this some time? cc @Stan-vw
|
This is still happening multiple times per week for customers |
Looking at GridGraph L137, we use |
I understand from the team that it's blocked by #20701 which isn't a quick fix |
This just happened again quite a few times:
|
I also have issues with this bug. Matomo regularly shows revenue from a product which is priced at ex. $7,500 (with that EXACT formatting) as having made $7. Many, many currencies and number representations around the globe use commas as a visual separator (and specifically not as a decimal separator), and it's mildly atrocious that it hasn't been fixed in so long. This is an easy fix for an organization with multiple engineers - in fact, it's a problem I've had to solve for basic technical interview rounds. It has been a bug for far too long. |
See details below:
URL: /index.php?module=API&method=ImageGraph.get&idSite=1&apiModule=Goals&apiAction=get&token_auth=XYZANONYMIZED&idGoal=ecommerceOrder&period=day&date=2022-10-03,2022-11-01&filter_sort_column=revenue&column=revenue&columns=revenue&language=en&width=984&height=450&fontSize=27&showMetricTitle=0&aliasedGraph=1&legendAppendMetric=0&backgroundColor=efefef&gridColor=dcdcdc&colors=3450A3%2C43a047&legendFontSize=27&cacherand=7280344
The text was updated successfully, but these errors were encountered: