In order to reproduce the error you have to setup greek as a language, create a form and the go to results -> download the file will have only the extension like "xls", "tcsv", etc. I'm not sure why we don't use just (probably for security issues?).

$export_name = $node->title;

In webform/includes/webform.report.inc:

function webform_results_download($node, $export_info) {
  global $user;
  $export_name = _webform_safe_name($node->title);

  if (empty($export_name)) {
      $export_name  = t('Untitled'); // << the fix
  }

Comments

jmontoya’s picture

Title: _webform_safe_name return empty in the download file has a greek as a title » _webform_safe_name return empty in the download file has title in greek.
Issue summary: View changes
danchadwick’s picture

Version: 7.x-3.x-dev » 7.x-4.x-dev

This may be relevant to 7.x-4.x. Needs testing.

Version 7.x-3.x is receiving critical bug fixes only.

  • DanChadwick committed 3e8629c on 7.x-4.x
    Issue #2160695 by jmontoya: Fixed _webform_safe_name return empty in the...
  • DanChadwick committed 019f655 on 8.x-4.x
    Issue #2160695 by jmontoya: Fixed _webform_safe_name return empty in the...
danchadwick’s picture

Version: 7.x-4.x-dev » 8.x-4.x-dev
Status: Active » Fixed
StatusFileSize
new1 KB

Thanks for the code. I tweaked it slightly. "empty()" doesn't do what you might expect with strings. For example, "0" is considered empty. !strlen() is better in this instance.

Committed to 7.x-4.x and 8.x

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

danchadwick’s picture

Version: 8.x-4.x-dev » 7.x-4.x-dev