Skip to content

Installation and Setup

Elda Schaffield edited this page Mar 2, 2026 · 8 revisions

Installation and Setup

This guide covers installing, configuring, and maintaining the Digital Asset Inventory module.

Note: Running scans and managing archives are permission-based tasks. Any user with the appropriate permissions can perform these tasks. See Scanning & Inventory for scanning and Archival Management for archiving.


Table of Contents


Installation

Installing the Module

drush en digital_asset_inventory -y
drush cr

The module automatically installs these dependencies:

  • views_data_export - CSV export functionality
  • csv_serialization - CSV format support
  • better_exposed_filters - Enhanced filter UI

Uninstalling the Module

All data is cleaned up automatically — no manual steps required.

From the admin UI:

  1. Go to Extend > Uninstall (/admin/modules/uninstall)
  2. Check Digital Asset Inventory
  3. Click Uninstall and confirm

Using Drush:

drush pm:uninstall digital_asset_inventory -y
drush cr

Warning: This permanently deletes all inventory and archive data. Export archive CSV reports before uninstalling if you need to retain records.


Module Settings

Navigate to: /admin/config/accessibility/digital-asset-inventory

Or: Configuration > Accessibility > Digital Asset Inventory

Available Settings

Setting Description Default
Scan Excluded Directories Additional directories to skip during scanning None
Enable Archive Functionality Turn on/off archive features (archiving requires a completed scan) Disabled
Enable Manual Archive Entries Allow adding URLs/pages to archive Disabled
Allow Archive In Use Allow archiving documents still referenced by content Disabled
Show Archived Label Display a label on links to archived content Enabled
Archived Label Text Text shown in the archived label (e.g., "(Archived)") Archived
ADA Compliance Deadline Date for Legacy vs General classification April 24, 2026

Archive Feature Toggle

The archive feature is disabled by default for phased rollout.

When enabled:

  • Archive Management menu link appears
  • "Queue for Archive" buttons appear in inventory
  • Public Archive Registry is accessible

When disabled:

  • All archive routes return 403 (Access Denied)
  • Archive menu links are hidden
  • Existing archive records are preserved (not deleted)

ADA Compliance Deadline

This date determines archive classification:

  • Before deadline: Legacy Archive (ADA exempt if unmodified)
  • After deadline: General Archive (no exemption)

Important: Changing the deadline only affects new archives. Existing archives keep their original classification.

Manual Archive Entries

When enabled, allows adding web pages and external URLs directly to the archive without going through the scanner.

Allow Archive In Use

By default, documents must be removed from all content before they can be archived. This setting changes that behavior.

When enabled:

  • Documents and videos can be archived while still referenced by active content
  • Links throughout the site are automatically routed to the Archive Detail Page
  • Link text shows "(Archived)" so visitors know before clicking
  • The archive record tracks that the item was "archived while in use"

When disabled (default):

  • Documents must have no active references before archiving
  • Users must remove links from content, run a scan, then archive

Use cases for enabling:

  • Large sites where removing all references is impractical
  • Content that must be archived quickly for compliance
  • Situations where you want the archive information page shown instead of direct downloads

Important: This setting only affects documents and videos. Images cannot be archived while in use (would break page layouts).


Managing Permissions

Available Permissions

Permission Description
View digital asset inventory Browse the inventory page
Scan digital assets Run the asset scanner
Delete digital assets Delete assets from inventory
Archive digital assets Manage archive records
Administer digital assets Full access including settings

Recommended Role Assignments

Role Recommended Permissions
Site Editor View, Scan
Site Manager View, Scan, Delete
Accessibility Staff View, Scan, Archive
Site Administrator All permissions

Digital Asset Manager Role (Optional)

The module provides an optional pre-configured role in config/optional/:

  • View digital asset inventory
  • Scan digital assets
  • Delete digital assets
  • Archive digital assets

This role does not include settings configuration access.


Maintenance

Resetting Inventory Data

To completely reset the inventory, uninstall and reinstall:

  1. Uninstall the module (see Uninstalling the Module)
  2. Re-enable the module from Extend or with drush en digital_asset_inventory -y
  3. Run a fresh scan from the inventory page

Warning: This removes all archive history and audit trails. Export archive CSV reports before resetting if you need to retain records.

Updating the Module

After updating:

drush updb -y
drush cr

Re-scan if the changelog mentions scanner improvements.

Note for sites deployed before v1.0 hook reset: All 63 pre-release update hooks were removed in v1.0. hook_update_last_removed() handles this automatically — sites already at schema version 10068 need no action. Sites at an earlier version will see a Drupal error directing them to update to a version with the original hooks first, or uninstall and reinstall (scan-only sites lose no permanent data; re-scan after reinstall).


Technical Notes

Database Tables

The module creates five custom entity tables:

  • digital_asset_item - Asset metadata
  • digital_asset_usage - Usage tracking
  • dai_orphan_reference - Orphan reference tracking
  • digital_asset_archive - Archive records
  • dai_archive_note - Internal notes

Key Routes

Path Purpose
/admin/digital-asset-inventory Main inventory (tab)
/admin/digital-asset-inventory/dashboard Dashboard (tab)
/admin/digital-asset-inventory/archive Archive management (tab)
/admin/digital-asset-inventory/scan Scan form
/admin/digital-asset-inventory/archive/{id}/notes Internal notes
/admin/config/accessibility/digital-asset-inventory Settings
/archive-registry Public Archive Registry

Cron Tasks

Large files (over 50MB) have checksums calculated by cron. Ensure cron runs regularly for complete archive integrity verification.