Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 2
Blank Option for Multiple Select attribute is gone. 
 
Tamburra
Member
 
Total Posts:  46
Joined:  2009-12-02
 

I have posted a bug ticket here:
http://www.magentocommerce.com/bug-tracking/issue/?issue=12516

I have just confirmed this also happens on a fresh install of Magento 1.6.1.0 as well as 1.6.0.0

- edit a product that has an attribute “Catalog Input Type for Store Owner” as Multiple Select.

You will see no blank option anymore.
If you try to change the selected option so no options are selected and then save, your changes are not saved.
But if you choose another option then it will save.

For example:

Product has an attribute with Multiple Select. Options are “blue”, “green”, and “red”.
I click “red” and save, the setting saves successfully.
If I go back and ctrl+click the “red” option so no options are selected and then save, option “red” is still selected.
There use to be a blank value at the top that you could click but that option has disappeared after the upgrade from 1.5.1.0 to 1.6.0.0. It is still missing in 1.6.1.0.

Has anyone found a quick fix for this as we are unable to create new products at the moment till this issue gets resolved?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Tamburra
Member
 
Total Posts:  46
Joined:  2009-12-02
 

Magento team said they were able to reproduce the error and should be fixed in an upcoming release.  Has anyone else been having this problem?  Has anyone found a solution for this?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Tamburra
Member
 
Total Posts:  46
Joined:  2009-12-02
 

Willing to pay someone for a fix for this.  1.6 has been out for a couple months now. I’m surprised this bug has never been reported yet til now. Has no one experienced this issue?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ing. Július Klein
Jr. Member
 
Total Posts:  13
Joined:  2009-10-26
 

Same problem, hope, they will fix it as soon as possible. big problem for me

 
Magento Community Magento Community
Magento Community
Magento Community
 
Tamburra
Member
 
Total Posts:  46
Joined:  2009-12-02
 

I would think it would be as easy as adding the blank space back in but I have know idea what files I need to look at the possibly get this working again.

 
Magento Community Magento Community
Magento Community
Magento Community
 
RapidCommerce
Jr. Member
 
Total Posts:  9
Joined:  2009-11-07
Maastricht, Limburg, Netherlands
 

Quick fix here:
http://www.rapidcommerce.eu/blog/2011/11/magento-1-6-clear-multiselect-bug/

 
Magento Community Magento Community
Magento Community
Magento Community
 
Tamburra
Member
 
Total Posts:  46
Joined:  2009-12-02
 

Thanks so much rapid commerce. I tested it out and it works great.  The only difference i notice from the way it is suppose to work is when the empty option is selected and then the product is saved, you should then see the empty option as a grey selected option.  With this fix the empty option is not greyed but is working as an empty option.  This is not a big deal at all as this fix works great till magento releases a new version with this fixed.  Thanks again for your fix.  smile Happy Thanksgiving

 
Magento Community Magento Community
Magento Community
Magento Community
 
furnitureforyoultd
Enthusiast
 
Total Posts:  833
Joined:  2009-03-09
 

fixed - look below

 
Magento Community Magento Community
Magento Community
Magento Community
 
Tamburra
Member
 
Total Posts:  46
Joined:  2009-12-02
 

That code is pretty much the same.  A variable is created in one and not in the other.  I used the 1.5 code on 1.6 and it did absolutely nothing.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Andrea Digital
Jr. Member
 
Avatar
Total Posts:  3
Joined:  2009-12-09
 

Same problem for us. Big BUUUUGGGGGG Magento guys, please fix it fast!!!!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Tamburra
Member
 
Total Posts:  46
Joined:  2009-12-02
 
RapidCommerce - 23 November 2011 06:53 AM

Quick fix here:
http://www.rapidcommerce.eu/blog/2011/11/magento-1-6-clear-multiselect-bug/

This works but not 100% like the default way use to work.  I still don’t have a fix for this.  I know that this has been fixed in 1.7 but I am trying to steer clear from upgrading out of 1.6.  Can anyone help?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Tamburra
Member
 
Total Posts:  46
Joined:  2009-12-02
 

1.7 alpha seems to have been released and has this issue fixed.  Can anyone port over the 1.7 code to 1.6.2.0? Willing to pay for a fix.

Even a little help with what file I should be looking at to see how to fix this would be nice.  smile Thank you.

 
Magento Community Magento Community
Magento Community
Magento Community
 
furnitureforyoultd
Enthusiast
 
Total Posts:  833
Joined:  2009-03-09
 

Fixed at last!

app\code\core\Mage\Adminhtml\Block\Widget\Form.php

find this section:

if ($inputType == 'select'{
                    $element
->setValues($attribute->getSource()->getAllOptions(truetrue));
                
else if ($inputType == 'multiselect'{
                    $element
->setValues($attribute->getSource()->getAllOptions(falsetrue));

replace with this:

if ($inputType == 'select'{
                    $element
->setValues($attribute->getSource()->getAllOptions(truetrue));
                
else if ($inputType == 'multiselect'{
                    $element
->setValues($attribute->getSource()->getAllOptions(truetrue));
                    
$element->setCanBeEmpty(true);

setCanBeEmpty allows you to de-select all options and save (no longer forced to have 1 selection), the change from false to true adds back the blank attribute field. If you don’t want the blank field back, keep it as false.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Robbie D
Jr. Member
 
Total Posts:  5
Joined:  2009-08-28
 

Thanks for this furnitureforyoultd.

In v 1.7.0.0 they have included the line;

$element->setCanBeEmpty(true);

But they haven\\\’t set both flags to true so there\\\’s no blank field option.

$element->setValues($attribute->getSource()->getAllOptions(falsetrue));
 
Magento Community Magento Community
Magento Community
Magento Community
 
PtitSuisse
Jr. Member
 
Total Posts:  8
Joined:  2011-12-12
 

Hi,

I\’m on Magento 1.6.3 and I used the fix above but I found an issue with that.

I\’m using the multi store feature with 5 different stores. Products are in the main store and in one of the other 4 stores.

If I do a bulk Attribute Update:
- select some products, select Update Attributes in Actions drop down top right and submit.
- then I just press save (so I see the bug even if I don\’t change anything)

BUG: ALL multi select attributes for the selected products are set to Empty and [STORE VIEW] Use Default Value check box is unticked for the store view I selected. This means that all multi-select attributes I set for that product in that store view are gone.

If I remove the \"setCanBeEmpty\" fix, no issue at all. All multi select attributes keep the same value as before bulk update.

Does anyone has the same issue?  or know already about this issue?

 
Magento Community Magento Community
Magento Community
Magento Community
 
q23media
Member
 
Avatar
Total Posts:  72
Joined:  2009-04-29
 

thanks, this does the trick, even in 1.6.3.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 2