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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DuaelFr created an issue. See original summary.

DuaelFr’s picture

Status: Active » Needs review
FileSize
656 bytes
borisson_’s picture

Status: Needs review » Reviewed & tested by the community

Adding a test for this sounds like overkill. Looks great!

  • borisson_ committed 2c0601c on 8.x-1.x authored by DuaelFr
    Issue #3006741 by DuaelFr: Upgrading facets (8006) and block_content (8....
borisson_’s picture

Status: Reviewed & tested by the community » Fixed

Thanks @DuaelFr, committed and pushed.

DuaelFr’s picture

Thank you for this awesome module :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.