Jump to content

Csv Reports Includes Html & Javascript


Brashquido

Recommended Posts

Using Blesta 3.0.6 on Windows 2012 Server / IIS 8 using PHP 5.4.20.

 

When generating any of the available reports under billing as CSV I am getting files that contain the CSV values at the top as expected. However after that there is a couple of hundred lines of HTML and JavaScript code.

 

Not a massive issue as it can be easily removed from the CSV, but shouldn't be there none the less.

Link to comment
Share on other sites

This is probably due to the output buffer not closing after downloading the CSV, but we're not able to duplicate this issue.

 

However, the fix should be simple. If you're comfortable updating a file, I'd appreciate your feedback on whether this fixes the problem for you.

 

Update /app/models/report_manager.php (line 231):

// Download from temp file
$this->Download->downloadFile($path_to_file, $new_file_name);
@unlink($path_to_file);

and change it to:

// Download from temp file
$this->Download->downloadFile($path_to_file, $new_file_name);
@unlink($path_to_file);
exit();
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...