magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

System Config fields dependency issue at store view level.

Open tzyganu opened this issue 12 years ago • 5 comments

Scenario.
I have 2 fields in System->Configuration.
The first field is a yes/no (let's call it Enabled).
The second field depends on enabled. Type not important:

           <field id="enabled" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Enabled</label>
                <source_model>Magento\Backend\Model\Config\Source\Yesno</source_model>
            </field>
            <field id="label" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Some Label here</label>
                <depends>
                    <field id="enabled">1</field>
                </depends>
            </field>

I edit the config on the default level and set the value for Enabled to 'Yes'.
I change the the config scope to one of my store views.

Expected Result: I see the second field "Some Label here" visible and disabled and the checkbox "Use website" checked.
Actual Result The second field "Some Label here" is visible and enabled and the checkbox "Use website" is checked.
Config
The issue does not reproduce if I remove the dependency (<depends> tag) from the second field.

I reproduced this while trying to create a config section for one of my modules, but it reproduces also in the core.
Visit System->Configuration->Customer Configuration->Create New Account Options.
Set Enable Automatic Assignment to Customer Group to Yes, Save and change the scope to store view level. Tax Calculation Based On field (and others) is visible and editable even if Use Website is checked.

Issue reproduced on alpha 104. I didn't find anything related to this in the alpha 105 change log, so I assumed it still reproduces. I will test on 105 and post what I find.

tzyganu avatar Nov 24 '14 13:11 tzyganu

Internal ticket: MAGETWO-31535

monkeysee avatar Jan 23 '15 20:01 monkeysee

@tzyganu Could you please verify this issue with latest mainline code? We are not able to reproduce the problem.

jilu1 avatar Apr 27 '15 18:04 jilu1

@jilu1 If you cannot reproduce it anymore, you can close it. I will take a look in the next few days an reopen it if necessary.

tzyganu avatar Apr 28 '15 12:04 tzyganu

@jilu1 You are right. This does not reproduce anymore. Thanks for the fix. (I couldn't wait a few more days so I tried it now :smile: )

tzyganu avatar Apr 28 '15 14:04 tzyganu

@tzyganu Thank you for your quick response!

jilu1 avatar Apr 28 '15 14:04 jilu1