Site cannot be Reached CSV export

when trying to export to CSV i get "site cannot be reached"
below is the error log , do you have any ideas?

[20-Feb-2018 14:43:39 Europe/London] PHP Fatal error: Uncaught Error: [] operator not supported for strings in /home/growthhub/public_html/modules/KReports/KReport.php:1067
Stack trace:
#0 /home/growthhub/public_html/modules/KReports/Plugins/Integration/kcsvexport/controller/pluginkcsvexportcontroller.php(53): KReport->createCSV(NULL)
#1 /home/growthhub/public_html/modules/KReports/KReport.php(319): pluginkcsvexportcontroller->action_export(Array)
#2 /home/growthhub/public_html/KREST/extensions/KReporter.php(169): KReportPluginManager->processPluginAction(‘kcsvexport’, ‘action_export’, Array)
#3 [internal function]: {closure}(‘kcsvexport’, ‘export’)
#4 /home/growthhub/public_html/KREST/Slim/Route.php(468): call_user_func_array(Object(Closure), Array)
#5 /home/growthhub/public_html/KREST/Slim/Slim.php(1357): Slim\Route->dispatch()
#6 /home/growthhub/public_html/KREST/Slim/Middleware/Flash.php(85): Slim\Slim->call()
#7 /home/growthhub/public_html/KREST/Slim/Middleware/MethodOverride.php(92): Slim\Middleware\Flash->call()
#8 /home/growthhub/public_html/KREST/Slim/C in /home/growthhub/public_html/modules/KReports/KReport.php on line 1067

Stephen,
how does your report look like? Do you have multinemum values in your export?
Val

Hi Val, happens on all reports. but this simple example is just account name and a URL in columns. no charts
no grouping formatting or anything else.

Stephen,
would you remind me your KReporter Version and your php version?
Val

Hi Val, in this case we have php 7
Kbase 4.2
kcore 4.2
Krest 2.5.3

Hi Stephen,
php7.0 or php7.1 ?
It makes a big difference indeed.
Val

Hi Val, sorry it is currently running php 7.1

ok. KReporter 4.2 is not ready for 7.1.
KReporter 4.3 will. We are in testing phase right now.
I will take a look a t export functinality under 7.1, I might be able to send you a code sample to replace.

Stephen,
for CSV export under php7.1 please modify following in
modules/KReports/KReport.php

line 1074: $fieldArray = ‘’;
change to $fieldArray = array();

That should be enough.

We also corrected CSV formating. You may also change
line 1094: $header .= iconv(“UTF-8”, $current_user->getPreference(‘default_export_charset’), $fieldArray [‘name’]) . $current_user->getPreference(‘export_delimiter’);

change to: $header .= ‘"’ .iconv(“UTF-8”, $current_user->getPreference(‘default_export_charset’), $fieldArray [‘name’]) . ‘"’ . $current_user->getPreference(‘export_delimiter’);

CSV export shall work with the change on line 1074 but you will encounter other problems.
PHP7.1 capability of KReporter contains few changes but these are dispatched among many files. Therefore I won’t list them but keep you posted as soon as KReporter 4.3 is released.

Val

Hi Val, that does seem to have fixed the issue thanks very much for your assistance.

Hi!

I get the same error with Kreporter 4.2 but on PHP 7.2.34 (on SuiteCRM). Is there any fix to make the CSV export work?

Thanks!

kylix: KReporter 4.2 is no longer supported and I can’t get it work on a SuiteCRM. I don’t know which version you have, probably older than 7.10 or you have another theme than the default theme.
I still have a SugarCRM CE 6.5.26 on which I installed a KReporter 4.2. CSV export works. But of course it runs under php.5.6.
Without error from the php log I won’t be able to guess what’s wrong. What I can do is give you access to KReporter 4.4 on my google drive. This is the link: KReporter4.4 - Google Drive
KReporter 4.4 has SuiteCRM support. At least for a SuiteCRM 7.10. Don’t now right now where they are with releases and to which extend a KReporter 4.4 will work.

I strongly advise to upgrade to SpiceCRM though.