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

Command icon 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

swirt created an issue. See original summary.

  • swirt committed 58d35383 on 1.0.x
    #3565757 prevent attempt to archive a dataset with no distribution.
    
swirt’s picture

Status: Active » Fixed

This has been resolved.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

swirt’s picture

Status: Fixed » Closed (fixed)

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