0

When creating an attribute I get this error:

Argument 1 passed to Zend_Validate_InArray::setHaystack() must be an array, null given, called in   ....lib/Zend/Validate/InArray.php on line 96 and defined  in ..../lib/Zend/Validate/InArray.php on line 122

Can anyone advise why this is, I'm creating an attribute as normal, compilation off and cache cleared.

  • Having same issue - we have a lot of extensions that could be causing this. Will try to update once I have figured it out but this has prevented us from creating new attributes. – Daniel Kenney Oct 22 '15 at 14:59
  • That would be great, haven't sorted this satisfactorily. – Tofuwarrior Oct 23 '15 at 21:50
1

You are having a problem with the validator of Input Types.

That is because Mage::getStoreConfig('general/validator_data/input_types'); is returning null.

The definition of general/validator_data/input_types comes from app/code/core/Mage/Eav/etc/config.xml but an entry on the database table core_config_data overrides it.

Therefore, the solution is to delete the entry that specifies the 'general' path DELETE FROM core_config_data WHERE path="general";

  • thanks for commenting. This solution does not work, I also found it on SO but it does not work here unfortunately. I haven't been able to understand why. – Tofuwarrior May 8 '17 at 13:47
1

I was facing the same problem. I have deleted the general entry from my core_config_db and it is working fine for me.

DELETE FROM core_config_data WHERE path="general";

  • thanks for your suggestion, I had also tried this, (should have put that in the question - sorry). It didn't help sadly. – Tofuwarrior Jun 11 '18 at 13:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.