Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drush updb doesn't work for Drupal 7 -> Backdrop CMS #96

Open
jenlampton opened this issue May 5, 2017 · 11 comments
Open

Drush updb doesn't work for Drupal 7 -> Backdrop CMS #96

jenlampton opened this issue May 5, 2017 · 11 comments

Comments

@jenlampton
Copy link
Member

jenlampton commented May 5, 2017

When updating from Drupal 7 to Backdrop via update.php, my updates complete successfully.

When I try to use drush updb -y from the command line, all the updates run as usual but then the second-to-last message printed to the screen is as follows:

Exception: The configuration directory in settings.php is specified as '../config/dev-active', but this directory is either empty or missing crucial files. Check that the $config_directories variable is correct in settings.php. in _backdrop_bootstrap_configuration() (line 2900 of backdrop/core/includes/bootstrap.inc).
Drush command terminated abnormally due to an unrecoverable error.                                           
[error]

Then, oddly, the last message printed is as follows:

Finished performing updates. 
[ok]
@serundeputy
Copy link
Member

@jenlampton I could not reproduce this.

I upgraded from a generic drupal 7.54 to backdrop 1.6.3 using drush updb -y and everything worked as expected.

Can you identify any other steps that would cause this? In my vanilla drupal there were no contrib modules for instance, but that error sure looks like it blew up before trying to get to any contrib module updates.

Please let me know if you dig anything else up on this.

@jenlampton
Copy link
Member Author

This site was actually a D6 site that went through D7 to Backdrop. (I don't see how that would affect drush differently, ... but you never know!) I'm going to do the whole upgrade again in an hour or so anyway, I'll see if I can reproduce the problem after doing the D6 -> D7 part over again.

@jenlampton
Copy link
Member Author

jenlampton commented May 7, 2017

It failed again. But it looks like after both core and contrib have been updated (successfully?)
Here's the complete output:

> drush updb -y
 System          1000  1000 - Enable entity module.                                                                     
 System          1001  1001 - Move from the Garland theme.                                                              
 System          1002  1002 - Set Bartik as default theme if it implicitly was the default before.   The default theme  
                       for Backdrop core was changed from Bartik to Stark.  Installation profiles (including Standard   
                       and Minimal) were changed to  explicitly configure Bartik as default theme. Since Bartik was the 
                       default  theme by default and may not have been explicitly configured as such  previously, this  
                       update ensures that the implicit Bartik default is still the  default.   @see                    
                       http:drupal.orgnode1181776                                                                       
 System          1003  1003 - Convert performance module settings to use configuration files.                           
 System          1004  1004 - Create the "state" table for the state storage system.                                    
 System          1005  1005 - Convert basic system variables to the state system.                                       
 System          1006  1006 - Delete unneeded actions for manually saving comments and nodes.                           
 System          1007  1007 - Create the tempstore table and remove the cache_form table.                               
 System          1008  1008 - Convert the 'filesize' column in {file_managed} to a bigint.                              
 System          1009  1009 - Enable Admin Menu module.                                                                 
 System          1010  1010 - Remove the registry and registry_file tables.                                             
 System          1011  1011 - Specify the files directory manually if needed.                                           
 System          1012  1012 - Convert cron settings to use configuration files.                                         
 System          1013  1013 - Moves site system settings from variable to config.                                       
 System          1014  1014 - Move the system maintenance settings from variable to config.                             
 System          1015  1015 - Convert RSS publishing settings to use configuration files.                               
 System          1016  1016 - Moves action_max_stack from variable to config.                                           
 System          1017  1017 - Moves system logging settings from variables to config.                                   
 System          1018  1018 - Moves authorize system settings from variable to config.                                  
 System          1019  1019 - Converts active_menus_default variable to config.                                         
 System          1020  1020 - Convert date settings to config.                                                          
 System          1021  1021 - Removes the js_cache_files variable.                                                      
 System          1022  1022 - Converts theme logo and shortcut settings to site-wide config.                            
 System          1023  1023 - Enable admin_bar, replacing the renamed admin_menu.                                       
 System          1024  1024 - Consolidate common config files into "system.core".                                       
 System          1025  1025 - Convert block positioning and configuration to the default layout.                        
 System          1026  1026 - Convert file system, clean URL, profile, and theme variables to config.                   
 System          1027  1027 - Remove the per-user cache column from the session table.                                  
 System          1028  1028 - Convert filter fallback and user cancellation method variables to config.                 
 System          1029  1029 - Convert config sync size to config.                                                       
 System          1030  1030 - Convert mail system variable to config.                                                   
 System          1031  1031 - Drop the actions table, no longer used by Backdrop.                                       
 System          1032  1032 - Enable config module.                                                                     
 System          1033  1033 - Set the minimum page cache lifetime to 5 minutes by default.                              
 System          1034  1034 - Set the theme_debug flag to FALSE.                                                        
 System          1035  1035 - Set the weight of Layout module to run last.                                              
 System          1036  1036 - Remove the private key from configuration.                                                
 System          1037  1037 - Set the default value for canonical_secure option.  Check if old menu item exists and     
                       remove it.                                                                                       
 System          1038  1038 - Upgrade or prepare for token module in core.                                              
 System          1039  1039 - Add the "auto" column to the url_alias table.                                             
 System          1040  1040 - Notify administrators if a non-core version of CKEditor module is present.                
 System          1041  1041 - Notify administrators if a non-core version of Email module is present.                   
 System          1042  1042 - Notify administrators if a non-core version of Link module is present.                    
 System          1043  1043 - Remove old Date configuration files.                                                      
 System          1044  1044 - Notify administrators if a non-core version of the Date module is present.                
 System          1045  1045 - Ensure that the installation flag is properly set.                                        
 System          1046  1046 - Upgrade or prepare for transliteration functions in core.                                 
 System          1047  1047 - Provide a default value for maintenance_page_maximum_age.                                 
 System          1048  1048 - Set background fetch defaults.                                                            
 System          1049  1049 - Bartik theme settings update: Indicate whether legacy colors should be used.              
 System          1050  1050 - Fix legacy color setting in Bartik.                                                       
 System          1051  1051 - Notify administrators if a non-core version of Redirect module is present.                
 System          1052  1052 - Disable project browser if it previously existed on the site.                             
 System          1053  1053 - Remove unnecessary items from the "main-menu" menu.                                       
 System          1054  1054 - Changes the key in layout config files from 'layout' to 'layout_template'.                
 System          1055  1055 - Create the new layout settings configuration file.                                        
 System          1056  1056 - Move incorrectly stored "log_row_limit" setting.                                          
 System          1057  1057 - Add default for watchdog_enabled_severity_levels.                                         
 System          1058  1058 - Clarify state "menu_expanded" as "menus_containing_expanded_items".                       
 System          1059  1059 - Set home page menu to render as a drop-down menu.                                         
 System          1060  1060 - Remove the homepage breadcrumb block.                                                     
 System          1061  1061 - Update contrib entity view mode module to core version.                                   
 System          1062  1062 - Remove configuration settings that were never used.                                       
 Backup_migrate  1000  1000 - Update Backdrop to use existing variables stored in CMI                                   
 Backup_migrate  1004  1004 - Update all schedules to use the built in cron if none is specified.                       
 Backup_migrate  1005  1005 - Fix schema mismatch after upgrade.                                                        
 Block           1000  1000 - Block cache is always enabled in Backdrop.                                                
 Block           1001  1001 - Add a column for title to the block_custom table.                                         
 Block           1002  1002 - Remove the legacy block tables.                                                           
 Block           1003  1003 - Increase {block_custom}.title length to 255 characters.                                   
 Block           1004  1004 - Move individual blocks into config files.                                                 
 Bupdate         1000  1000 - Implements hook_update_N: Updates text formats to use Standard.                           
 Bupdate         1001  1001 - Implements hook_update_N: Updates all embedded image captions to use data  attributes.    
 Bupdate         1002  1002 - Implements hook_update_N: Splits content at teaserbreak into summaries.                   
 Color           1000  1000 - Convert color module settings to config files.                                            
 Comment         1000  1000 - Renames {comment}.language to {comment}.langcode.                                         
 Comment         1001  1001 - Move comment content type settings into configuration files.                              
 Comment         1002  1002 - Move comment variables to configuration files.                                            
 Comment         1003  1003 - Node type comment settings should be closed instead of hidden by default.                 
 Cumulus         1000  1000 - Delete unused variables. Convert necessary variables to config.                           
 Date            1000  1000 - Upgrade configuration from Drupal 7 Date module.                                          
 Date            1001  1001 - Remove legacy Date API, Date Views, and Date Popup configurations.                        
 Field           1000  1000 - Convert fields to configuration files.                                                    
 Field           1001  1001 - Add missing entity type and bundle information to Field config files.                     
 Field           1002  1002 - Grant the new "administer fields" permission to trusted users.                            
 File            1000  1000 - Add a view for managing files.                                                            
 Filter          1000  1000 - Convert filter formats to configuration.                                                  
 Filter          1001  1001 - Add a separate permission for image upload access.                                        
 Googleanalytic  1001  1001 - Move settings from variables to config.                                                   
 s                                                                                                                      
 Image           1000  1000 - Provide default image styles for the Image module.                                        
 Image           1001  1001 - Convert available database image styles to configuration files.                           
 Image           1002  1002 - Drop image tables that were converted to configuration files.   This update is separate   
                       from image_update_1001 so that other modules may read  the image style tables before they are    
                       dropped using  hook_update_dependencies() to come between these two updates.                     
 Image           1003  1003 - Add labels to all available styles.                                                       
 Image           1004  1004 - Update all image fields to use a static default image URI.                                
 Image           1005  1005 - Rename image config files.                                                                
 Image           1006  1006 - Add the configuration option for image_style_flood_limit.                                 
 Image           1007  1007 - Update from Image size to more specific Image dimensions.                                 
 Link            1000  1000 - Move link settings from variables to config.                                              
 Link            1001  1001 - Remove the Link config file. Link no longer has any config.                               
 Menu            1000  1000 - Moves menu settings from variables to config.                                             
 Menu            1001  1001 - Move menu content type settings into configuration files.                                 
 Menu            1002  1002 - Move individual menus into config files.                                                  
 Menu            1003  1003 - Delete primary and secondary menu settings.                                               
 Node            1000  1000 - Set 'node' as front page path if it implicitly was before.   Node module became optional. 
                       The default front page path was changed to  'user'. Since 'node' was the implicit default front  
                       page path previously and  may not have been explicitly configured as such, this update ensures   
                       that the  old implicit default is still the default.   @see http:drupal.orgnode375397            
 Node            1001  1001 - Rename node type language variable names.   @see http:drupal.orgnode540294                
 Node            1002  1002 - Rename node.language field to node.langcode.                                              
 Node            1003  1003 - Move theme settings to global site configuration.                                         
 Node            1004  1004 - Remove the block_node_type table, now stored in layout configuration files.               
 Node            1005  1005 - Convert content types to configuration files.                                             
 Node            1006  1006 - Delete the node_type table after conversions to configuration files.                      
 Node            1007  1007 - Convert variables to configuration.                                                       
 Node            1008  1008 - Create the view replacement for admincontentnode.                                         
 Node            1009  1009 - Update the language setting for all node types.                                           
 Node            1010  1010 - Set all nodes to be language agnostic on mono-lingual sites.                              
 Node            1011  1011 - Delete the node_type table if it still exists.                                            
 Node            1012  1012 - Rebuild node access to account for view unpublished.                                      
 Node            1013  1013 - Update the empty text, name, and menu link, for the admin content view.                   
 Nodequeue       1000  1000 - Convert variables to config.                                                              
 Path            1000  1000 - Upgrades Drupal 7 Pathauto variables to Path config.                                      
 Path            1001  1001 - Moves Backdrop Pathauto configuration to Path module configuration.                       
 Search          1000  1000 - Update search module to use the configuration system.                                     
 Taxonomy        1000  1000 - Remove the {taxonomy_vocabulary}.module field.                                            
 Taxonomy        1001  1001 - Convert taxonomy vocabularies to configuration.                                           
 Taxonomy        1002  1002 - Drop the old taxonomy vocabulary table.                                                   
 Taxonomy        1003  1003 - Create the taxonomy.settings config file.                                                 
 Taxonomy        1004  1004 - Convert taxonomy terms per page to config.                                                
 Text            1000  1000 - Delete teaser_length variable.                                                            
 Update          1000  1000 - Moves update settings from variables to config.                                           
 Update          1001  1001 - Add config default value for "update_not_implemented_url".                                
 Update          1002  1002 - Enable static caching for update settings configuration file.                             
 User            1000  1000 - The 'Member for' extra field has moved one level up in the array.                         
 User            1001  1001 - Grant "administer account settings" to roles with "administer users."                     
 User            1002  1002 - Remove the ability for users to select a theme.                                           
 User            1003  1003 - Moves account settings from variable to config.                                           
 User            1004  1004 - Moves login flood settings from variable to config.                                       
 User            1005  1005 - Moves user mail settings from variable to config.                                         
 User            1006  1006 - Moves user picture settings from variable to config.                                      
 User            1007  1007 - Convert user roles to configuration files.                                                
 User            1008  1008 - Update views that used the old role ID handlers to use role name instead.                 
 User            1009  1009 - Create the default view for user administration.                                          
 User            1010  1010 - Set default option for login method to use accounts only.                                 
 User            1011  1011 - Update 'People' menus to 'User accounts'.                                                 
 User            1012  1012 - Update 'Find user accounts' to 'Manage user accounts'                                     
 User            1013  1013 - Grant accounts with 'administer permissions' the new 'assign roles' permission.
Do you wish to run all pending updates? (y/n): y
Exception: The configuration directory in settings.php is specified as '../config/dev-active', but this directory is either empty or missing crucial files. Check that the $config_directories variable is correct in settings.php. in _backdrop_bootstrap_configuration() (line 2900 of /Users/jlampton/Sites/bollier/backdrop/docroot/core/includes/bootstrap.inc).
Drush command terminated abnormally due to an unrecoverable error.                                           [error]
Finished performing updates.

@serundeputy
Copy link
Member

@jenlampton can you disable the contrib modules and see if it is the same result? I see {Nodequeue, Backup_migrate, Googleanalytics} but there could be more.

The error does not seem like a contrib problem, but if we could at least eliminate that as a cause as that is a difference from your situation and mine.

@jenlampton
Copy link
Member Author

jenlampton commented May 7, 2017

@serundeputy do you know if drush logs it's "unrecoverable error"s? I'm thinking maybe the unrecoverable error is unrelated to the Exception it printed to the screen?

@serundeputy
Copy link
Member

serundeputy commented May 7, 2017

@jenlampton I think that error is coming from the backdrop api; so you might check dblog.

you might try drush updb -y -vvv as well for more verbose logging.

@jenlampton
Copy link
Member Author

I'm still having this same problem, and I have a copy of a database that won't update if that's helpful?

@serundeputy
Copy link
Member

@jenlampton send along the DB and i'll see what i can see. thanks.

@serundeputy
Copy link
Member

@jenlampton I just tested using drush updb from D7 to 1.9.x-dev and it worked.

Looking more closely at your error output:

Exception: The configuration directory in settings.php is specified as '../config/dev-active', but this directory is either empty or missing crucial files. Check that the $config_directories variable is correct in settings.php. in _backdrop_bootstrap_configuration() (line 2900 of /Users/jlampton/Sites/bollier/backdrop/docroot/core/includes/bootstrap.inc).
Drush command terminated abnormally due to an unrecoverable error.

Maybe try pointing that at a different config location?

@jenlampton
Copy link
Member Author

I've tried a few other databases and so far been unable to reproduce this issue. Closing.

@jenlampton
Copy link
Member Author

jenlampton commented Mar 26, 2018

Well, this error reappeared for me today, so re-opening :/ The site I'm working on is also a D6->D7->B upgrade.

Maybe try pointing that at a different config location?

The config location should be irrelevant. Updating from Drupal 7 should always start with an empty config directory, as those files are created by the update.

I wonder if this has something to do with the order the updates are executing in. For example, if an update fires that depends on config, before the config has been generated that would be a problem.

It's strange that when the updates are completed via the Backdrop UI this is not a problem. I wonder if Drush attempts to run updates in a threaded fashion, where the UI maybe doesn't? Or maybe in a different order?

@jenlampton jenlampton reopened this Mar 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants