Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hallo,
the $path array and its tokens are available for example for PHP action but they are not present for the Fetch Entity actions.
Usecase is: I want to add a link with an order ID as argument, then I want to load the order and change its state when the link is visited.
tx
Simone
Comments
Comment #2
cimo75 CreditAttribution: cimo75 commentedComment #3
deggertsen CreditAttribution: deggertsen commentedThis seems like a feature request to me. I personally will not be doing anything to add this functionality, but if you would like to submit a patch I would be happy to review it and apply it if it looks good.
Thanks
Comment #4
cimo75 CreditAttribution: cimo75 commentedHallo, I marked as a bug because I assumed that a variable and its token should be available across all the actions on the same rule and if it didn't then something was not right.
It is a pity because I think this would be a great feature, very useful, think about loading an entity by the argument as a pretty basic functionality.
Thanks
Simone
Comment #5
david.qdoscc CreditAttribution: david.qdoscc commentedHere's a quick workaround...
1. Add action 'Add a variable'. Type: Text. Value: [path:last].
2. Add action 'Convert data type'. Target type: Integer. Value to convert: variable-added.
3. Add action 'Fetch entity by id'. Identifier: [conversion-result].