When trying to upgrade from nodestream-7.x-2.0-beta8 to 7.x-2.0-rc2 I'm running into issues with file_entity and media.
The errors happen when executing media_update_7208 and media_youtube_update_7202
Executing media_update_7207
Executing file_entity_update_7201
Executing media_update_7208
Trying to get property of non-object file_entity.file_api.inc:474
Undefined property: stdClass::$type file_entity.file_api.inc:482
Undefined property: stdClass::$label file_entity.file_api.inc:483
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'type' cannot be null
Executing file_entity_update_7202
Executing media_youtube_update_7200
Executing file_entity_update_7203
Executing media_youtube_update_7201
Executing title_update_7002
Executing ns_media_update_7203
Executing media_youtube_update_7202
Undefined property: stdClass::$type file_entity.file_api.inc:474
Undefined property: stdClass::$type file_entity.file_api.inc:482
Undefined property: stdClass::$label file_entity.file_api.inc:483
Undefined property: stdClass::$type file_entity.file_api.inc:492
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'type' cannot be null
I was able to track it down to file_entity_update_7201 which is actually executed before media_update_7208, but for some reason the {file_type}, {file_type_mimetypes} and {file_type_streams} tables are not being created leading to errors in above update functions which depend on that tables.
This could be related to #1828872: Warning: Invalid argument supplied for foreach() in views_handler_filter_file_type->get_value_options()
A workaround for me was to update to file_entity-7.x-2.0-unstable7 before upgrading to nodestream-7.x-2.0-rc2
Comments
Comment #1
fabsor commentedOh, that's a tough one, it's hard to create a clean upgrade path when problems like this arises. The best approach is probably to devise a a way to ensure that the file_entity update hook runs first. I will head over to the file entity queue and investigate this.
Comment #2
fabsor commentedThis seems to be related to #1875932: Type column in file_managed table set to "undefined" for all files on updb.
I added the patch to NS Core.