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.

CommentFileSizeAuthor
#4 checklistapi-3042638-4.patch657 bytesTravisCarden
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ccshannon created an issue. See original summary.

ccshannon’s picture

Issue summary: View changes
ccshannon’s picture

 $saved_progress = $old_config_storage->setChecklistId($checklist_id)
    ->getSavedProgress();

This statement returns NULL and should be converted to an empty array in that instance.

TravisCarden’s picture

Status: Active » Needs review
FileSize
657 bytes

Thank 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.

ccshannon’s picture

Thanks, @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! :)

TravisCarden’s picture

Status: Needs review » Fixed

Great. Thanks for testing, @ccshannon! Committed.

  • TravisCarden committed 1cfbd85 on 8.x-1.x
    Issue #3042638 by TravisCarden: Update 8101 causes unrecoverable error,...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.