Closed (fixed)
Project:
Payment
Version:
8.x-2.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Jan 2017 at 15:59 UTC
Updated:
14 Jan 2020 at 17:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
ayrmax commentedComment #3
ayrmax commentedImproved the id generation to make it more unique by adding the element parents to it.
Comment #4
dom. commentedHi there !
I can confirm fix_ajax-1.patch works fine for me.
Thanks
Comment #5
pablitt commentedI can confirm fix_ajax-1.patch works for me too. I hope it gets implemented in the main module soon!
Comment #6
christophedg commentedSame here, can't wait!
Comment #7
bendev commentedthe patch works for me too
Comment #8
mickaelperrin commentedCan confirm also that the patch worked for me too.
Comment #9
anpolimusConfirming, that patch #1 is working for me.
Comment #10
berdirSorry for the slow response here.
This was using form state because the ID was dynamic, but this didn't work anymore like that.
However, now the ID is predictable, so I think we should simplify this and drop the form_state set/get, should not be required anymore. Just return the ID.
Comment #11
firfin commented@Berdir: How could one 'predict' the ID? I personally do not have a clue. Shame that something so simplifiable is not happening. Would love to help out.
Also a very similar issue happens with the payment_reference_field submodule, see #3015819: Can not add line items to payment_reference_field. Maybe a higher level issue is needed here? Extract the code in both submodules to a more generic function?
Also, isn't this more of a UX issue?
Comment #12
berdirWhat I mean is that get*Unique*Id() returns an ID that is different each time we call it. getId() does not, it will always return the same value for the same input.
So as I said, just remove the form_state stuff around it and simply return the value. If you want to help then update the patch :)
No, UX would be about a visual change to the user interface.
Comment #13
vaza18 commentedHi @Berdir.
Take a look on this one.
It also resolves an issue with loosing line items, when user updates existing entity without touching previously created line items (I didn't find it reported anywhere).
Comment #14
vaza18 commentedComment #15
vaza18 commentedComment #17
vaza18 commentedComment #18
vaza18 commentedComment #19
vaza18 commentedComment #20
vaza18 commentedComment #21
vaza18 commentedComment #22
vaza18 commentedComment #23
vaza18 commentedComment #25
bwoods commentedI haven't completed extensive testing, but so far #23 works for me. Thanks for posting!
Comment #26
berdirReroll.
Comment #27
berdirThis was a tricky one, the web test actually tested deleting, but explicitly asserted that the item isn't *not* deleted. Fixed that, but required quite a few changes in the test to make it work.
Comment #28
berdirFixing the remaining unit test fail.
Comment #29
berdirCommitted.