Images not uploaded when 'redirect' action triggered upon node submit
MediaMunkey - June 1, 2008 - 05:07
| Project: | ImageField |
| Version: | 6.x-3.1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | won't fix |
Jump to:
Description
I am using version 5.x-1.7 of CCK, version 5.x-2.1 of ImageField and version 5.x-2.5 of Actions.
In my setup after you submit a new node, an action is triggered to redirect to the frontpage.
For nodes with an ImageField, after you upload an image, submit the node and get redirected to the frontpage the picture dissapears, as if one was never uploaded.
Obviously in redirecting to another page ImageField forgets to save the picture for some reason.

#1
You're probably attaching this action to the "When either saving a new post or updating an existing post". This won't work but it's not really a bug in ImageField. This action is fired during the "presave" operation, which means "before the node is saved". So if you're redirecting a user before the node is saved, then the image can't be saved. Using the "After saving a new post" trigger should work I believe.
Besides that, I'm not going to put effort into debugging Actions in Drupal 5. If you can provide a patch to fix this problem I'd be happy to accept it. Otherwise this will stay as won't fix.
#2
With Drupal 6 and "After saving a new post" trigger I've the same problem.
If choosing another action instead of redirecting URL images are displayed just fine.