for an anonymous user - if I click on the file link I go to the enter your email address form - that works fine (even validates email) - when I click on submit on the email form I get the file download and it updates the filefield_track table but the page doesn't redirect back the the node page - it just stays on the email form.

Comments

gaele’s picture

Clicking submit again results in this error:
Fatal error: Call to undefined function db_fetch_object() in /sites/all/modules/filefield_track/filefield_track.inc on line 27

gaele’s picture

Status: Active » Needs review
StatusFileSize
new697 bytes

This patch solves the fatal error, not the redirect not working.

gaele’s picture

Status: Needs review » Active

The redirect not working may be related to this: http://api.drupal.org/api/drupal/developer%21topics%21forms_api_referenc...

I couldn't make it work yet.

Does this work in D6?

chromix’s picture

StatusFileSize
new1.18 KB

The redirect as written won't work because page execution stops once file_transfer is called. See:
http://api.drupal.org/api/drupal/includes%21file.inc/function/file_trans...

If you try to call drupal_goto() rather than drupal_exit(), you get an error since the file never terminates.

I'm adding a link back to the original content as a work around.

chromix’s picture

Assigned: Unassigned » chromix
Status: Active » Fixed

in the next dev release

Status: Fixed » Closed (fixed)

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

april26’s picture

Issue summary: View changes

There is no Dev release since 2012, and this version still doesn't redirect back to the original page? I assume it only fixed the error message and not the redirect?