- ๐บ๐ธUnited States coderdan
To reproduce the issue:
- Perform a fresh install of Drupal 9 using standard install profile
- Install the latest version entity_reference_hierarchy
- Visit /admin/structure/types/manage/article/fields/add-field
- In the 'Add new field' select list, under the 'Reference' section, see that there are two entries for 'Content', 'Taxonomy term', and 'User' entity types.
- @coderdan opened merge request.
- Status changed to Needs review
over 1 year ago 5:35pm 15 August 2023 - ๐บ๐ธUnited States coderdan
This issue is stemming from the core change that introduced "preconfigured fields" back in D8. See https://www.drupal.org/project/drupal/issues/2446511 โ .
Since ERwH is dependent on entity_reference_revisions, but not overriding the getPreconfiguredOptions() method, ERwH is picking up the preconfigured field settings from ERR, which cause these "duplicate" fields.
- ๐บ๐ธUnited States coderdan
Attaching patch for convenience/composer purposes.
Thanks @coderdan.
Using D9.5.11 with entity_reference_hierarchy 1.0 beta3:
at first glance this patch seems to work with no side effects.Will report back if I find any issues.
J.