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

Fix for issue #3019 (blank password/obscure field) #3020

Merged
merged 1 commit into from
Mar 18, 2016
Merged

Fix for issue #3019 (blank password/obscure field) #3020

merged 1 commit into from
Mar 18, 2016

Conversation

srenon
Copy link
Member

@srenon srenon commented Jan 17, 2016

Bug - Blank value for field type password/obscure when switch store view in store config

 Bug - Blank value for field type password/obscure when switch store view in store config
@srenon
Copy link
Member Author

srenon commented Jan 19, 2016

The testing script will need to be updated since is expecting hasBackendModel() to be called 1 time.

  1. Magento\Config\Test\Unit\Block\System\Config\FormTest::testInitFields with data set Can you commit to repository a folder dev/tests/static ? #1 (array(), 'Config Value', 'some/config/path', true, 'Config Value')
    Expectation failed for method name is equal to string:hasBackendModel when invoked 1 time(s).
    Method was expected to be called 1 times, actually called 0 times.

@mazhalai
Copy link
Contributor

Related internal ticket MAGETWO-48100

@mazhalai
Copy link
Contributor

@srenon Please fix uint tests and sync with latest develop

@mazhalai mazhalai assigned mazhalai and unassigned joanhe Feb 19, 2016
@mazhalai
Copy link
Contributor

mazhalai commented Mar 3, 2016

MAGETWO-48100

@mazhalai mazhalai added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Mar 3, 2016
@magento-team magento-team merged commit dc4918e into magento:develop Mar 18, 2016
@mazhalai
Copy link
Contributor

@srenon thank you for your contribution, your PR has been merged.

@mimarcel
Copy link
Contributor

Hello @srenon ,

Please note that PR #6231 was created to revert current PR due to another issue. Since screenshot in issue #3019 shows a problem with a field in Gmail/Google Apps SMPT Pro, I assume this is a 3rd party extension which should fix their backend model to correctly handle the values.

@srenon
Copy link
Member Author

srenon commented Aug 18, 2016

@mimarcel .... Yes the screen shot was from a third party extension but this also affect core module that uses "password/obscure". This should be a cause by the the same issue #2984

To replicate this issue all you need to do is to create a system.xml with

<field id="production_secret" translate="label" type="obscure" >
           <label>Production Secret</label>
           <backend_model>Magento\Config\Model\Config\Backend\Encrypted</backend_model>
</field>

Then echo the value with echo $this->getConfigData('production_secret');

@mimarcel
Copy link
Contributor

mimarcel commented Aug 19, 2016

@srenon I can not replicate the issue.

Preconditions:

  1. have latest M2.1 installed
  2. apply fix from Fix default values not being properly loaded for ArraySerialized fields #6231

Steps

  • Add system config field
                <field id="production_secret" translate="label" type="obscure" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1" >
                    <label>Production Secret</label>
                    <backend_model>Magento\Config\Model\Config\Backend\Encrypted</backend_model>
                </field>
  • Set a value on admin store.
  • Switch to another store.

Result:

  • the password is still there, it is not blank.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants