Compatibility and limits¶
Design limits¶
| Capability | Supported scope |
|---|---|
| Outer cardinality | One, a finite number, or unlimited compound items. |
| Sub-field cardinality | A finite cap of at least one. Each slot is a set of database columns. |
| Nesting | Compounds can contain other compounds. Cycles, and schemas beyond the column budget, are refused. |
| Composition | A compound can include another compound's sub-fields, through its Composition tab or the includes configuration key. |
| Translation and revisions | Values follow the host. A compound item has an identity of its own but no revision or translation table of its own. See translation and moderation. |
| Sub-field configuration | Each sub-field is ordinary field configuration on the compound's own entity type, edited under Structure → Compound fields → ‹compound› → Manage fields. It exports, diffs and carries other modules' settings like any field. See compound items as entities. |
Compound Field uses the field types your installed modules provide. See field types for the chooser and the measured matrix.
Changes can remove history¶
Removing a populated sub-field or lowering its cap drops columns from the current and historical revision tables, across every field using the compound. The UI requires explicit consent, and reverting a content revision cannot recover dropped columns. Keep a database backup and follow the removal tutorial or the deployment guide.
Deleting a host field leaves data awaiting purge, and the compound must stay installed until purge finishes. Remove a compound in order.
Modules¶
This lists only the modules that were explicitly tested, and what to watch out for with each. An unlisted module is not unsupported: Compound Field uses Drupal's ordinary field, entity and form APIs, so a module that works with normal fields has no particular reason to break. "Host" means the node or other entity the compound field is attached to.
Tested on every change. These are covered by the module's automated checks.
| Module | Works | Watch out for |
|---|---|---|
| Field UI (core) | Sub-fields are managed on their own screens under /admin/structure/compound-field/<id>/: fields, form display, display. |
Modules that add settings to a field's edit form add them to a sub-field's edit form too, and store them there. |
| Views (core) | Sub-fields can be fields, filters, sorts, arguments and relationships. Nested compounds work. | Pick the sub-field, not its raw database column, if you want the formatter output. |
| JSON:API, REST (core) | The host's compound field reads and writes as nested JSON. See the wire format. | Compound items have no endpoint of their own. |
| Content Translation (core) | Sub-fields can be translated or shared between translations. | Translation settings live on the host field, not on the sub-field. See translation and moderation. |
| Content Moderation (core) | Drafts, pending revisions and reverts work. | Compound values are part of the host's revision. There is no separate revision history per compound item. |
| Media Library (core) | The Media Library widget works on a media sub-field, including one with several slots inside a compound with several items. | — |
| Layout Builder (core) | The whole compound can be placed as a block. Individual sub-fields can be placed with the compound_field_layout_builder module. |
Sub-field blocks use the compound's display settings, not the host's per-field overrides. There is no layout editor inside a compound. |
| Canvas 1.12 | A content template can link a component prop to any sub-field of a single-value compound field. See lay out a page with Canvas. | With PHP assertions on, Canvas 1.12 needs a patch before a sub-field can be linked. A component cannot take a whole compound item as one object prop. |
| Migrate (core) | A process plugin imports the nested shape. See core Migrate. | — |
| Token 1.17 | Sub-field values are available as tokens, for example [node:field_sessions:0:title:value]. |
— |
| Search API 1.41 | Sub-fields can be indexed from the host's index. | A compound with several items indexes all of them together. Search cannot tell which values came from the same item. |
| Entity Usage 2.2 | References made from sub-fields are tracked against the host. | — |
| Address 2.0 | Address sub-fields, with their widgets and formatters. | — |
| Entity Reference Revisions 1.14, Paragraphs 1.23 | Paragraph references as sub-fields. A converter moves a paragraphs field into a compound. | Deleting content can leave orphaned paragraphs behind: the Paragraphs purger does not recognise a compound as their parent, so they accumulate. Weigh that storage cost when choosing revision references. |
| Custom Field 5.0 | A converter moves a Custom Field into a compound. | — |
| GraphQL Compose 2.4 | Compound fields and their sub-fields are in the schema, through the Compound Field GraphQL Compose sub-module, as one type per compound configured on GraphQL Compose's schema form. See GraphQL Compose. | Ship graphql_compose.settings with a structural change. A viewfield sub-field in reference mode makes responses uncacheable; use embedded mode. |
| File, Image (core) | File and image sub-fields, with uploads. | Two items with an empty image or file sub-field render the same upload input name. With JavaScript on, uploads land on the right item. With JavaScript off, submitting uploads for two items at once keeps only one. |
Link, Text, Options, Datetime, Datetime Range and Telephone are also covered and add nothing to watch out for.
Checked once by hand. These were set up through their own admin screens on a scratch site, on the version shown, and the result written down. That is a snapshot, not a guarantee, and nothing re-checks it.
| Module | Version | Result | Watch out for |
|---|---|---|---|
| Entity Browser | 2.17.0 | Works. A selection made in the second item stays in the second item through AJAX, reordering and saving. | — |
| Inline Entity Form | 3.0.0 | Works. Creating a child from inside the second item attaches it to the second item. | — |
| AI: Field Widget Actions, AI Automators | 1.4.9 | Works. The action button on the second item acts on the second item. The queued automator fills that item only. | The button's AJAX response is placed in the first item's widget, because the module keys it on the field name. Enabling an automator adds a required "AI Automator Status" sub-field to the compound; a newly added item needs a status before the host can save. |
| Entity Reference Integrity | 2.0.1 | Works. A term referenced from a sub-field cannot be deleted while enforcement is on. | — |
| Field Validation | 3.0.0-rc2 | Works. A rule on a sub-field reports its error on the right item. | — |
| Geocoder, Geofield | 4.35.0, 10.3.4 | Works. Geocoding an address sub-field fills the geofield sub-field of the same item. | — |
| Field Permissions | 1.5.0 | Custom permissions work per sub-field. | The Private setting does not work: it shows the sub-field to everyone, because a compound item has no owner. |
| Field Encrypt | 4.1.0 | Does not work. A sub-field cannot be encrypted. Nothing is lost: the value stays plain. | Ticking "Encrypt field" on a sub-field saves without complaint and does nothing. The refusal shows up later, on the next save that Field Encrypt reacts to. |
| Field Group | 3.6.0 | Groups on the host's form display work around the compound. | Groups on the compound's own form display have no effect. |
| Conditional Fields | 4.0.0-alpha6 | Conditions on the host's form display work on the compound as a whole. | Conditions on the compound's own form display have no effect. |
| Diff | 2.1.1 | Comparing revisions works for the host's other fields. | The field-by-field layouts skip the compound field. Only the "Visual inline" layout shows it. |
| Feeds | 3.2.0 | Importing the host's other fields works. | There is no mapping target for a compound or a sub-field. |
| GraphQL Compose 3.x | 3.0.0-alpha4 | The host's other fields work. | The compound is not in the schema: the sub-module supports GraphQL Compose 2.x only. Support for 3.x is planned. |
| Metatag | 2.2.0 | Works with host tokens. | Sub-field tokens also work; they come from Compound Field, not from Metatag. |
Diff, Feeds, GraphQL Compose 3.x and Metatag share one limit: they look at
the host's fields by field type, see one field of type compound_field:<id>,
and do not know what is inside. Only a plugin for that field type can add
support for it, as the GraphQL Compose sub-module does for 2.x. The
reasons behind each "watch out for" are on
compound items as entities.
Release status¶
Compound Field is pre-alpha; see the warning on the home page.