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

Impossible to create Text Swatch 0 (Zero) #9619

Closed
orozcodiaz opened this issue May 12, 2017 · 8 comments
Closed

Impossible to create Text Swatch 0 (Zero) #9619

orozcodiaz opened this issue May 12, 2017 · 8 comments
Labels
bug report Component: Catalog Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@orozcodiaz
Copy link
Contributor

Preconditions

  1. Magento 2.1.6
  2. PHP 7.0.14-2a

Steps to reproduce

Try to create product attribute text swatch with value "0" (zero)

Expected result

New value for attribute

Actual result

Admin is a required field in the each row

To see recorded behaviour: http://recordit.co/bUwOLQQ3n2

screen shot 2017-05-12 at 5 30 36 pm

After saving:

screen shot 2017-05-12 at 5 30 53 pm

Quick Fix

module-swatches/Model/Plugin/EavAttribute.php

Method isOptionsValid()
Instead of this:
if (empty($option[0])) { return false; }

Type this:
if($option[0] != '0'){ if (empty($option[0])) { return false; } }

@smoskaluk
Copy link

@oroskodias Unfortunately, I could not reproduce the issue as you described it. Can you please let me know is this problem is relevant for latest Magento 2 release version?

@orozcodiaz
Copy link
Contributor Author

@smoskaluk I see same code in 2.1.7. Issue is still there

@korostii
Copy link
Contributor

See also #10266

@orlangur
Copy link
Contributor

This was fixed in #7701 but not backported to 2.1.x yet.

@okorshenko
Copy link
Contributor

okorshenko commented Jul 18, 2017

Fix for develop: MAGETWO-66160

@okorshenko okorshenko added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Jul 18, 2017
@okorshenko
Copy link
Contributor

Fix for 2.1-develop: MAGETWO-70838

@magento-team
Copy link
Contributor

Internal ticket to track issue progress: MAGETWO-70838

@magento-engcom-team magento-engcom-team added 2.1.x Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report Component: Catalog labels Sep 5, 2017
@magento-engcom-team magento-engcom-team added 2.1.x Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report Component: Catalog Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed and removed G1 Passed labels Sep 11, 2017
@magento-engcom-team
Copy link
Contributor

@oroskodias, thank you for your report.
The issue is already fixed in 2.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Component: Catalog Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests

8 participants