magento2: Duplicated elements id in checkout page
Preconditions
- Magento 2.1.10
Steps to reproduce
- Go to Stores -> Configuration -> Sales -> Sales under Gift Options and set both Allow Gift Messages to YES
- Put something in cart and go to checkout or cart page
Expected result
- Two forms for gift messages having fields with unique ids
Actual result
- Two forms for gift messages having fields with non unique ids
[DOM] Found 2 elements with non-unique id #gift-message-whole-from: (More info: https://goo.gl/9p2vKq) <input type="text" id="gift-message-whole-from" class="input-text" data-bind="value: getObservable('sender')"> <input type="text" id="gift-message-whole-from" class="input-text" data-bind="value: getObservable('sender')">
[DOM] Found 2 elements with non-unique id #gift-message-whole-to: (More info: https://goo.gl/9p2vKq) <input type="text" id="gift-message-whole-to" class="input-text" data-bind="value: getObservable('recipient')"> <input type="text" id="gift-message-whole-to" class="input-text" data-bind="value: getObservable('recipient')">
Non unique ids alert appears too in checkout payment choice:
[DOM] Found 2 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>
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 4
- Comments: 40 (26 by maintainers)
Commits related to this issue
- ENGCOM-1713: Fix #13415 : Duplicated elements id #15585 - Merge Pull Request magento/magento2#15585 from julienanquetil/magento2:julienanquetil-issue13415 - Merged commits: 1. 2e4bd95d910f577f89... — committed to magento/magento2 by magento-engcom-team 6 years ago
- ENGCOM-1713: Fix #13415 : Duplicated elements id #15585 — committed to magento/magento2 by sidolov 6 years ago
- Fix #13415 : Duplicated elements id — committed to magento/magento2 by julienanquetil 6 years ago
- ENGCOM-1814: [Forwardport] Fix #13415 : Duplicated elements id #15705 - Merge Pull Request magento/magento2#15705 from julienanquetil/magento2:julienanquetil-fix-13415 - Merged commits: 1. 82d04... — committed to magento/magento2 by magento-engcom-team 6 years ago
- ENGCOM-1814: [Forwardport] Fix #13415 : Duplicated elements id #15705 — committed to magento/magento2 by VladimirZaets 6 years ago
Same situation for me on a new 2.2.3 install.
@angelo983 did you got any solution for this ? I am getting this error in Magento 2.1.8 even when both Allow Gift Messages are set to No
I fixed this isue by changing the following setting in Configuration: Sales - Checkout - Checkout options: Display Billing Address On : -> Set to “Payment page”.
This has solved the issue for me.
Hello @sidolov
As I can see from @julienanquetil code, it fixes only gift message related IDs. What about billing address form? Is it extracted in separate issue?
Hi @angelo983. Thank you for your report. The issue has been fixed in magento/magento2#16264 by @chirag-wagento in 2.1-develop branch Related commit(s):
The fix will be available with the upcoming 2.1.15 release.
Hi @angelo983. Thank you for your report. The issue has been fixed in magento/magento2#15585 by @julienanquetil in 2.2-develop branch Related commit(s):
The fix will be available with the upcoming 2.2.6 release.
HI @bruno-serfe. Yes. I want create a pull-request with update today.