Skip to content

fix clone mandatory dropdown empty default - #1357

Open
Herafia wants to merge 2 commits into
11.0/bugfixesfrom
fix/clone-mandatory-dropdown-empty-default
Open

Herafia wants to merge 2 commits into
11.0/bugfixesfrom
fix/clone-mandatory-dropdown-empty-default

Conversation

@Herafia

@Herafia Herafia commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Checklist before requesting a review

Please delete options that are not relevant.

  • I have performed a self-review of my code.
  • I have added tests (when available) that prove my fix is effective or that my feature works.
  • I have updated the CHANGELOG with a short functional description of the fix or new feature.
  • This change requires a documentation update.

Description

  • It fixes !47654
    Cloning an item would fail when a block contained a required drop-down list with an empty default value; the value 0 was inserted into the clone and then rejected by the required field validation.
    An empty default value is no longer inserted; the actual default values remain in effect.

@Herafia Herafia self-assigned this Nov 17, 2026
@Herafia Herafia added the bug label Nov 17, 2026

@Lainow Lainow left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inc/container.class.php:2844: dropdown- fields have the same issue (default_value '0'), cloning still fails. Extend the condition to them and add a test case.

@Herafia
Herafia requested a review from Lainow November 18, 2026 14:04
@Herafia
Herafia force-pushed the fix/clone-mandatory-dropdown-empty-default branch from 5219c7a to 408c5c1 Compare November 18, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants