Realized today that the value stored for registering users and those who have saved their profile on the edit page have the sticky prefix!
The problem is that the profile handler doesn't get added to the submit handler array high enough.
We were making use of the submit handler for our CRM system, but didn't realize the value was being stored wrong until it started popping up recently with another integration.
The following two handlers both fire before the profile_location_submit_handler() : user_register_submit(), user_profile_form_submit()
Module weight does not seems to sort the handler to the top. (NOTE: generic form_alter always happens after form specific form_alters.)
This can be fixed by placing the submit handler at the top of the list.
Change this...
function profile_location_form_alter(&$form, $form_state, $form_id) {
// ...
$form['#submit'][] = 'profile_location_submit_handler'; // line 74
// ...
}
...to this...
function profile_location_form_alter(&$form, $form_state, $form_id) {
// ...
$form['#submit'] = array_merge( array('profile_location_submit_handler'), $form['#submit'] ); // line 74
// ...
}
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | country_sticky_value-1263916-1.patch | 630 bytes | doublejosh |
Comments
Comment #0.0
doublejosh commentedclean
Comment #1
doublejosh commentedHere's the change as a patch.
Comment #3
johnhanley commentedHi Josh,
Good catch. Your description makes sense. Thanks for the patch.
I'm totally swamped right now, but I will try and issue a new release within a week or so.
Thanks,
John
Comment #4
doublejosh commentedI put this patch live on my site, so it's not urgent for me. But certainly a necessary fix.
Comment #5
johnhanley commentedThis issue and #1309666 fixed in release 6.x-1.7.
Comment #5.0
johnhanley commentedcleaning