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

alexweber’s picture

Assigned: Unassigned » alexweber

Thanks for the bug report, I will work on this and let you know!

alexweber’s picture

@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.

alexweber’s picture

This 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...

alexweber’s picture

Fixed in eae6214.

alexweber’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

ddgza’s picture

Version: 7.x-1.0-beta4 » 7.x-1.x-dev
Status: Closed (fixed) » Active

Sorry 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:

2.933 ms Unable to get a data value. Error: Invalid data value given. Be sure it matches the required data type and format.
2.977 ms Unable to evaluate action entity_create.

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?

ddgza’s picture

Status: Active » Closed (works as designed)

After trying everything else, I uninstalled and reinstalled the subs module. It works now. No idea why it was not working earlier.

alexweber’s picture

Awesome :)

ddgza’s picture

Just 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.

alexweber’s picture

bummer, ok.

alexweber’s picture

Issue summary: View changes

Corrected data selectors