Problem/Motivation

In #3552023: Recipes should support skipping config actions on entities that don't exist, the recipe system added support for "optional" config actions -- that is, config actions that don't run if the entity they are targeting doesn't exist.

The problem is, we forgot to update the recipe validation logic to account for the possibility of config action entity names starting with ?. This means, if you try to use this syntax, the recipe will immediately break with a message like this:

Config actions cannot be applied to ?user.role.content_editor because the ?user extension is not installed, and is not installed by this recipe or any of the recipes it depends on.

Proposed resolution

Fix the validation logic to strip out the leading ? from config action targets.

Issue fork drupal-3557156

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

phenaproxima created an issue. See original summary.

phenaproxima’s picture

Status: Active » Needs review
nicxvan’s picture

Status: Needs review » Reviewed & tested by the community

Looks reasonable, test only fails as expected and coverage looks complete.

  • alexpott committed 70e5d0d7 on 11.3.x
    Issue #3557156 by phenaproxima: The ? optional syntax for config actions...

  • alexpott committed 556ddedc on 11.x
    Issue #3557156 by phenaproxima: The ? optional syntax for config actions...
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 556dded and pushed to 11.x. Thanks!
Committed 70e5d0d and pushed to 11.3.x. Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

nicxvan changed the visibility of the branch 3557156-the--optional to hidden.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.