Data being overwritten in $form_state['storage'] due to array_smart_merge() when #multiple = TRUE

datacompboy - February 17, 2009 - 09:34
Project:AHAH helper
Version:6.x-2.0
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Description

When #multiple=true on select, $form_state['storage'] combines options array, instead of save currently selected items.

#1

Wim Leers - February 17, 2009 - 10:40
Title:Wronga save in $form_state['storage'] for 'select' #multiple=true» Wrong save in $form_state['storage'] for 'select' #multiple=true
Priority:normal» critical

Good catch! Damn. The code was so elegant, because of this it'll have to change quite radically. Patches are welcome :)

#2

kiamlaluno - February 17, 2009 - 10:43
Title:Wrong save in $form_state['storage'] for 'select' #multiple=true» Wrong data saved in $form_state['storage']

#3

Wim Leers - February 17, 2009 - 18:11
Title:Wrong data saved in $form_state['storage']» Data being overwritten in $form_state['storage'] due to array_smart_merge() when #multiple = TRUE
Assigned to:Anonymous» Wim Leers

The data is right. It's just being overwritten.

#4

msoler75 - March 13, 2009 - 16:10

Then, the function to be replaced is array_smart_merge() by another one that works? I can try.

#5

Wim Leers - March 13, 2009 - 17:30
Assigned to:Wim Leers» Anonymous

Yes. Thanks in advance for your patch :)

#6

AuctionTeamster - October 15, 2009 - 06:20

Looks like this is still an issue? When using a multi-page form...having to pass values via $form_state['storage'] causes same issue.

Is this something we are going to have to live with as a part of Drupal 6?

 
 

Drupal is a registered trademark of Dries Buytaert.