Needs review
Project:
RSVP
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Nov 2010 at 06:14 UTC
Updated:
4 Nov 2010 at 06:23 UTC
Jump to comment: Most recent file
At the end of the rsvp_csv_hash_form() function it runs drupal_goto(). The problem is that depending on site / server configuration it may not work correctly and transmit the file to download. Also, strictly speaking it shouldn't work, given that drupal_goto() uses the header() function with a HTTP location path which generally won't want to run after data has been output. Finally, given that the CVS paths are loaded from links from other pages, is there a need to do a redirect at all, why not just let it exit the function normally?
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | rsvp-n961858-3.patch | 493 bytes | damienmckenna |
| #1 | rsvp-n961858.patch | 482 bytes | damienmckenna |
Comments
Comment #1
damienmckennaHere's a patch that removes the drupal_goto() call so that all downloads will complete correctly and leave visitors at the page they're already viewing.
Comment #2
damienmckennaAs it turns out, without the drupal_goto() it then proceeded to execute
return $form;which had the effect of appending a full Drupal page to the CSV data. Here's a patch that simply runs exit() at the end of the function to ensure no additional output is added.