I get the following error when a user checks out a subscription product:

Unable to modify data "account:field-commerce-sp-validity": Invalid data value given. Be sure it matches the required data type and format.

I've only tested this with anonymous users. I have the latest versions of the required modules (not dev)

Comments

fago’s picture

hm, not sure what's happening here. Maybe make sure the value which is to be set is really a date.

fago’s picture

Status: Active » Postponed (maintainer needs more info)
droweski’s picture

Appears to be simple matter of rule weights in checkout rules.
Default weight of zero triggers rule before account creation.
Edit the "Apply bought subscription time" rule to apply more weight (larger number), so that it triggers after new account has been created and error is gone!

Fago, you do fantastic work, thanks!

droweski’s picture

PS:
As fago notes, recommended to use features_override to manage change to rule weight, since any upgrade will revert changes you have made.

mrconnerton’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

I don't think this is an issue anymore

kt2ssh’s picture

I got this error when the rule "Apply bought subscription time to user subscription validity" is triggered by paypal ipn (anonymous user) , it cannot set a data value , seems permission issue , it got this error.

Unable to modify data "account:field-commerce-sp-validity": Invalid data value given. Be sure it matches the required data type and format.

If that rule is triggered by admin , the field-commerce-sp-validity changed successfully .

Anyone got this issue ?

kt2ssh’s picture

Sorry , this was my problem , the line item was added to the order programmatically and missing the order id ...
the rule is failed due the missing line item:owner.