Part of the Dkan ecosystem · 13 projects
INTRODUCTION
Separate form to add a distribution to an existing DKAN dataset.
In DKAN, datasets and distributions are both data nodes, told apart by field_data_type. Adding a distribution normally means editing the whole dataset. This module provides a form that only shows the distribution fields and a select field to choose the dataset.
Features
- Form at
/node/add-distributionwith the distribution fields of the dataset JSON form (including file upload or link for the download URL) and a select field for the dataset. - Preselect a dataset with
?dataset=<dataset identifier>, e.g. to link to the form from a dataset page. - "Add distribution" button on the DKAN datasets list (
/admin/dkan/datasets) and a menu link under DKAN > Datasets. - The dataset including the new distribution is validated against the dataset schema before it is saved. Validation errors are shown on the form.
- Uses Select2 for the dataset field if the module is installed.
How it works
The form doesn't create the distribution node itself. It appends the new distribution to the distribution property of the dataset and saves the dataset through the DKAN metastore (MetastoreService::patch()). DKAN then creates the distribution node and registers the file, as it does when a dataset is saved with the normal form.
The fields come from the distribution schema, the widgets from the distribution items in dataset.ui, so the form looks like the distribution part of the dataset form. Empty sub-objects that only contain their type (e.g. {"type": "foaf:page"} from schema defaults) are removed before saving.
REQUIREMENTS
- DKAN (dkan_metastore)
- JSON Form widget
INSTALLATION
Install as you would normally install a contributed Drupal module. See: https://www.drupal.org/node/895232 for further information.
CONFIGURATION
Grant the permission "Add distribution to dataset" to the roles that should use the form. Users also need access to the datasets they want to choose.
MAINTAINERS
Current maintainers:
- Stefan Korn (stefan.korn) - https://www.drupal.org/u/stefan.korn
Ask your assistant about DKAN Add Distribution
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
More in the Dkan ecosystem
Most installed first
Activity
Releases
| Version | Type | Core | PHP | Release date | |
|---|---|---|---|---|---|
| 1.0.x-dev | Dev | 10–11 | Oct 23, 2026 |