[PP-1] Don't export computed fields

Created on 1 July 2025, 6 days ago

Problem/Motivation

✨ Add a command-line utility to export content in YAML format Active adds a content entity export feature to core, for recipe development.

In keeping with the Default Content contrib module from which it takes inspiration, the exporter exports computed fields and properties. This has been identified multiple times as something that doesn't make a ton of sense, and should not happen.

Unfortunately, excluding computed fields has bigger implications -- path aliases are lost in the export, because although they are always computed fields backed by entities, they are not treated as normal entity references (because they aren't).

Proposed resolution

Don't export computed fields, and add special handling to ensure that path aliases are exported too. This might call for fully exporting the underlying path_alias entity, or maybe just special-casing path items to export them as well, even though they would not normally be.

πŸ“Œ Task
Status

Postponed

Version

11.0 πŸ”₯

Component

default content system

Created by

πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

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

Comments & Activities

  • Issue created by @phenaproxima
  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts
  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    Unless I'm missing something, we definitely cannot allow path_alias entities to be exported, at least not automatically. Why? Because the system path stored in the entity is going to include things like /node/3, which uses a non-portable serial ID.

    So that's a dead end.

    Therefore, I think the path field on entities needs to be exported as part of the entity. Since that is probably one of the only computed fields that needs to be exported with an entity -- if not the only such field, at least in core -- I would propose we add a normalizer specifically for this purpose to the path_alias module, which momentarily (non-persistently) marks the path field of an entity as being non-computed so it will be exported.

Production build 0.71.5 2024