-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Duplicated elements id in checkout. billing-new-address-form #17061
Comments
Hi @LiamKarlMitchell. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
where @LiamKarlMitchell do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
@magento-engcom-team give me 2.2.4 instance |
Hi @LiamKarlMitchell. Thank you for your request. I'm working on Magento 2.2.4 instance for you |
Hi @LiamKarlMitchell, here is your Magento instance. |
@magento-engcom-team Yes reproduced. Although the "Place Order" buttons still appear to work so that must be breaking from something else on my end. |
@LiamKarlMitchell, thank you for your report. |
Looks like this issue was fixed in #15344 |
Thanks I'll check it tomorrow I'm hoping to have this fixed asap :) It seems the solution is to put a data bind property in for the id, with something added onto it to make it unique. (Such as) <!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<div class="billing-address-form" data-bind="fadeVisible: isAddressFormVisible">
<!-- ko foreach: getRegion('before-fields') -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!--/ko-->
<form data-bind="attr: {'data-hasrequired': $t('* Required Fields')}">
<fieldset data-bind="attr: {id: 'billing-new-address-form-' + getCode($parent)}" class="fieldset address">
<!-- ko foreach: getRegion('additional-fieldsets') -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!--/ko-->
<!-- ko if: (isCustomerLoggedIn && customerHasAddresses) -->
<div class="choice field">
<input type="checkbox" class="checkbox" id="billing-save-in-address-book" data-bind="checked: saveInAddressBook, attr: {id: 'billing-save-in-address-book-' + getCode($parent)}" />
<label class="label" data-bind="attr: {for: 'billing-save-in-address-book-' + getCode($parent)}">
<span data-bind="i18n: 'Save in address book'"></span>
</label>
</div>
<!-- /ko -->
</fieldset>
</form>
</div> But I don't know what kind of follow on effect that might have, if anything else addresses those elements by the id? |
The id duplication was causing errors in chrome. Resolves magento#17061
Added code from above as commit just using githubs edit file thing. |
Hi @LiamKarlMitchell, |
Removing the ID should be sufficient as the ID is nowhere used as far as I can see. |
As this is already in 2.2-develop I'llc lose this one. |
Yeah it did fix it thanks. |
Preconditions
Magento Version: 2.2.4
Steps to reproduce
Expected result
Actual result
[DOM] Found 3 elements with non-unique id #billing-new-address-form: (More info: https://goo.gl/9p2vKq) <fieldset id="billing-new-address-form" class="fieldset address">…</fieldset> <fieldset id="billing-new-address-form" class="fieldset address">…</fieldset>
Error in Google Chrome Version 67.
Unable to pay for the order further with any selected payment method.
"Continue to PxPay", or "Place Order"
This is related to / mentioned in #13415 but was never addressed for the billing-new-address-form and that issue is now closed as done.
The text was updated successfully, but these errors were encountered: