Convert default content to YAML format

Created on 26 May 2021, over 3 years ago
Updated 7 September 2023, about 1 year ago

Problem/Motivation

At the moment default content is exported in the JSON format. It is very verbose and hard to read and modify by a human.

Proposed resolution

Default Content module uses YAML by default since version 2. Let's use it. Some of the benefits are:

  • A more compact YAML-based normalization format
  • Identifiers like ID, revision id, changed and revision timestamps and other fields are no longer exported
  • Built-in support for composite entities like paragraphs in a single file
  • User 0/1 are no longer exported but referenced by ID
  • Support for translations
  • Support for files (stored as files in the same folder as the normalized file enitties, filename must be unique)
  • Support for entity references in link fields
  • Improved support for path fields including the pathauto skip flag

Remaining tasks

  • Add missing content UUIDs to sector_default_content.info.yml - Done
  • Replace code created users with export by adding UUIDs to to sector_default_content.info.yml - Done
  • Replace all local IDs used in code/configuration with local ID resolved based on UUIDs - example block.block.contentfield_8.yml references term ID 4
  • Run drush default-content:export-module sector_default_content - Done
  • Remove old JSON files - Done
  • Commit new YAML files and real files added to modules/sector_default_content/content/file - Done
  • Blocked by 🐛 Store UUID for exportability Fixed ?
📌 Task
Status

Closed: duplicate

Version

9.3

Component

Code

Created by

🇳🇿New Zealand RoSk0 Wellington

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024