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 might be a warning but it causes the update to fail for me. Having dug around it seems that any existing components using "NULL" for the "name" field will not allow the field structure to change with the db_change_field method.
I am in the process of writing a patch that does a query on the database to find any existing components that have "NULL" for the "name" field, changes them to be empty instead and continues the update as normal.
It would be good to hear some feedback on this!
Comment | File | Size | Author |
---|---|---|---|
#1 | webform-2462801-component_name_length_warning-2.patch | 788 bytes | colinstillwell |
Comments
Comment #1
colinstillwell CreditAttribution: colinstillwell commentedComment #2
colinstillwell CreditAttribution: colinstillwell commentedComment #3
colinstillwell CreditAttribution: colinstillwell commentedComment #4
colinstillwell CreditAttribution: colinstillwell commentedComment #6
DanChadwick CreditAttribution: DanChadwick commentedHow did you component table get components with NULL names? That might be the better question.
Also, this update can be done with a single call to db_update().
Comment #7
DanChadwick CreditAttribution: DanChadwick commentedI looked through the code and I don't see any history of allowing empty (much less NULL) component names. I'd say that your database was damaged. In this case, I don't see a need to modify the update.
If you can show that your database was subjected only to the recommended update path, please re-open. I'm pretty sure that if there was a common patch where NULL component names were allowed, we'd be inundated with reports long before now.