Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG SUPEE-11219 – Wrong Field Specified error in 1.9.x - needs a fix #1145

Closed
seansan opened this issue Aug 12, 2020 · 6 comments
Closed
Labels

Comments

@seansan
Copy link
Contributor

seansan commented Aug 12, 2020

Preconditions (*)

Install SUPEE-11219 – Wrong Field Specified error in 1.9.x

Steps to reproduce (*)

Save settings page wih watermark or any other using dynamic, see stack link

Expected result (*)

Can save config

Actual result (*)

Cannot save config

Code

Issue occurs on line 437 in method public function setGroupsSecure($groups) in file /public_html/app/code/core/Mage/Adminhtml/Model/Config/Data.php

image

One can remove validation on these specific cases for the dynamic fields

Links hinting to a solution, should be fixed

https://magento.stackexchange.com/questions/302944/supee-11219-wrong-field-specified

or remove the warning ;P

https://www.onooks.com/supee-11219-wrong-field-specified/

@seansan seansan added the bug label Aug 12, 2020
@seansan seansan changed the title SUPEE-11219 – Wrong Field Specified error in 1.9.x - needs a fix BUG SUPEE-11219 – Wrong Field Specified error in 1.9.x - needs a fix Aug 12, 2020
@matteorossi-thespacesm
Copy link
Contributor

On a freshly installed OpenMage LTS 19.4.9 test site, when I try and save shipment methods, I get the aforementioned error.
Such error is due to lack of <dynamic_group>1</dynamic_group> configuration in app/code/core/Mage/Shipping/etc/system.xml -> tablerate configuration.

@seansan
Copy link
Contributor Author

seansan commented Jan 15, 2021

I dont think the pull must close the issue; it is clar it can occur for many other fields

matteorossi-thespacesm linked a pull request that will close this issue 27 minutes ago

@matteorossi-thespacesm
Copy link
Contributor

Indeed I've just made a second pull request to fix another issue on catalog module system.xml

@pisc-software
Copy link

pisc-software commented Feb 4, 2021

We are getting this exception on the following core payment methods:

core/Mage/Payment/etc/system.xml: free cashondelivery banktransfer checkmo

core/Mage/Authorizenet/etc/system.xml: authorizenet_directpost

core/Mage/Paygate/etc/system.xml: authorizenet

...and many more, also in 3rd party extension.
To get around it on these groups adding is required of:
<dynamic_group>1</dynamic_group>

We recoded in Mage/Adminhtml/Model/Config/Data.php to simply not populate these fields with data:
/** * FIX: Removing Exception if (($groupConfig ? !$groupConfig->dynamic_group : true) && !$this->_isValidField($fieldConfig)) { Mage::throwException(Mage::helper('adminhtml')->__('Wrong field specified.')); } */ $groupsSecure[$group]['fields'][$fieldName] = $fieldData; if (($groupConfig ? !$groupConfig->dynamic_group : true) && !$this->_isValidField($fieldConfig)) { unset($groupsSecure[$group]['fields'][$fieldName]); }

We are getting the exception when editing configuration for a store, on website or global level the exception is not throw. It seems that when a config option is disabled for a store view then the "dynamic_group" tag is required to be set.

@AGelzer
Copy link
Contributor

AGelzer commented Apr 21, 2021

@Flyingmana
Copy link
Contributor

fixed by #1418

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants