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.
Latest update throws error, crashes database updates. Don't know if anyone else has experienced this, as I could not find a comparable issue. If this is a duplicate, my apologies.
[notice] Update started: checklistapiexample_update_8101
[error] TypeError: Argument 1 passed to Drupal\checklistapi\Storage\StateStorage::setSavedProgress() must be of the type array, null given
...
web/modules/contrib/checklistapi/checklistapiexample/checklistapiexample.install on line 33 in web/modules/contrib/checklistapi/src/Storage/StateStorage.php on line 39
As I am only testing this module for a project, and not using it actively, I uninstalled checklistapi so I could complete other modules' database updates.
Comment | File | Size | Author |
---|---|---|---|
#4 | checklistapi-3042638-4.patch | 657 bytes | TravisCarden |
Comments
Comment #2
ccshannon CreditAttribution: ccshannon commentedComment #3
ccshannon CreditAttribution: ccshannon commentedThis statement returns NULL and should be converted to an empty array in that instance.
Comment #4
TravisCarden CreditAttribution: TravisCarden as a volunteer commentedThank you for the report, @ccshannon. I'm guessing you didn't have any saved progress on the example checklist at the time you ran database updates, resulting in a case I failed to guard against. I think the attached patch would solve the problem. Please let me know if you find otherwise.
Comment #5
ccshannon CreditAttribution: ccshannon commentedThanks, @TravisCarden!
I added the patch in #4. I re-imported the database with the old version enabled (the database that had no saved progress), re-ran updates, and works like a charm!
All good. Much appreciated! :)
Comment #6
TravisCarden CreditAttribution: TravisCarden as a volunteer commentedGreat. Thanks for testing, @ccshannon! Committed.