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.
Problem/Motivation
While trying to upgrade Drupal Core to 8.6 with Block Content enabled at the same time that Facets (update 8006) I'm facing a fatal error.
block_content_update_8600
adds and populates a new db field on blocks so, when facets_update_8006
tries to load a block before block_content_update_8600
has been run, you get to following error:
[notice] Update started: facets_update_8006
[error] SQLSTATE[42S22]: Column not found: 1054 Unknown column 'block_content_field_data.reusable' in 'where clause': SELECT base_table.revision_id AS revision_id, base_table.id AS id
FROM
{block_content} base_table
INNER JOIN {block_content_field_data} block_content_field_data ON block_content_field_data.id = base_table.id
WHERE (block_content_field_data.reusable IN (:db_condition_placeholder_0)) AND (block_content_field_data.default_langcode IN (:db_condition_placeholder_1)); Array
(
[:db_condition_placeholder_0] => 1
[:db_condition_placeholder_1] => 1
)
Proposed resolution
Implement hook_update_dependencies() to declare the dependency.
Comment | File | Size | Author |
---|---|---|---|
#2 | facets_block_content_update_dependency-3006741-2.patch | 656 bytes | DuaelFr |
Comments
Comment #2
DuaelFrComment #3
borisson_Adding a test for this sounds like overkill. Looks great!
Comment #5
borisson_Thanks @DuaelFr, committed and pushed.
Comment #6
DuaelFrThank you for this awesome module :)