0

After upgrading from 1.9 to 1.9.2 everything seems to be working fine but when I go to System>Configuration>Configurable Swatches I get the following error:

Fatal error: Call to a member function toOptionArray() on a non-object in app/code/core/Mage/Adminhtml/Block/System/Config/Form.php on line 463

I tried re-installing admin_html from magento connect but it didn't help and I am sure my theme supports configurable swatches because it's enabled on the demo. Any suggestions on how to solve this problem?

0

1 Answer 1

1

Make sure that all the files are installed, and web server has enough privileges to actually load them. This could easily happens if install requires several steps. toOptionArray is a method from object that populates drop-down options. Referring to it as a non-object means that the object value is null, which usually happens when declaration file is either missing or not readable. Copy your file in local codepool and find this code:

$optionArray = $sourceModel->toOptionArray($fieldType == ‘multiselect’);

and replace it with:

if(is_object($sourceModel)){
$optionArray = $sourceModel->toOptionArray($fieldType == ‘multiselect’);
} else {
Mage::log($e->source_model);
}
1
  • Apparently the file Configattribute.php and select.php where create as folders and not files, deleted and re uploaded the files correctly and worked. Sep 22, 2015 at 12:03

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