Googlemap visualization does not work when Calculation element active

Kordian

Member
Hi,
Joomla 3.8, new version of php - migrated from 5.6 to 7.2.
I have visualizations on google maps. They stopped working after the php upgrade - simply do not display anymore.
I found that if I deactivate Fabrik element - Calculation in the backend, the visualizations start displaying correctly.
Is that a bug of some kind?
Of course, I need calculation for other purposes, so it is no solution for me.
Do not ask me what these two elements have in common, I am not an expert and that is why I am writing here.
Thanks in advance for any help!
 
Which Joomla, which Fabrik version?
Is your calc code php7.2?
Check for JS errors in your browser dev console.
 
Joomla 3.8.12, Fabrik 3.8.1
Do not understand question no 2.
Do not know how to check for js errors, warned I am no expert :)
 
What is the code in your calc?

There's no generic issue with using calcs with the map viz, so it's probably something specific to your PHP code in the calc which is causing problems in 7.2.

-- hugh
 
What is the code in your calc?

There's no generic issue with using calcs with the map viz, so it's probably something specific to your PHP code in the calc which is causing problems in 7.2.

-- hugh
Where to find this code? It has never been changed. Is standard and no changes to the Fabric calc element code has been made. Worked on Joomla 2.5, 3.8.12 with php 5.4 amd 5.6.
 
And I do not use this element in neither of the tables used for visualizations... If that is what you mean.
 
Last edited:
The visualisations are inserted into articles and articles applied to menu. When I turn the calculation element on and move to this article, I get the error "Invalid numeric literal"
 
As written before, I do not use any calculation in the visualizations. The rest works fine.
I have this php code in different tables:

if($data['gps_dane___RCON'] == '' || $data['gps_dane___RCON'] == 0){
$data = (float)$data['gps_dane___speed']*3.6;
}else{
$data = (float)$data['gps_dane___speed']*1.852;
}
return round($data,2);

These tables work fine.
 
The calc will still get executed, if it's on the table your viz uses.

You are getting an error from PHP 7, because whatever is in gps_dane___speed is an invalid number. Either it starts with a 0 and has a digit more than 8 (PHP treats numbers starting with 0 as octal), or has some other non-numeric problem.

You could try seeing what is in that data. Put this as the first line in your calc:

Code:
var_dump($data['gps_dane___speed']);exit;

... and then load the viz. That should give you an otherwise blank page with just the debug output.

Copy and paste that debug output here.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top