When updating from 8.0.6 to 8.1.0 using Drush I get the following output:

The following updates are pending:

comment module :
  8002 -   Clear caches to fix Comment Views context filter.

field module :
  8003 -   Populate the new 'auto_create_bundle' setting for entity reference fields.

history module :
  8101 -   Change {history}.nid to an unsigned int in order to match {node}.nid.

user module :
  8100 -   Fix invalid token in the status_blocked email body.

views module :
  8005 -   Clear views data cache.

views module :
  Include field formatter dependencies in a view when the formatter is used.

Do you wish to run all pending updates? (y/n): y
Performing views_update_8005                                         [ok]
Performing user_update_8100                                          [ok]
Performing history_update_8101                                       [ok]
Performing field_update_8003                                         [ok]
Performing comment_update_8002                                       [ok]
Cache rebuild complete.                                              [ok]
PHP Fatal error:  Call to a member function getConfigDependencyKey() on null in /home/EXAMPLE/public_html/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php on line 396
Drush command terminated abnormally due to an unrecoverable error.   [error]
Error: Call to a member function getConfigDependencyKey() on null in
/home/EXAMPLE/public_html/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php,
line 396
The external command could not be executed due to an application     [error]
error.
Cache rebuild complete.                                              [ok]
Finished performing updates.                                         [ok]

This leaves the site requiring a database update but attempting to update gives the fatal error above.

I am going to go through each of the views and check for filters containing taxonomies that no longer exist, in case this is the issue.

Comments

serg2 created an issue. See original summary.

alexrayu’s picture

Join in. I have the same issue.

serg2’s picture

@alexrayu are you using tags/taxonomy in your filters in views and if so have you deleted any tags? Do you (or have you had) the Taxonomy Menu installed?

There is an open issue #2343517: Cleanup @todo referring to the config dependencies API issue which deal with ConfigDependencyKey and seems to be related to this issue.

serg2’s picture

Priority: Normal » Major
alexrayu’s picture

I don't have Taxonomy Menu installed, but taxonomy terms could have been deleted. The site is a result of work of a group of developers, and I can not be sure if someone created and then deleted a term, or tried Taxonomy menu and then uninstalled it, but exported the configs.

serg2’s picture

I found the following 3 intertwined issues:
#2613614: Fix the calculation of dependencies in TaxonomyIndexTid filter, #2597854: Content dependencies lost on export and importing again if the content entities do not exist and #2407853: TaxonomyIndexTid Views plugin stores selected terms with the ID instead of UUID.

I applied the latest patch from #2407853: TaxonomyIndexTid Views plugin stores selected terms with the ID instead of UUID and then ran update.php . I got two new errors in the log and, although the update says it terminated abnormally it did update.

The two new errors were:
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction: INSERT INTO {cache_config} (cid, expire, created, tags, checksum, data, serialized) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6) ON DUPLICATE KEY UPDATE cid = VALUES(cid), expire = VALUES(expire), created = VALUES(created), tags = VALUES(tags), checksum = VALUES(checksum), data = VALUES(data), serialized = VALUES(serialized); Array ( [:db_insert_placeholder_0] => last_write_timestamp_cache_config [:db_insert_placeholder_1] => -1 [:db_insert_placeholder_2] => 1461157569.074 [:db_insert_placeholder_3] => [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => d:1461157569.075; [:db_insert_placeholder_6] => 1 ) in Drupal\Core\Cache\ChainedFastBackend->markAsOutdated() (line 306 of /home/EXAMPLE/public_html/core/lib/Drupal/Core/Cache/ChainedFastBackend.php).

and

Warning: array_pop() expects parameter 1 to be array, boolean given in Drupal\system\Controller\DbUpdateController->results() (line 412 of /home/EXAMPLE/public_html/core/modules/system/src/Controller/DbUpdateController.php).

I think they are related to the update failing previously. Re-running update.php does not produce any errors/warnings.

cilefen’s picture

Title: Fatal Error Updating database to 8.0.6 to 8.1.0 » Fatal error: Call to a member function getConfigDependencyKey() when updating database to 8.0.6 to 8.1.0
serg2’s picture

serg2’s picture

Status: Active » Closed (duplicate)