Skip to content

Field type compatibility

Compound Field delegates to each sub-field's field-type plugin. The table below compares a one-sub-compound field with a standalone field using the same settings and sample value. PASS means parity for saved values, validation violation counts, formatter text and images, and the projected item-list class.

Each row measures one value at sub-field cardinality 1. It does not establish widget support or cover every setting, value or multi-value case. Separate tests cover capped sub-fields, nesting and Media Library widgets.

The matrix

List class indicates whether the type declares its own item-list class. Own generator uses the type's generateSampleValue(); Harness-supplied uses test data because the type has no generator. The Address sample leaves some columns unset to check NULL preservation.

Field type Provider List class Sample Verdict Notes
boolean core no Own generator PASS
decimal core no Own generator PASS
email core no Own generator PASS
integer core no Own generator PASS
string core no Own generator PASS
string_long core no Own generator PASS
telephone telephone no Own generator PASS
timestamp core no Own generator PASS
link link no Own generator PASS
text text yes Own generator PASS
text_long text yes Own generator PASS
text_with_summary text yes Own generator PASS
list_string options no Own generator PASS
list_integer options no Own generator PASS
datetime datetime yes Own generator PASS
daterange datetime_range yes Own generator PASS
entity_reference core yes Own generator PASS
file file yes Own generator PASS
image image yes Own generator PASS
address address yes Harness-supplied PASS
address_country address no Harness-supplied PASS
address_zone address yes Harness-supplied PASS
entity_reference_revisions entity_reference_revisions yes Own generator PASS Measured where Paragraphs is installed, on the plain host and on a translatable, moderated entity_test_mulrevpub — see below

CompoundFieldTypeMatrixTest::thePublishedMatrixMatchesTheHarness() checks this block against ::typeMatrix(). Change the test data to add a row. Optional module rows skip when their dependencies are absent; a skip is not a pass.

Generated content

Compound Field supplies sample-value fallbacks for address, address_country and address_zone, including restricted country lists. The matrix still uses its own samples to test those types independently of the fallback.

When a reference generator returns an unsaved entity, Compound Field uses an existing target where possible, or saves the placeholder if the bundle allows it. If a type cannot resolve, has no usable generator or fallback, or throws while generating, Compound Field omits that sub-field and logs a warning on the compound_field channel. Generated hosts can therefore fail required-field validation.

Paragraphs and revision references

The entity_reference_revisions row requires Entity Reference Revisions and Paragraphs. Measurements used versions 1.14 and 1.23. It covers both a plain host and a translatable, moderated host. Dedicated tests also check child revision forking and change detection. See Translation and moderation.

Paragraph parent metadata identifies the outermost host and its compound field. It does not identify the sub-field slot. getParentEntity() resolves the host, but loading its compound field returns compound items, not the paragraph.

Orphaned paragraphs reach the purge queue, but the upstream purger cannot recognize the compound's flattened revision-reference columns. It skips deletion, so orphaned children accumulate. CompoundFieldOrphanPurgeGroup (run by CompoundFieldRevisionableHostTest) records this limitation. Changing a revision-reference sub-field's target_type while its compound is in use is refused because existing IDs would change meaning.

Coverage limits

  • Nested compound_field:* types have dedicated tests. Nesting permits any acyclic depth and rejects cycles and unknown types.
  • Media Library has functional and browser tests, including nested capped selections. The matrix's entity_reference row targets taxonomy terms.
  • comment is untested here because its bundle and host requirements exceed the matrix fixture.
  • geofield and office_hours are untested. Add coverage when a defect or a field-type behavior not already represented justifies their dependencies.

Per-field contrib features

A passing field type does not establish support for another module's per-field settings. Compatibility depends on how that module stores and reads its configuration.

Integration Support
Field configuration form alters Sub-fields expose runtime FieldConfigInterface objects, so form alters run. Settings must fit the owning compound. Modules that load separate field.field.* configuration by name need adaptation.
Widget and formatter display-component settings Core's display forms invoke the hooks, and delegated plugins receive the stored settings.
Widget form alters Core invokes complete-form and single-element alters for delegated sub-widgets.

A settings control can appear yet fail at runtime if its module later loads a separate FieldConfig-backed object. This affects integrations such as ai_automators with field_widget_actions. By contrast, nomarkup works through display-component settings. Test the complete workflow before relying on a contrib integration.