backdrop-contrib / entity_plus

This module wraps in a variety of additional entity-related functionality from various sources. Partial port of D7 Entity API.
https://backdropcms.org/project/entity_plus
GNU General Public License v2.0
3 stars 11 forks source link

taxonomy_term's property `vocabulary` must be a required property #171

Closed argiepiano closed 7 months ago

argiepiano commented 7 months ago

A year or two ago, when I added a special wrapper for Vocabularies (since they are not entities in Backdrop, like they were in Drupal 7), I missed a single line for the taxonomy_term's vocabulary property info: 'required' => TRUE.

This omission causes Rules not to show the vocabulary selection form element for the action "Create a new Entity". See Rules' issue 210.

BTW, In D7, the vocabulary property is required, and it also should be in Backdrop. PR coming.

argiepiano commented 7 months ago

@bugfolder, @laryn, @hosef, PR provided.

To test:

  1. Install Rules and Rules UI
  2. Create a rule that reacts to a new node being created (in fact any reaction would work)
  3. Add an action "Create a new entity", then select "Taxonomy term" and click "Continue".
  4. At this point, before applying the PR, you won't be prompted to select a vocabulary for the new taxonomy term (which is a bug)
  5. Apply the PR and repeat all steps from number 2. This time you should be prompted to provide a vocabulary (as expected).

Thanks!

argiepiano commented 7 months ago

PS: the test failure is produced by another bug, see issue #164

It'd be great if you could review that one too, so that we can do a new release.

laryn commented 7 months ago

Merged the other change and tests pass here, too: CleanShot 2024-03-28 at 12 56 18@2x

LGTM, merged!