Closed (fixed)
Project:
Node Profile
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Dec 2007 at 20:49 UTC
Updated:
17 Jan 2008 at 21:42 UTC
imagefield_js() expects $_POST to contain the submit button in the top level of the array, but when it's used on a noedprofile, and then edited from the user/#/edit/ url, it is actually contained below the form id like array('form_id' => array(... submit button ...)); instead of just array(... submit button ...);.
This is a patch that adds a function to search the $_POST array recursively for the submit button. Works, but not sure if this is the best approach; someone mentioned the possibility of flattening the $_POST array?
(see attached)
| Comment | File | Size | Author |
|---|---|---|---|
| imageprofile.module.patch | 1.59 KB | ms2011 |
Comments
Comment #1
dopry commentedI would tell the nodeprofile module not to move this button.
Comment #2
fagohm, I won't add such a specific solution, as I prefer a general solution to the problem. I think this needs some investigation.
Comment #3
fagothe problem is the subform element data separation, which fails because imagefield accesses $_POST, which it imho shouldn't. Anyway, I've fixed nodeprofile to disable data separation, which now let's imagefield find it's data in $_POST. However, there might be issues, if people add profile fields with overlapping field names. So people, don't do that! ;)
Comment #4
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.