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.
SimpleTest claims another new bug: When creating a field, if the "List" field is enabled and defaults to "List files by default", then the checkbox is impossible to uncheck on the node form. Editing a node and unchecking the "List" box is not saved, the file is still visible, and re-editing the node the checkbox will be checked again.
This is because an empty checkbox does not pass any value to CCK, so we must check for the lack of a value at all, rather than expecting "0". This patch checks if a "List" field is in a file field, then sets the value to "0" if the list value is missing entirely.
Comment | File | Size | Author |
---|---|---|---|
#1 | filefield_uncheck_list.patch | 1.5 KB | quicksketch |
filefield_uncheck_list.patch | 1.8 KB | quicksketch |
Comments
Comment #1
quicksketchThe top of the provided patch contains some changes not relevant to this post. Committed this patch containing only the bottom part.