When downloading results, I get the following in the watchdog table...

Notice: Undefined variable: row_count in webform_results_download()..(line 832 of webform\includes\webform.report.inc)
Notice: Undefined variable: options in webform_results_download() (line 832 of webform\includes\webform.report.inc)

Comments

This looks like a side effect of #1292252: Update the exporting mechanism to make it extendable by other modules.

The end-result is not so bad. With this error, Webform fails to update the "last download time" for an individual user.

Thanks for the report, I'll look into fixing this.

I had the same problem. +1

Version:7.x-3.16» 7.x-3.x-dev
Status:Active» Needs review
StatusFileSize
new1.2 KB

When I fixed things to get those vars from $export_info, downloading choked because $sid was also undefined... so I put 'last_sid' into $export_info, too.

Status:Needs review» Reviewed & tested by the community

The patch fixes this error for me,

Status:Reviewed & tested by the community» Fixed

Thanks guys, much appreciated! I backported it to D6 with this patch, #4 committed as-is to 7.x-3.x. Thanks!

StatusFileSize
new1.15 KB

Here's the D6 patch I meant to upload in #6.

Assigned:Unassigned» byant
Status:Fixed» Active

I have tried the patch for version 7.x-3.16 and 7.x-3.17, both not successful. And I have tried the development version too, but also not successful.

Can anyone help me?
FYI
but these statement did not appeared again:
Notice: Undefined variable: row_count in webform_results_download()..(line 832 of webform\includes\webform.report.inc)
Notice: Undefined variable: options in webform_results_download() (line 832 of webform\includes\webform.report.inc)

Thank you

Assigned:byant» Unassigned

The fix is in 7.x-3.x-dev, so you should no longer need the patch.

If you did not see those errors, then the fix worked... So you might need to be more clear about what's not working for you.

I'm un-assigning you from the issue (as assigning yourself means you're taking responsibility for fixing it.)

Thanks for quick reply, Sorry for the "assign" I was wrong putting the info.

I know the patch including with the version 7.x-3.x-dev. I have installed this version (7.x-3.17+8-dev), but when I download the result always get 20 bytes with blank content. Have I get mistake installed and updating the database? I need guidance here, please.

Thank you

byant: Is PHP throwing any errors?

Status:Active» Fixed

I'm marking this issue fixed again. Let's leave it fixed unless we have a conclusive report that the problem still exists (@byant's comment in #10 sounds like a completely different issue).

Status:Fixed» Closed (fixed)

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

yes, you are right, mine is php security problem (from my host provider) and it was fixed by changing this word:
readfile () to echo file_get_contents ()
Thanks for your effort and my provider (who gave solution)

Version:7.x-3.x-dev» 7.x-3.17
Status:Closed (fixed)» Needs review

In version 3.17 of the webform module, I'm still experiencing the problem (both lines in watchdog). And as we host the site on our own server, we suppose there's no php security problem ...
Could you please review, or (byant) tell me where to replace 'readfile' by 'file_get_contents' and what that change might result in?
Thanks in advance!

To change readfile() to file_get_contents() you will need to edit the webform_results_download function in the file webform/includes/webform.report.inc

When Webform builds the download it first writes it to a file on your server before streaming it down to your web browser. Some hosting configurations do not allow use of the PHP readfile() function for security reasons. There's no guarantee that file_get_contents() will definitely work, but it should.

Version:7.x-3.17» 6.x-3.x-dev
Status:Needs review» Closed (fixed)

Bitbull: this was fixed on March 28th, which is after 7.x-3.17 was released. Upgrade to 3.18.

That's right:

"To change readfile() to file_get_contents() you will need to edit the webform_results_download function in the file webform/includes/webform.report.inc"

my comment for this state:

"There's no guarantee that file_get_contents() will definitely work, but it should."

in my case, it's work.

Sorry, I can not review this new version of webform yet. Thanks.