πŸ‡ΊπŸ‡ΈUnited States @coderdan

Account created on 19 April 2009, almost 16 years ago
#

Recent comments

πŸ‡ΊπŸ‡ΈUnited States coderdan

Thanks - is there any way we can present this with a checkboxes instead of a text field?

Possibly, though with checkboxes for each field that could become a UX concern with many fields. But to your point there is likely room for improving both the UX and the validation of the new form element.

πŸ‡ΊπŸ‡ΈUnited States coderdan

Updating patch to correct missing use statement for FormStateInterface.

πŸ‡ΊπŸ‡ΈUnited States coderdan

Here is a patch which adds an option to the Views argument to exclude field names from the argument's subquery.

πŸ‡ΊπŸ‡ΈUnited States coderdan

Removed unnecessary word.

πŸ‡ΊπŸ‡ΈUnited States coderdan

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.

πŸ‡ΊπŸ‡ΈUnited States coderdan

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.

πŸ‡ΊπŸ‡ΈUnited States coderdan

Attaching patch for convenience/composer purposes.

πŸ‡ΊπŸ‡ΈUnited States coderdan

This patch is working for us, thank you.

πŸ‡ΊπŸ‡Έ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

To reproduce the issue:

  1. Perform a fresh install of Drupal 9 using standard install profile
  2. Install the latest version entity_reference_hierarchy
  3. Visit /admin/structure/types/manage/article/fields/add-field
  4. 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.

πŸ‡ΊπŸ‡ΈUnited States coderdan

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.

Production build 0.71.5 2024