cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 1.9 Options fields are all empty in the backend configuration

Magento 1.9 Options fields are all empty in the backend configuration

I have a problem with Magento's backend. In Configuration, each multiselection/options field is empty, all options are no longer available. This problem is only in the configuration of backend. Why?

 

I've already tried cleaning the cache and doing the reindex.

 

Any solution?

Thank you

 

This is the situation:

empty-fields-backend.jpgempty-fields-backend-2.jpg

8 REPLIES 8

Re: Magento 1.9 Options fields are all empty in the backend configuration

Hi @Gabriel91,


Can you enable the Magento logs to try to find some information?

Also, you could check your webserver error log.

Re: Magento 1.9 Options fields are all empty in the backend configuration

Hi, thanks for the reply.

 

Log files are already on but there are no problems with this issue. Yesterday I checked out that some fake users had registered. This problem may be due to a computer attack.

One question, can this be due to deleting a table or tampering with the database, or may it only depend on corrupted PHP files?

 

Where are the files that generate the various options in configuration section of backend?

Re: Magento 1.9 Options fields are all empty in the backend configuration

Those values, mostly, came from database.

Re: Magento 1.9 Options fields are all empty in the backend configuration

I'm having the same problem.

Re: Magento 1.9 Options fields are all empty in the backend configuration

Hi @SummitTech360,

 

On which configurations did you see the problem?

Can you share an screenshot?

Also, for the test, can you set the backend to en_US locale to be sure isn't a translation file problem?

If you can show us which configurtion fails maybe we can provide some idea to test.

Re: Magento 1.9 Options fields are all empty in the backend configuration

The locale is set to en_US.

Re: Magento 1.9 Options fields are all empty in the backend configuration

Hi @SummitTech360,

 

Most values are loaded from files but others from database.

I don't know how to help without auditing the code/store. I guess you should be able to find some clue into the Magento's logs or even the webserver error log.


For example, the Yes/No values came from this class Mage_Adminhtml_Model_System_Config_Source_Yesno, located at app/code/core/Mage/Adminhtml/Model/System/Config/Source/Yesno.php

 

If the class is there the source is there too so the problem shoul dbe between that model and how is represented.

You (now) empty dropdowns have options or you can't see emtpy values neigter?

Can you inspect the code of one of those dropdowns?

 

Re: Magento 1.9 Options fields are all empty in the backend configuration

I had the same issue and found this solution

 

I looked at my file /httpdocs/app/code/core/Mage/Adminhtml/Block/System/Config

and matched it with original version

 

I was missing this line 463

 

here's a bigger chunk of the code to see full view the bolded area was missing from my file. I added it from original and it fixed it.

 

                    if ($method) {
                        if ($fieldType == 'multiselect') {
                            $optionArray = $sourceModel->$method();
                        } else {
                            $optionArray = array();
                            foreach ($sourceModel->$method() as $value => $label) {
                                $optionArray[] = array('label' => $label, 'value' => $value);
                            }
                        }
                    }
                    else {
                        $optionArray = $sourceModel->toOptionArray($fieldType == 'multiselect');
                    }
                    $field->setValues($optionArray);
                }
            }
        }
        return $this;
    }