WSOD after upgrading from 8.5.7 to 8.6.0.

Here's php and nginx log:

php | [07-Sep-2018 12:08:59] WARNING: [pool www] child 68 said into stderr: "NOTICE: PHP message: Uncaught PHP Exception Drupal\Core\Database\DatabaseExceptionWrapper: "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"
php | [07-Sep-2018 12:08:59] WARNING: [pool www] child 68 said into stderr: "FROM"
php | [07-Sep-2018 12:08:59] WARNING: [pool www] child 68 said into stderr: "{block_content} base_table"
nginx | 2018/09/07 12:08:59 [error] 24#24: *507 FastCGI sent in stderr: "PHP message: Uncaught PHP Exception Drupal\Core\Database\DatabaseExceptionWrapper: "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
nginx | FROM
nginx | {block_content} base_table
nginx | INNER JOIN {block_content_field_data} block_content_field_data ON block_content_field_data.id = base_table.id
nginx | WHERE (block_content_field_data.reusable IN (:db_condition_placeholder_0)) AND (block_content_field_data.default_langcode IN (:db_condition_placeholder_1)); Array
nginx | (
nginx |     [:db_condition_placeholder_0] => 1
nginx |     [:db_condition_placeholder_1] => 1
nginx | )
nginx | " at /var/www/html/web/core/lib/Drupal/Core/Database/Connection.php line 686" while reading response header from upstream, client: 172.18.0.6, server: drupal, request: "GET / HTTP/1.1", upstream: "fastcgi://172.18.0.4:9000", host: "EXAMPLE.COM"
nginx | 172.18.0.6 - - [07/Sep/2018:12:08:59 +0000] "GET / HTTP/1.1" 500 79 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"
php | [07-Sep-2018 12:08:59] WARNING: [pool www] child 68 said into stderr: "INNER JOIN {block_content_field_data} block_content_field_data ON block_content_field_data.id = base_table.id"
php | [07-Sep-2018 12:08:59] WARNING: [pool www] child 68 said into stderr: "WHERE (block_content_field_data.reusable IN (:db_condition_placeholder_0)) AND (block_content_field_data.default_langcode IN (:db_condition_placeholder_1)); Array"
php | [07-Sep-2018 12:08:59] WARNING: [pool www] child 68 said into stderr: "("
php | [07-Sep-2018 12:08:59] WARNING: [pool www] child 68 said into stderr: "    [:db_condition_placeholder_0] => 1"
php | [07-Sep-2018 12:08:59] WARNING: [pool www] child 68 said into stderr: "    [:db_condition_placeholder_1] => 1"
php | [07-Sep-2018 12:08:59] WARNING: [pool www] child 68 said into stderr: ")"
php | [07-Sep-2018 12:08:59] WARNING: [pool www] child 68 said into stderr: "" at /var/www/html/web/core/lib/Drupal/Core/Database/Connection.php line 686"
php | 172.18.0.7 -  07/Sep/2018:12:08:59 +0000 "GET /index.php" 500
CommentFileSizeAuthor
#7 Screenshot from 2018-09-11 09-44-06.png77.65 KBalesr

Comments

alesr created an issue. See original summary.

twfahey’s picture

Just to confirm - Did you run database updates?

cilefen’s picture

Issue tags: +8.6.0 update
berdir’s picture

Priority: Normal » Major

As pointed out in slack once, we should definitely catch that exception, might result in some "this block is missing" warnings but otherwise at least the front page should be working.

But yes, this should only happen if you either didn't run updates or if they failed and didn't complete.

kennybell’s picture

Hi, reporting similar issue after drush cim:

appserver_1  | [Mon Sep 10 00:51:59.278001 2018] [php7:notice] [pid 1725] [client 172.18.0.1:36294] Uncaught PHP Exception Drupal\\Core\\Database\\DatabaseExceptionWrapper: "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\nFROM\n{block_content} base_table\nINNER JOIN {block_content_field_data} block_content_field_data ON block_content_field_data.id = base_table.id\nWHERE (block_content_field_data.reusable IN (:db_condition_placeholder_0)) AND (block_content_field_data.default_langcode IN (:db_condition_placeholder_1)); Array\n(\n    [:db_condition_placeholder_0] => 1\n    [:db_condition_placeholder_1] => 1\n)\n" at /app/web/core/lib/Drupal/Core/Database/Connection.php line 686
appserver_1  | 172.18.0.1 - - [10/Sep/2018:00:51:47 +0000] "GET / HTTP/1.1" 500 555 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.81 Safari/537.36"
appserver_1  | [Mon Sep 10 00:52:26.371658 2018] [php7:notice] [pid 1722] [client 172.18.0.1:36300] Uncaught PHP Exception Drupal\\Core\\Database\\DatabaseExceptionWrapper: "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\nFROM\n{block_content} base_table\nINNER JOIN {block_content_field_data} block_content_field_data ON block_content_field_data.id = base_table.id\nWHERE (block_content_field_data.reusable IN (:db_condition_placeholder_0)) AND (block_content_field_data.default_langcode IN (:db_condition_placeholder_1)); Array\n(\n    [:db_condition_placeholder_0] => 1\n    [:db_condition_placeholder_1] => 1\n)\n" at /app/web/core/lib/Drupal/Core/Database/Connection.php line 686
appserver_1  | 172.18.0.1 - - [10/Sep/2018:00:52:22 +0000] "GET / HTTP/1.1" 500 555 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.81 Safari/537.36"
berdir’s picture

What are the exact commands you did run? Did you run drush updb first? What was the output?

You don't want to run a drush cim after doing a core/module upgrade as that might actually revert configuration back that was changed by the update.

alesr’s picture

StatusFileSize
new77.65 KB

I had to do it again today because I reverted to 8.5.7 on Friday.

I ran the same command "composer require drupal/core:8.6.0 webflo/drupal-core-require-dev --update-with-dependencies" and this time I got no errors when visiting the site!
And this is before UPDB.

report status

You can see in status report that I got notified to run updates.

It's hard to tell why this time I got through without WSOD because no apparent changes were made.
Updb would probably solved it because I only ran clear caches a few times, but I still got through without when I tried it again.

Meanwhile I ran the updates and updated core to 8.6.1 without issues.

catch’s picture

Agreed with catching the exception here, we should watchdog_exception() so that it's not completely eaten.

zepner’s picture

Thank you for #2, almost never seem to do it in D8

dsp1’s picture

got caught by this issue too. I usually flush cache right after moving the new version in. then run update, but since WSOD, didn't run update thinking it wouldn't work. after reading this tried it and update to run and get past the bug. thanks to comment above!

allema_s’s picture

For me, drush updb solved the issue.
update.php didn't worked, i had the same issue.

duaelfr’s picture

I faced this issue while trying to upgrade Core from 8.5.x and Facets at the same time.

facets_update_8006 just tries to load some Block entities to add them a simple setting. It triggers the error and make the upgrade fail.
The main reason is that the "reusable" field is added in a post_update and that hook_update_N cannont depend on post_updates.

Surprisingly, running the updb twice bypass the issue but it's not really comforting me.

catch’s picture

@DuaelFr the reusable field is added in block_content_update_8600() - so it should be OK for facets to add an update dependency on that.

duaelfr’s picture

@catch Thanks for the pointer! I created the issue on the Facets queue.

gangwarsurya’s picture

Status: Active » Needs review
longwave’s picture

Status: Needs review » Active

No patch to review; seems like this might be an interaction with contrib for some users at least.

bburg’s picture

Issue summary: View changes

I am also running into this. Upgrading from 8.5.3 to 8.6.2 (critical security update). It happens when I try to run database updates. These were run as a part of an Acquia cloud update hook script.

block_content module : 
  8600 -   Add 'reusable' field to 'block_content' entities. 

dblog module : 
  8600 -   Change 'No logs message available.' area plugin type. 

media module : 
  8600 -   Updates media.settings to support OEmbed. 

menu_link_content module : 
  8601 -   Add the publishing status entity key to custom menu links. 

taxonomy module : 
  8501 -   Convert the custom taxonomy term hierarchy storage to a default storage. 
  8502 -   Copy hierarchy from {taxonomy_term_hierarchy} to {taxonomy_term__parent}. 
  8503 -   Update views to use {taxonomy_term__parent} in relationships. 
  8601 -   Add the publishing status fields to taxonomy terms. 

block_content module : 
  Adds a 'reusable' filter to all Custom Block views.

contextual module : 
  Ensure new page loads use the updated JS and get the updated markup.

image module : 
  Add 'anchor' setting to 'Scale and crop' effects.

media module : 
  Clear caches due to the addition of a Media-specific entity storage handler.

system module : 
  Change plugin IDs of delete actions.
  Update all entity displays that contain extra fields.
  Force cache clear for language item callback.   @see https:www.drupal.orgnode2851736

taxonomy module : 
  Clear entity_bundle_field_definitions cache for new parent field settings.
  Clear caches due to updated taxonomy entity views data.
  Add a 'published' = TRUE filter for all Taxonomy term views and converts  existing ones that were using the 'content_translation_status' field.

Do you wish to run all pending updates? (y/n): 
y
Unknown options: --site, --env.  See `drush help                         [error]
updatedb-batch-process` for available options. To suppress this
error, add the option --strict=0.
Unknown options: --site, --env.  See `drush help cache-rebuild` for      [error]
available options. To suppress this error, add the option --strict=0.
Finished performing updates.                                                [ok]
There are no changes to import.                                             [ok]
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column     [error]
'data.reusable' in 'field list' in
/core/lib/Drupal/Core/Database/Statement.php:59
Stack trace:
#0
/core/lib/Drupal/Core/Database/Statement.php(59):
PDOStatement->execute(Array)
#1
/core/lib/Drupal/Core/Database/Connection.php(625):
Drupal\Core\Database\Statement->execute(Array, Array)
#2
/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php(358):
Drupal\Core\Database\Connection->query('SELECT revision...', Array,
Array)
#3
/core/lib/Drupal/Core/Database/Query/Select.php(510):
Drupal\Core\Database\Driver\mysql\Connection->query('SELECT
revision...', Array, Array)
#4
/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(541):
Drupal\Core\Database\Query\Select->execute()
#5
/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(464):
Drupal\Core\Entity\Sql\SqlContentEntityStorage->loadFromSharedTables(Array,
Array, false)
#6
/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(393):
Drupal\Core\Entity\Sql\SqlContentEntityStorage->mapFromStorageRecords(Array)
#7
/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(359):
Drupal\Core\Entity\Sql\SqlContentEntityStorage->getFromStorage(Array)
#8
/core/lib/Drupal/Core/Entity/EntityStorageBase.php(279):
Drupal\Core\Entity\Sql\SqlContentEntityStorage->doLoadMultiple(Array)
#9
/core/lib/Drupal/Core/Entity/EntityStorageBase.php(542):
Drupal\Core\Entity\EntityStorageBase->loadMultiple(Array)
#10
/core/lib/Drupal/Core/Entity/EntityRepository.php(52):
Drupal\Core\Entity\EntityStorageBase->loadByProperties(Array)
#11
/core/lib/Drupal/Core/Entity/EntityManager.php(501):
Drupal\Core\Entity\EntityRepository->loadEntityByUuid('block_content',
'8bf7a3ea-6356-4...')
#12
/core/lib/Drupal/Core/Config/ConfigManager.php(490):
Drupal\Core\Entity\EntityManager->loadEntityByUuid('block_content',
'8bf7a3ea-6356-4...')
#13
/modules/contrib/recreate_block_content/recreate_block_content.module(33):
Drupal\Core\Config\ConfigManager->findMissingContentDependencies()
#14 [internal function]: recreate_block_content_rebuild()
#15
/core/lib/Drupal/Core/Extension/ModuleHandler.php(403):
call_user_func_array('recreate_block_...', Array)
#16
/core/includes/common.inc(1148):
Drupal\Core\Extension\ModuleHandler->invokeAll('rebuild')
#17
/core/includes/utility.inc(52):
drupal_flush_all_caches()
#18
/usr/local/drush8/vendor/drush/drush/commands/core/cache.drush.inc(302):
drupal_rebuild(Object(Composer\Autoload\ClassLoader),
Object(Symfony\Component\HttpFoundation\Request))
#19 /usr/local/drush8/vendor/drush/drush/includes/command.inc(422):
drush_cache_rebuild()
#20 /usr/local/drush8/vendor/drush/drush/includes/command.inc(231):
_drush_invoke_hooks(Array, Array)
#21 /usr/local/drush8/vendor/drush/drush/includes/command.inc(199):
drush_command()
#22
/usr/local/drush8/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67):
drush_dispatch(Array)
#23 /usr/local/drush8/vendor/drush/drush/includes/preflight.inc(66):
Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#24 /usr/local/drush8/vendor/drush/drush/drush.php(12): drush_main()
#25 {main}

Next Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S22]:
Column not found: 1054 Unknown column 'data.reusable' in 'field
list': SELECT revision.*, data.reusable AS reusable
FROM
{block_content_field_revision} revision
LEFT OUTER JOIN {block_content_field_data} data ON (revision.id =
data.id and revision.langcode = data.langcode)
WHERE (revision.id IN (:db_condition_placeholder_0)) AND
(revision.revision_id IN (:db_condition_placeholder_1))
ORDER BY revision.id ASC; Array
(
    [:db_condition_placeholder_0] => 21
    [:db_condition_placeholder_1] => 21
)
 in
/core/lib/Drupal/Core/Database/Connection.php:686
Stack trace:
#0
/core/lib/Drupal/Core/Database/Connection.php(650):
Drupal\Core\Database\Connection->handleQueryException(Object(PDOException),
'SELECT revision...', Array, Array)
#1
/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php(358):
Drupal\Core\Database\Connection->query('SELECT revision...', Array,
Array)
#2
/core/lib/Drupal/Core/Database/Query/Select.php(510):
Drupal\Core\Database\Driver\mysql\Connection->query('SELECT
revision...', Array, Array)
#3
/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(541):
Drupal\Core\Database\Query\Select->execute()
#4
/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(464):
Drupal\Core\Entity\Sql\SqlContentEntityStorage->loadFromSharedTables(Array,
Array, false)
#5
/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(393):
Drupal\Core\Entity\Sql\SqlContentEntityStorage->mapFromStorageRecords(Array)
#6
/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(359):
Drupal\Core\Entity\Sql\SqlContentEntityStorage->getFromStorage(Array)
#7
/core/lib/Drupal/Core/Entity/EntityStorageBase.php(279):
Drupal\Core\Entity\Sql\SqlContentEntityStorage->doLoadMultiple(Array)
#8
/core/lib/Drupal/Core/Entity/EntityStorageBase.php(542):
Drupal\Core\Entity\EntityStorageBase->loadMultiple(Array)
#9
/core/lib/Drupal/Core/Entity/EntityRepository.php(52):
Drupal\Core\Entity\EntityStorageBase->loadByProperties(Array)
#10
/core/lib/Drupal/Core/Entity/EntityManager.php(501):
Drupal\Core\Entity\EntityRepository->loadEntityByUuid('block_content',
'8bf7a3ea-6356-4...')
#11
/core/lib/Drupal/Core/Config/ConfigManager.php(490):
Drupal\Core\Entity\EntityManager->loadEntityByUuid('block_content',
'8bf7a3ea-6356-4...')
#12
/modules/contrib/recreate_block_content/recreate_block_content.module(33):
Drupal\Core\Config\ConfigManager->findMissingContentDependencies()
#13 [internal function]: recreate_block_content_rebuild()
#14
/core/lib/Drupal/Core/Extension/ModuleHandler.php(403):
call_user_func_array('recreate_block_...', Array)
#15
/core/includes/common.inc(1148):
Drupal\Core\Extension\ModuleHandler->invokeAll('rebuild')
#16
/core/includes/utility.inc(52):
drupal_flush_all_caches()
#17
/usr/local/drush8/vendor/drush/drush/commands/core/cache.drush.inc(302):
drupal_rebuild(Object(Composer\Autoload\ClassLoader),
Object(Symfony\Component\HttpFoundation\Request))
#18 /usr/local/drush8/vendor/drush/drush/includes/command.inc(422):
drush_cache_rebuild()
#19 /usr/local/drush8/vendor/drush/drush/includes/command.inc(231):
_drush_invoke_hooks(Array, Array)
#20 /usr/local/drush8/vendor/drush/drush/includes/command.inc(199):
drush_command()
#21
/usr/local/drush8/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67):
drush_dispatch(Array)
#22 /usr/local/drush8/vendor/drush/drush/includes/preflight.inc(66):
Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#23 /usr/local/drush8/vendor/drush/drush/drush.php(12): drush_main()
#24 {main}

Sure enough, it seems that "reusable" column is missing.

mysql> describe block_content_field_data;
+-------------------------------+------------------+------+-----+---------+-------+
| Field                         | Type             | Null | Key | Default | Extra |
+-------------------------------+------------------+------+-----+---------+-------+
| id                            | int(10) unsigned | NO   | PRI | NULL    |       |
| revision_id                   | int(10) unsigned | NO   | MUL | NULL    |       |
| type                          | varchar(32)      | NO   | MUL | NULL    |       |
| langcode                      | varchar(12)      | NO   | PRI | NULL    |       |
| status                        | tinyint(4)       | NO   | MUL | NULL    |       |
| info                          | varchar(255)     | YES  |     | NULL    |       |
| changed                       | int(11)          | YES  |     | NULL    |       |
| default_langcode              | tinyint(4)       | NO   |     | NULL    |       |
| revision_translation_affected | tinyint(4)       | YES  |     | NULL    |       |
+-------------------------------+------------------+------+-----+---------+-------+
9 rows in set (0.00 sec)

Re-running the updates manually via drush seems to get past it. I suppose that works but not ideal.

(side note, edits to issue summary were an accident).

bburg’s picture

What's more, it doesn't seem to happen locally. Only on the Acquia dev site.

bburg’s picture

I'll try to get a more verbose build output, but it seems to be that some update hook is triggering a cache clear, and the contrib recreate_block_content module calls

$config_manager->findMissingContentDependencies();

in it's hook_rebuild, which eventually triggers a bad SQL query as block_content's 8600 update hasn't run by that point to add the "reusable" column.

benpc’s picture

Hey everyone,

I had the same issue, I resolved this with the following commands:

drush entity-updates
drush updatedb
drush cr

You may have to run drush entity-update a couple of times as it failed to update correctly for me the first time.

robpowell’s picture

Thanks to #20, I was able to get unblocked. I thought for a while now that drush updb ran drush entup as well. ¯\_(ツ)_/¯

drush entup #1

The following updates are pending:

block_content entity type : 
  The Reusable field needs to be installed.
  The Revision translation affected field needs to be uninstalled.
mollom_form entity type : 
  The Mollom Form Configuration entity type needs to be installed.
node entity type : 
  The Revision translation affected field needs to be uninstalled.
taxonomy_term entity type : 
  The Taxonomy term entity type needs to be updated.
  The Published field needs to be installed.
menu_link_content entity type : 
  The Custom menu link entity type needs to be updated.
Do you wish to run all pending updates? (y/n): y
TypeError: Argument 1 passed to                                          [error]
Drupal\Core\Entity\EntityManager::onFieldStorageDefinitionCreate()
must implement interface
Drupal\Core\Field\FieldStorageDefinitionInterface, null given, called
in
/srv/bindings/45e23e06bf084e4c90a5c3f70a576a5b/code/docroot/core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php
on line 256 in
Drupal\Core\Entity\EntityManager->onFieldStorageDefinitionCreate()
(line 572 of
/srv/bindings/45e23e06bf084e4c90a5c3f70a576a5b/code/docroot/core/lib/Drupal/Core/Entity/EntityManager.php)
#0
/srv/bindings/45e23e06bf084e4c90a5c3f70a576a5b/code/docroot/core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php(256):
Drupal\Core\Entity\EntityManager->onFieldStorageDefinitionCreate(NULL)
#1
/srv/bindings/45e23e06bf084e4c90a5c3f70a576a5b/code/docroot/core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php(131):
Drupal\Core\Entity\EntityDefinitionUpdateManager->doFieldUpdate(1,
NULL, NULL)
#2 /opt/pantheon/drush8/commands/core/drupal/update.inc(306):
Drupal\Core\Entity\EntityDefinitionUpdateManager->applyUpdates()
#3 /opt/pantheon/drush8/commands/core/drupal/batch.inc(163):
drush_update_entity_definitions(Object(DrushBatchContext))
#4 /opt/pantheon/drush8/commands/core/drupal/batch.inc(111):
_drush_batch_worker()
#5 /opt/pantheon/drush8/includes/batch.inc(98):
_drush_batch_command('109')
#6 /opt/pantheon/drush8/commands/core/drupal/update.inc(230):
drush_batch_command('109')
#7 /opt/pantheon/drush8/commands/core/core.drush.inc(1227):
_update_batch_command('109')
#8 /opt/pantheon/drush8/includes/command.inc(422):
drush_core_updatedb_batch_process('109')
#9 /opt/pantheon/drush8/includes/command.inc(231):
_drush_invoke_hooks(Array, Array)
#10 /opt/pantheon/drush8/includes/command.inc(199):
drush_command('109')
#11 /opt/pantheon/drush8/lib/Drush/Boot/BaseBoot.php(67):
drush_dispatch(Array)
#12 /opt/pantheon/drush8/includes/preflight.inc(66):
Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#13 /opt/pantheon/drush8/drush.php(12): drush_main()
#14 {main}.
TypeError: Argument 1 passed to Drupal\Core\Entity\EntityManager::onFieldStorageDefinitionCreate() must implement interface Drupal\Core\Field\FieldStorageDefinitionInterface, null given, called in /srv/bindings/45e23e06bf084e4c90a5c3f70a576a5b/code/docroot/core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php on line 256 in Drupal\Core\Entity\EntityManager->onFieldStorageDefinitionCreate() (line 572 of /srv/bindings/45e23e06bf084e4c90a5c3f70a576a5b/code/docroot/core/lib/Drupal/Core/Entity/EntityManager.php).
Drush command terminated abnormally due to an unrecoverable error.       [error]
Cache rebuild complete.                                                     [ok]
Finished performing updates.                                                [ok]

drush entup #2

The following updates are pending:

block_content entity type : 
  The Reusable field needs to be installed.
  The Revision translation affected field needs to be uninstalled.
mollom_form entity type : 
  The Mollom Form Configuration entity type needs to be installed.
node entity type : 
  The Revision translation affected field needs to be uninstalled.
taxonomy_term entity type : 
  The Taxonomy term entity type needs to be updated.
  The Published field needs to be installed.
menu_link_content entity type : 
  The Custom menu link entity type needs to be updated.
Do you wish to run all pending updates? (y/n): y
Cache rebuild complete.                                                     [ok]
Finished performing updates.                                                [ok]

drush entup #3

The following updates are pending:

taxonomy_term entity type : 
  The Term Parents field needs to be updated.
menu_link_content entity type : 
  The Enabled field needs to be updated.
Do you wish to run all pending updates? (y/n): y
Cache rebuild complete.                                                     [ok]
Finished performing updates.                                                [ok]

drush entup #4

No entity schema updates required                                      [success]
Cache rebuild complete.                                                     [ok]
Finished performing updates.                                                [ok]

drush updb #1

The following updates are pending:

block_content module : 
  8600 -   Add 'reusable' field to 'block_content' entities. 

comment module : 
  8600 -   Configure the comment hostname base field to use a default value callback. 

dblog module : 
  8600 -   Change 'No logs message available.' area plugin type. 

menu_link_content module : 
  8601 -   Add the publishing status entity key to custom menu links. 

redirect module : 
  8104 -   Save the bulk delete action to config. 
  8105 -   Ensure to use the redirect_404 submodule. 
  8106 -   Removes unnecessary settings from storage. 
  8107 -   Update permissions.   When splitting the permission for settings from the permission to view  the list of redirects, maintain the current permissions for sites which  already have this module installed. 
  8108 -   Removes unnecessary settings. 

taxonomy module : 
  8501 -   Convert the custom taxonomy term hierarchy storage to a default storage. 
  8502 -   Copy hierarchy from {taxonomy_term_hierarchy} to {taxonomy_term__parent}. 
  8503 -   Update views to use {taxonomy_term__parent} in relationships. 
  8601 -   Add the publishing status fields to taxonomy terms. 

block_content module : 
  Adds a 'reusable' filter to all Custom Block views.

contextual module : 
  Ensure new page loads use the updated JS and get the updated markup.

image module : 
  Add 'anchor' setting to 'Scale and crop' effects.

system module : 
  Change plugin IDs of delete actions.
  Update all entity displays that contain extra fields.
  Force cache clear for language item callback.   @see https:www.drupal.orgnode2851736

taxonomy module : 
  Clear entity_bundle_field_definitions cache for new parent field settings.
  Clear caches due to updated taxonomy entity views data.
  Add a 'published' = TRUE filter for all Taxonomy term views and converts  existing ones that were using the 'content_translation_status' field.

Do you wish to run all pending updates? (y/n): y
Performing redirect_update_8104                                             [ok]
Performing redirect_update_8105                                             [ok]
Performing taxonomy_update_8501                                             [ok]
Performing redirect_update_8106                                             [ok]
Performing taxonomy_update_8502                                             [ok]
Performing redirect_update_8107                                             [ok]
Performing taxonomy_update_8503                                             [ok]
Performing block_content_update_8600                                        [ok]
Performing comment_update_8600                                              [ok]
Performing dblog_update_8600                                                [ok]
Performing menu_link_content_update_8601                                    [ok]
Performing redirect_update_8108                                             [ok]
Performing taxonomy_update_8601                                             [ok]
Post updating block_content                                                 [ok]
Post updating contextual                                                    [ok]
Post updating image                                                         [ok]
Post updating system                                                        [ok]
Post updating system                                                        [ok]
Post updating system                                                        [ok]
Post updating system                                                        [ok]
Post updating system                                                        [ok]
Post updating system                                                        [ok]
Post updating taxonomy                                                      [ok]
Post updating taxonomy                                                      [ok]
Post updating taxonomy                                                      [ok]
Cache rebuild complete.                                                     [ok]
Finished performing updates.                                                [ok]
balintbrews’s picture

We stumbled into the same issue, but drush updb and/or drush entup were not helpful in our case, so we ended up re-running block_content_update_8600() manually:

drush php-eval "require './core/modules/block_content/block_content.install'; block_content_update_8600()"

collinhaines’s picture

Had the same issue as #22, executed the drush php-eval command and WSOD disappeared.

catch’s picture

it seems to be that some update hook is triggering a cache clear

This is a bug with that update function - caches are cleared at the end up of the update process, and modules shouldn't do it themselves - specifically to avoid issues like this one. So worth opening a bug report against the module doing it if you track it down.

catch’s picture

Category: Bug report » Support request

So far every issue that's been tracked down here has turned out to be a bug in a contrib or custom update, I don't think we have any issues with the core update itself.

However this issue has useful debugging/recovery information for people running into the missing column, so I'm going to change the category to 'support request'.

shobhit_juyal’s picture

#22 also worked for me, thanks.

Regards
Shobhit Juyal

alison’s picture

Hi! Any chance y'all with the issue are using the Domain module? I just wondered if maybe it could be related to "Some users of domain module reported being unable to place blocks. Updating to the latest domain module fixed it" (under "Known issues" in the 8.6.0 release notes).

alison’s picture

Nnnnope never mind #27, it was something completely unrelated -- a "colon" in the human-readable name of our custom install profile became a point of contention when we upgraded from 8.5.x to 8.6.x (b/c yml).

shobhit_juyal’s picture

Hi @alisonjo2786,

In my case the Domain module was not there. I think it should not have any impact on this post.

Thanks

shailu29’s picture

#20 worked for me
thank you @bencp

sasanikolic’s picture

Confirming that after drush updb it worked for me too.

amutylo’s picture

confirm #20 helped me too

karimbou’s picture

Hello for the same issue upgrading from 8.5.4 to 8.6.7
Thanks to #20 and #21 Re-launching many times drush updb twice and drush entup 3 times also helped me on our environments.

gurunathan’s picture

Any solution to solve it without using Drush?

alison’s picture

@gurunathan I thiiiiink running /update.php should work...? You can check "Status report" after doing that -- if you have outstanding entity schema updates, it'll say so on "Status report." HTH!

penyaskito’s picture

Category: Support request » Bug report

I think this is a bug in core somehow for sure.
I stumbled here after some of my post-update tests failed with 8.7.x, with a dump I did with 8.5.x. Link: https://www.drupal.org/pift-ci-job/1313097

The stacktrace is:

Drupal\Core\Entity\Query\QueryException: 'reusable' not found in Drupal\Core\Entity\Query\Sql\Tables->ensureEntityTable() (line 367 of core/lib/Drupal/Core/Entity/Query/Sql/Tables.php).
Drupal\Core\Entity\Query\Sql\Tables->addField('reusable', 'INNER', NULL) (Line: 52)
Drupal\Core\Entity\Query\Sql\Condition->compile(Object) (Line: 172)
Drupal\Core\Entity\Query\Sql\Query->compile() (Line: 80)
Drupal\Core\Entity\Query\Sql\Query->execute() (Line: 572)
Drupal\Core\Entity\EntityStorageBase->loadByProperties(Array) (Line: 46)
Drupal\block_content\Plugin\Derivative\BlockContent->getDerivativeDefinitions(Array) (Line: 101)
Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDerivatives(Array) (Line: 87)
Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions() (Line: 284)
Drupal\Core\Plugin\DefaultPluginManager->findDefinitions() (Line: 175)
Drupal\Core\Plugin\DefaultPluginManager->getDefinitions() (Line: 22)
Drupal\Core\Plugin\DefaultPluginManager->getDefinition('local_actions_block') (Line: 16)
Drupal\Core\Plugin\Factory\ContainerFactory->createInstance('local_actions_block', Array) (Line: 76)
Drupal\Component\Plugin\PluginManagerBase->createInstance('local_actions_block', Array) (Line: 62)
Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->initializePlugin('local_actions_block') (Line: 57)
Drupal\block\BlockPluginCollection->initializePlugin('local_actions_block') (Line: 80)
Drupal\Component\Plugin\LazyPluginCollection->get('local_actions_block') (Line: 45)
Drupal\block\BlockPluginCollection->get('local_actions_block') (Line: 83)
Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->setConfiguration(Array) (Line: 99)
Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->addInstanceId('local_actions_block', Array) (Line: 55)
Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->__construct(Object, 'local_actions_block', Array) (Line: 34)
Drupal\block\BlockPluginCollection->__construct(Object, 'local_actions_block', Array, 'bartik_local_actions') (Line: 156)
Drupal\block\Entity\Block->getPluginCollection() (Line: 145)
Drupal\block\Entity\Block->getPlugin() (Line: 118)
Drupal\block\BlockAccessControlHandler->checkAccess(Object, 'view', Object) (Line: 105)
Drupal\Core\Entity\EntityAccessControlHandler->access(Object, 'view', Object, 1) (Line: 369)
Drupal\Core\Entity\EntityBase->access('view', NULL, 1) (Line: 56)
Drupal\block\BlockRepository->getVisibleBlocksPerRegion(Array) (Line: 137)
Drupal\block\Plugin\DisplayVariant\BlockPageVariant->build() (Line: 259)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 693)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

My dump include only the standard profile + Lingotek module + some node entities + own Lingotek entities for testing, so nothing special. Lingotek itself has no dependencies aside of Drupal core modules.

I reviewed all my hook_update_N and there is no cache clears (and in any case, those won't be applied, only 2 post-update functions are not in the dump itself).

robert_t_taylor’s picture

Thought I'd mention this for anyone having intractable issues with this.

I had issues with trying to run the query manually: drush sqlq "update block_content_field_data set reusable = 1 WHERE reusable IS NULL;" and realized that this was failing because I forgot that I had used a database prefix!

Anyway, drush sqlq "update myprefix_block_content_field_data set reusable = 1 WHERE reusable IS NULL;" did finally work.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev
vrancje’s picture

Issue tags: +ddd2022

I don't think this issue is relevant anymore.
Perhaps this can be set to "Closed (outdated)".

Anyone care to chime in?

longwave’s picture

Status: Active » Closed (outdated)
Issue tags: +Bug Smash Initiative

Agreed, closing as outdated; 8.5 and 8.6 have not been supported for a number of years.