Computed fields should not be embeddable fields or source suggestions

Created on 30 November 2023, 7 months ago
Updated 14 May 2024, about 1 month ago

Problem/Motivation

Computed entity reference fields are not editable so they should not be provided as embeddable fields or source suggestions.

Steps to reproduce

  • Implement a hook_entity_base_field_info() and add an entity_reference computed field for the node entity type. Example: related nodes.
  • Create a node.
  • Create a translation job for the node
  • Bug: The computed fields will be available under the "Suggestions"
  • Expected: The computed fields should not show under the "Suggestions"

Proposed resolution

  • Update Drupal\tmgmt_content\Plugin\tmgmt\Source\ContentEntitySource::getEmbeddableFields() to exclude computed fields.
  • Update tmgmt_content_tmgmt_source_suggestions to exclude computed fields.
πŸ› Bug report
Status

Needs work

Version

1.0

Component

Source: Entity

Created by

πŸ‡ΊπŸ‡ΈUnited States recrit

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

Comments & Activities

Production build 0.69.0 2024