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.
The update failed on a site with this message:
Update #7208
Failed: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'type' cannot be null: INSERT INTO {file_type} (type, label, description) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array ( [:db_insert_placeholder_0] => [:db_insert_placeholder_1] => [:db_insert_placeholder_2] => ) in file_type_save() (line 541 of /var/www/drupal7/sites/all/modules/file_entity/file_entity.file_api.inc).
Comment | File | Size | Author |
---|---|---|---|
#4 | update_to_unstable7.patch | 2.04 KB | logaritmisk |
Comments
Comment #1
ParisLiakos CreditAttribution: ParisLiakos commentedThats why
Comment #2
chriscohen CreditAttribution: chriscohen commented@rootatwc, can you be a bit more verbose please? This really doesn't mean a lot to me!
Comment #3
ParisLiakos CreditAttribution: ParisLiakos commentedit was more a note to myself, when i have time to create patch.
if you located this piece of code in media.install can you add this
right before
file_type_save($new_type);
and try to upgrade again?
Comment #4
logaritmisk CreditAttribution: logaritmisk commentedI had to unset 'default' from existing_types, for some very strange reason the if statement wasn't respected. And I didn't have the 'document' type so I wrapped that in a if statement as well.
Comment #5
ParisLiakos CreditAttribution: ParisLiakos commentedcommitted it with a few changes..thanks didnt cross my mind that document might not be there
http://drupalcode.org/project/media.git/commit/fa663c3