Problem/Motivation
I am seeing this fatal error on trying to save a dataset that is missing some info like a distribution or resource
The website encountered an unexpected error. Try again later.
TypeError: Drupal\dkan_dataset_archiver\Service\ArchiveService::prepMultiValueFileFieldForStorage(): Argument #3 ($values) must be of type array, null given, called in /var/www/html/docroot/modules/contrib/dkan_dataset_archiver/src/Service/ArchiveService.php on line 964 in Drupal\dkan_dataset_archiver\Service\ArchiveService->prepMultiValueFileFieldForStorage() (line 1021 of modules/contrib/dkan_dataset_archiver/src/Service/ArchiveService.php).
Drupal\dkan_dataset_archiver\Service\ArchiveService->createIndividualArchive() (Line: 139)
Drupal\dkan_dataset_archiver\EventSubscriber\Subscriber->createIndividualArchive()
call_user_func() (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 189)Acceptance Criteria
Testing steps
Issue fork dkan_dataset_archiver-3565757
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
swirtThis has been resolved.
Comment #6
swirtThis fix went out with https://www.drupal.org/project/dkan_dataset_archiver/releases/1.0.0-beta12
It basically defends against failure if it encounters a dataset that has no distribution.