Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Can someone explain how to get Lightning updated? I am not sure I'm doing this right.
I've installed Lightning from BLT about four months ago. Tonight I did "composer update" but I get the following error output:
- Applying patches for drupal/core
https://www.drupal.org/files/issues/2752961-90.patch (Clear Twig caches on deploys)
https://www.drupal.org/files/issues/1356276-408--8.4.x.patch (1356276 - Allow profiles to provide a base/parent profile and load them in the correct order)
Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/1356276-408--8.4.x.patch
https://www.drupal.org/files/issues/2880374-remove-experimental-warnings-6.patch (2880374 - Experimental modules should not have warnings after being installed)
https://www.drupal.org/files/issues/2880445-remove-config-write-warning-2.patch (2880445 - Config sync should not throw a warning when not being writable)
Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2880445-remove-config-write-warning-2.patch
Comments
Comment #2
kevinquillen CreditAttribution: kevinquillen at Velir commentedComment #3
balsamaHi. It looks like the version of core you're getting is incompatible with the version of Lightning. This is usually a result of core updating, but not Lightning.
The latest version of Lightning is 3.0.1. It's possible (likely) that you're constrained to the 2.x branch. If you change your Lightning constraint to:
acquia/lightning:~3.0.1
...and run composer update, that will pull in core 8.4.4 with the correct patches. You might need to run update twice since the new version of Lightning will define new patches for some of its dependencies.
Comment #4
kevinquillen CreditAttribution: kevinquillen at Velir commentedWhen I try that, I get this:
Comment #5
balsamaIt looks like you have a requirement on dropzonejs that's incompatible with lightning_media. If I had to guess, I'd say that you probably have a requirement on the 1.x branch of dropzonejs. The 2.x branch (which Lightning >= 2.2.4 requires) has some changes to support core media.
Comment #6
kevinquillen CreditAttribution: kevinquillen at Velir commentedInteresting, looks like at some point someone added dropzonejs after the fact. I removed it via Composer since it is listed in Lightning. Now I get this:
But this is not listed as a dependency in my composer.json.
So what I tried then was:
Then I ran
drush updb
. No errors.I should probably nuke this branch and start again clean just to ensure it worked fine.
Comment #7
kevinquillen CreditAttribution: kevinquillen at Velir commentedHow do you clean up errors like this?
Comment #8
balsamaUgh. Those dependencies on the HEAD of media_entity_image and media_entity_document are a workaround to a dependency issue in those packages. You should be able to get it to work though. I think the commands you posted above are actually reversed. You would need::
A couple other thoughts:
Comment #9
kevinquillen CreditAttribution: kevinquillen at Velir commentedWe started with 2.2.3, do we need to run any media migration?
Comment #10
balsama> We started with 2.2.3, do we need to run any media migration?
Nope! You should be good. You _will_ need to trigger the migration to Content Moderation and Workflows. See the 2.2.4 update instructions for more information: https://github.com/acquia/lightning/releases/tag/2.2.4
And you'll actually need to do that before updating to 3.0.1 because 3.0.1 doesn't have the Scheduled Update module (which is disabled as part of the 2.2.4 update).
Comment #11
kevinquillen CreditAttribution: kevinquillen at Velir commentedWhat if we haven't used Workflow or Content Moderation yet?
Comment #12
balsamaYou still need to run the updates to convert Lightning's configuration even if you haven't done anything with it. (Unless you have it completely excluded and uninstalled with a sub-profile).
Comment #13
kevinquillen CreditAttribution: kevinquillen at Velir commentedAlright, thanks.
edit:
So I should not just jump right to 3.0.1? I did that and had to manually remove lightning_scheduled_updates from config and the database since it went missing - it never got used.
Comment #14
balsamaI would recommend updating to 2.2.7 first... just so you can be sure that the migrations went ok. As an alternative, you could add a stub lightning_scheduled_updates module to your codebase and uninstall it, or do as you said. But that's not foolproof.
Comment #15
phenaproximaLightning 2.x is no longer maintained, so I'm closing this issue.