Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This is (I believe) a regression introduced in #2278975: Only display the remove button when there are items in the field. From that issue queue:
What's the reasoning behind not showing the remove button for empty fields?Ehm... because there's nothing to remove?
Ha, that's true initially. But once the editor starts adding items to multiple-value fields, then there are things to remove. Form state is changing throughout the node/add process, but the module only reacts to the initial empty node object.
Comment | File | Size | Author |
---|---|---|---|
#1 | field_remove_item-2400955-button_for_new_entities.patch | 1.96 KB | Les Lim |
field_remove_item-explanation.jpg | 147.13 KB | Les Lim |
Comments
Comment #1
Les LimPatch removes conditional check of items count.
Comment #2
dawehnerWorks perfectly for me, but #2278975: Only display the remove button when there are items in the field is the opposite. Well, ideally
$context['items']
would be filled when we create new entities, but as long that doesn't work, we need to keep the current version, I would argue.Comment #4
pcambraThank you both!