Adding a new column/sub-field of type entity_reference

Created on 21 July 2024, 5 months ago

Problem/Motivation

I have successfully added new columns (sub-field) to a custom field using the provided PHP code in the documentation, but when trying to add an entity_reference column I get this error

>  [warning] Undefined array key "target_type" EntityReference.php:33
>  [error]  Field 'xxxx' references a target entity type '' which does not exist.

In my case the entity_reference is towards a taxonomy_term, I tried to add
'target_type' => 'taxonomy_term'
to the array of $options parameters but nothing changes.

What is the syntax to add an entity_reference column?
thanks

💬 Support request
Status

Active

Version

3.0

Component

Documentation

Created by

🇮🇹Italy giuse69

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024