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

Fixed street.0 field validation bug in Checkout #6397

Closed

Conversation

OnTapKristjan
Copy link
Contributor

This might apply to other situations similar to this, where multiline control is being used. Suggesting to check the whole codebase for similar issue.

Explanation of the problem
In checkout shipping address entry (customer + guest), when a validation error occurs, the first "street" field is not properly marked with "red" colour. This appears to be due the fact that appropriate classes are not being applied.
See:
checkoutnoredborder

The problem originates from how the field config is being constructed.
it appears to be taking place in Magento/Checkout/Block/Checkout/AttributeMerger.php

Observe the line 275
'additionalClasses' => $isFirstLine ? : 'additional'

Apparently the additionalClasses value is always set to some value, however in case of field "street.0" we need to "inherit" this value from base config.

The PR here will take care of this. By only setting the value in case it needs to be set to 'additional', otherwise it is not touching it at all.

@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Aug 30, 2016

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.

@OnTapKristjan
Copy link
Contributor Author

Apparently already fixed in develop.

@OnTapKristjan OnTapKristjan deleted the attributeMergerBug branch August 30, 2016 11:36
magento-engcom-team pushed a commit that referenced this pull request Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants