I upgraded from 8.9.20 to 9.3.13 and i did an update.php after this. I do get an error:

MISSING UPDATES FOR: VIEWS The installed version of the Views module is too old to update. Update to a version prior to 9.0.0 first (missing updates: views_post_update_remove_core_key).

If i try to update the databse with drush updatedb i get an error too:

In BootstrapHook.php line 36: Bootstrap failed. Run your command with -vvv for more information.

Is there any chance to solve this issue?

This is the status: Drupal version : 9.3.13
Site URI : http://default
DB driver : mysql
DB hostname : localhost
DB port : 3306
DB username : xxx
DB name : xxx
PHP binary : /usr/local/Cellar/php/8.0.3/bin/php
PHP config : /usr/local/etc/php/8.0/php.ini
PHP OS : Darwin
Drush script : /usr/local/bin/drush
Drush version : 11.0.9
Drush temp : /tmp
Drush configs : /Users/mb/Sites/vendor/drush/drush/drush.yml /Users/mb/drush/drush.yml
Drupal root : /Users/mb/Sites
Site path : sites/default

Thanks for helping!


1 Answer 1


The function views_post_update_remove_core_key was introduced in Drupal 8.8 and was removed in Drupal 9.0. See views_removed_post_updates.

To avoid this error and probably other similar errors you have to run update.php or drush updb at least one time with Drupal 8.8.12 or Drupal 8.9.20 (make sure it runs without errors while you are still on Drupal 8) before you can upgrade the code to Drupal 9. Then running update.php on Drupal 9 shouldn't throw this error.

You can add missed post updates to the state of your Drupal installation

$key_value = \Drupal::service('keyvalue');
$existing_updates = $key_value->get('post_update')->get('existing_updates', []);
$post_updates = [
$key_value->get('post_update')->set('existing_updates', array_merge($existing_updates, $post_updates));

(Code is from UpdatePostUpdateTest)

and then run the missed updates yourself. In this example you could simply re-save all Views by hand.

  • Thanks! That means that i have to go back to 8.9.20 and start the update and upgrade procedure again? Or do i have any chance to solve this within this situation?
    – druplash
    Commented May 17, 2022 at 6:59
  • You can try, see the edited answer. But there could be much more update code missing. It's unlikely this is only this one post update function.
    – 4uk4
    Commented May 17, 2022 at 7:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.