Cannot remove conditions if you remove required field values first

Created on 8 December 2020, over 4 years ago
Updated 10 March 2025, about 1 month ago

Describe your bug or feature request.

If you have previously saved an entity that uses inline conditions, like a Promotion, with a condition that has a required form element and you want to disable it, if you clear out the form element's value before disabling the condition, the form will not save. For whatever reason, the form attempts to evaluate the form elements from the condition plugin before it evaluates the checkbox on the condition to see if it's still enabled.

If a bug, provide steps to reproduce it from a clean install.

On a clean install, create a promotion, add a condition based on the customer role, and submit with any role value. Then re-edit the same promotion, uncheck whatever roles you previously selected, and then uncheck the box for the customer role condition itself. When you submit the form, the page will reload with a validation failure message that a customer role is required.

πŸ› Bug report
Status

Fixed

Version

2.0

Component

User experience

Created by

πŸ‡ΊπŸ‡ΈUnited States rszrama

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024