Drush site:install doesn't work because of the hook_install

Created on 16 January 2023, almost 2 years ago
Updated 27 July 2023, over 1 year ago

Problem/Motivation

Drush site:install fails when based on the existing config with error

 SQLSTATE[42S02]: Base table or view not found: 1146 Table 'drupal9.menu_tree' doesn't exist: UPDATE "menu_tree" SET "class"=:db_update_placeholder_0  
  WHERE "class" = :db_condition_placeholder_0; Array                                                                                                    
  (                                                                                                                                                     
      [:db_update_placeholder_0] => Drupal\asymmetric_menu_trees\Plugin\Menu\AsymmetricMenuLinkContent                                                  
      [:db_condition_placeholder_0] => Drupal\menu_link_content\Plugin\Menu\MenuLinkContent                                                             
  ) 

Steps to reproduce

Run drush site install based on the yml files stored in the config export/import directory that contains asymmetric_menu_trees in core.extensions.yml
drush si --existing-config

Proposed resolution

Check if the menu_tree table already exists because it's possible that menu_tree table schema definition not yet created by MenuTreeStorage

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇧🇾Belarus w.drupal

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024