Pergunta

After installing SUPEE-11219, we can no longer save updates in System > Configuration > General > Design.

Whenever we click Save Config (even if not adding or changing and values) we receive the error "Wrong field specified".

We've tested commenting out Mage::throwException(Mage::helper('adminhtml')->__('Wrong field specified.')); on line 413 of file app/code/core/Mage/Adminhtml/Model/Config/Data.php on a local testing site and this allows us to save changes.

We can't see any reason why Wrong field specified should be firing.

This is the actual logic triggering the error, maybe ther should be an if/else or else clause

if (($groupConfig ? !$groupConfig->dynamic_group : true) && !$this->_isValidField($fieldConfig)) {
    Mage::throwException(Mage::helper('adminhtml')->__('Wrong field specified.'));
}
Foi útil?

Solução

In our case, the issue occurred because we have some custom, dynamic fields in two system config groups. We solved it by adding the following tag to both of these groups in the system.xml: <dynamic_group>1</dynamic_group>

So the final xml would look something like this:

<config>
    <sections>
        <carriers>
            <groups>
                <custom_group translate="label">
                    <label>Custom Group</label>
                    <sort_order>104</sort_order>
                    <show_in_default>1</show_in_default>
                    <show_in_website>1</show_in_website>
                    <show_in_store>1</show_in_store>
                    <dynamic_group>1</dynamic_group>
                    <fields>
                        <some_dynamic_field translate="label">
                            ...
                        </some_dynamic_field>
                    </fields>
                </custom_group>
            </groups>
        </carriers>
   </sections>
</config>

This will tell Magento that the group contains dynamic fields, and will prevent the error from popping up when saving the config. Hope this will help someone!

Licenciado em: CC-BY-SA com atribuição
Não afiliado a magento.stackexchange
scroll top