Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Each time I try to remove inline-condition using "Remove" button on Commerce Coupon editing page, one more inline-condition is created.
Using Commerce Coupon 7.x-2.0-rc2.
Comment | File | Size | Author |
---|---|---|---|
#5 | inline_conditions_remove.patch | 461 bytes | potop |
|
Comments
Comment #2
joelpittetMay have to do with our new table layout. It may not reset the default to
- All -
Could you check if you select he select to
- All -
that it lets you by?I'll ping jkuma on this for some feedback.
Comment #3
potop CreditAttribution: potop commentedThis patch fixes the problem
Comment #4
joelpittet@potop, can you confirm that what it says in the issue summary is correct?
Are you sure you are on the
and not the discount editing page? Because the coupon editing page doesn't have inline conditions.
I'm trying to reproduce the problem and I don't feel I have. Maybe you can do a little animated gif or something showing this behaviour? There is a free tool called LICEcap that i use.
Also not sure how your patch does anything. And a note the patch should be relative to the project folder so if you are using git, use the
--relative
flag inside inline_conditions module.Comment #5
potop CreditAttribution: potop commentedMy bad! I had to mention that I have two Commerce Coupon submodules enabled: "Date" and "Usage", they both use Inline Conditions to add restrictions to coupon.
When the form is submitted, inline_conditions_field_widget_form() method loops through all $items creating new row for every delta, and action buttons 'and_condition' and 'or_condition' -- are among those deltas as well, so two extra rows are created (and as we wanted to remove one, the result is one extra row added).
Unsetting these deltas make it work as expected: one condition is removed, none added.
Thank you to mention it. New patch applied.
Comment #6
joelpittetThank for the details, I'll try to reproduce the bug and I think I noticed another one but will commit if I can reproduce it.
Comment #8
joelpittetSorry for the super long delay, I'm reviewing the queue again, tested this out and still don't see this issue. I'm going to assume someone has fixed it since.
Comment #9
potop CreditAttribution: potop commentedTried to reproduce it on latest dev of Commerce Coupon and Inline Conditions and yes, seems like it's not reproducing anymore.