Skip to content

Instantly share code, notes, and snippets.

@AllieRays
Last active December 21, 2018 14:55
Show Gist options
  • Save AllieRays/fd5ee9b3a2cea32af395c25a393d3687 to your computer and use it in GitHub Desktop.
Save AllieRays/fd5ee9b3a2cea32af395c25a393d3687 to your computer and use it in GitHub Desktop.
Upgrading Drupal Core 8.6, BLT, 9.2.2 and Lightning 3.2.3

Upgrading Drupal Core 8.6, BLT, 9.2.2 and Lightning 3.2.3

() Review outdated dependencies

composer outdate

or review /admin/reports/updates

Before you Start

  • Your project composer.json should not manage drush or drupal. BLT and lightining will do that in their respective composer.lock files

  • If you have scheduled_updates installed uninstall it. Export your configurationn and then do the lightning update.

  • Update any composer packages in your composer.json file . Remove composer dependencies we are not using.

  • Note, if you are using Lightning you should not refer to Drupal core in your project root composer.json file. The lightning profile will manage this dependency for you.

"acquia/blt": "^9.2.2",
"acquia/lightning": "~3.2.3",
  • Clear your composer cache, remove your vendor directory. Since we are also updating Drupal core remove Drupal core. Then run composer update
composer clear-cache
export COMPOSER_PROCESS_TIMEOUT=2000
rm -rf vendor
rm -rf core
rm -rf composer.lock
composer self-update
composer update
$ drush cache:rebuild
$ drush updatedb
$ drush cache:rebuild
$ drush update:lightning
  • check all packages and patches are still current
  • confirm site works as expected with all new updates

Don't forget to export your configuration
drush cex (if this is how you manage your configuration)

You will probably have to export your configuration and then rebuild your database and lightning updates more than once.

Check all the things again. Status dashboard

blt setup 
drush aliases 

Note about blt sync:refresh

Due to different versions of drush you might run into issues with blt sync:refresh.
You can not run/sync an older version of Drush on ACE than you can on your local.
You will need to push the code with the new version of drush in order to be able to use BLT/drush to pull your database.
If you want to double check your database updates locally you should manually pull down a database and test with.

drush sql-drop
drush sql-cli < db-from-ace.sql

Resources

https://www.drupal.org/project/lightning/releases/8.x-3.202


Issues you might run into

scheudled_updates

Try to remove any reference to scheudled updates in your composer.json file and config. If you are still having issues you might have to manually add it back into composer.json. I was still getting the error of The "scheduled_updates" entity type does not exist. I had to add scheduled updates back into composer.json.

"drupal/scheduled_updates": "^1.0@alpha",

workbench_moderation

Since content moderation was added to drupal core replacing workbench moderation the update path is troublesome. I was getting the issue of The "moderation_state" entity type does not exist. I added workbench back into composer.json. I did this so I could complete the core and lightning upgrade.

"drupal/workbench_moderation": "^1.4",

lightning_scheduled_updates

Trying to force remove lightning sheduled updates was proving to be troublesome, therefore I ran a direct query against the database.

drush sql-query "DELETE FROM key_value WHERE collection='system.schema' AND name='lightning_scheduled_updates';"

Outdated BLT factory Hooks

  • You need to manually remove any factory hooks created by BLT for acsf
rm -rf factory-hooks

Sub Profiles

"The Profile Array does not exist": "https://www.drupal.org/files/issues/2018-10-30/drupal-3009548-profile_array_not_exit_2.patch"

If you are still having troubles you might need to do some things manually.

  • Fix subprofile syntax for [sub_profile_name].info file.
base profile: lightning
exclude:
  - lightning_workflow
  - lightning_scheduler

Updating Drush

If you have an older version of drush running in your cloud environment you should take a backup the database and pull it down locally so you can have something to revert back to if things go wrong without going through the whole process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment