Error when viewing the report


#1

Hi when i wanna see the graphics googlecharts its apper emplty and with this error on log:

[Mon Oct 22 22:13:24.935430 2018] [php7:error] [pid 8172:tid 1752] [client 104.254.245.224:64023] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function KReportRenderer::__construct(), 0 passed in C:\xampp\htdocs\modules\KReports\Plugins\Visualization\googlecharts\kGoogleCharts.php on line 125 and exactly 1 expected in C:\xampp\htdocs\modules\KReports\KReport.php:2047\nStack trace:\n#0 C:\xampp\htdocs\modules\KReports\Plugins\Visualization\googlecharts\kGoogleCharts.php(125): KReportRenderer->__construct()\n#1 C:\xampp\htdocs\modules\KReports\Plugins\Visualization\googlecharts\kGoogleCharts.php(87): kGoogleChart->convertRawToGoogleData(Array, Array, Array)\n#2 C:\xampp\htdocs\modules\KReports\Plugins\Visualization\googlecharts\kGoogleCharts.php(37): kGoogleChart->getChartData(Object(KReport), Array, ‘0’, Array)\n#3 C:\xampp\htdocs\modules\KReports\KReportRESTHandler.php(1274): kGoogleChart->getItem(‘kb8743d2bb9314e…’, Object(KReport), Array, Array, ‘0’)\n#4 C:\xampp\htdocs\KREST\extensions\KReporter.php(260): KReporterRESTHandler->getVisualization(‘f6c97c7a-e3b5-4…’, Array)\n#5 [internal function]: {clos in C:\xampp\htdocs\modules\KReports\KReport.php on line 2047, referer: http://127.0.0.1/index.php?module=KReports&action=DetailView&record=f6c97c7a-e3b5-496e-8167-3df70a249134


#2

My PHP version is 7.2.9

I do not know if this has something to do with the problem


#3

The error you have is a typical php7 error which a 7.1 would already throw.
KReporter 4.2 is tested for php 7.1.
Which KReporter version do you have?


#4

Just saw the version in screenshot. You already have a 4.2.
I’ll check the googlechart plugin.


#5

I have to review my statement. php7.1 is supported from version 4.3 on.
KReporter 4.3 was not published as download package but only as part of SpiceCRM 2018.04.00.
We are preparing version 4.4 that will be released as download package this fall. No fixed date but it will be soon.


#6

Hi maretval thanks for the attention

What i should do then downgrade PHP version?


#7

php 5.6 will do.
php 7.0 should do (you will get lots of warnings in php error log)


#8

Done all work correctly now with php 5.6