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.
Maybe it is something on my end, but when creating an action of type "Create a new entity" and choosing "subscription" as the entity type, you are prompted for the "Unique ID of the user" - however, site:current-user:uid is not available in the data selectors.
site:current-user (the owner object, not the uid) is available and this is what you are prompted for when creating an entity of type "node". Because of this, it is impossible to create an entity of type "Subscription"
Comments
Comment #1
alexweber CreditAttribution: alexweber commentedThanks for the bug report, I will work on this and let you know!
Comment #2
alexweber CreditAttribution: alexweber commented@drawk, ok I just managed to replicate it:
"site:current-user" is available and the action gets called but nothing happens.
I'll try to make Subs accept a user object instead of just uid in order to provide a simpler fix for this instead of trying to make uid appear in the data selector.
Comment #3
alexweber CreditAttribution: alexweber commentedThis is actually quite weird. In some cases it fails but creates the entity and in others no error and no entity. Still looking into it...
Comment #4
alexweber CreditAttribution: alexweber commentedFixed in eae6214.
Comment #5
alexweber CreditAttribution: alexweber commentedComment #7
ddgza CreditAttribution: ddgza commentedSorry to drag up this old thread but I am experiencing exactly this same problem.
I have created a rule that when a certain product is bought an new subscription entity is created.
My parameter for my create entity action are as follows:
Parameter: Entity type: Subscription, Type: 3 Month Subscription, User: [site:current-user], Status: Active
Provides variables: Created entity (entity_created)
The rule fires, but when the create_entity action is called it fails with the following debug message:
I was originally using the beta5 version but then moved to the dev version but that did not help. I also update subs.entity.inc as per the git commit in #4 (subs.info.inc was already up to date). This did not help either.
I now don't know what to do. I believe it is because the User field should be a uid, but there is no way to select this and just selecting the user does not seem to pass the uid value.
Anyone got any ideas?
Comment #8
ddgza CreditAttribution: ddgza commentedAfter trying everything else, I uninstalled and reinstalled the subs module. It works now. No idea why it was not working earlier.
Comment #9
alexweber CreditAttribution: alexweber commentedAwesome :)
Comment #10
ddgza CreditAttribution: ddgza commentedJust an update. The problem came back. But I have figured out it only presents if there is a number in the machine readable name of your subscription type. Everything works if you don't have numbers in your machine readable name. I will open a new issue for this.
Comment #11
alexweber CreditAttribution: alexweber commentedbummer, ok.
Comment #11.0
alexweber CreditAttribution: alexweber commentedCorrected data selectors