Thanks @jurgenhaas! I tested this on both a fresh D10 site with version 2.0 of ECA, and a production site using 1.1.5.
coderdan β created an issue.
coderdan β created an issue.
The patch in #2 prevents targeting elements outside of the time_wrapper sub-element, such as the 'make recurring' checkbox. This patch should solve for that by removing the time_wrapper as the sole parent for all elements.
coderdan β created an issue.
Attaching patch for convenience/composer purposes.
This patch is working for us, thank you.
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.
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 β created an issue.
Adding a patch which builds on asherry's solution to include tests.
Regarding refactoring (ie: comment #7). While I agree a refactor is in order here, it is my opinion that this would be somewhat dangerous to do given the existing lack of test coverage. I would propose working on tests first before refactoring takes place.