Cannot save the rule: Apply coupon to line item

Error message
The utilized component rules_commerce_couponprodref_apply_coupon_to_line_item_component fails the integrity check.

Also there is an error on the rules page for rule Coupon Validation: Check the referenced products

with message in red.

NOT Data value is empty
Parameter: Data to check: [coupon:field-commerce...
Error: Data selector coupon:field-commerce-couponprodref for parameter data is invalid.

Tried reinstalling modules, clearing caches etc.

Comments

AndyF’s picture

Status: Active » Postponed (maintainer needs more info)

Can I just confirm this is with 7.x-1.x-dev?

AngryWookie’s picture

I was receiving this same error with the alpha1 version, upgrading to dev fixed it.

AndyF’s picture

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

Thanks for reporting it. It appears that the problem is that Rules can't find the field field_commerce_couponprodref. I guess that's connected with Features (perhaps I should just change this to be a vanilla module instead) not modifying the coupon bundle for some reason. If this diagnosis is right, one way around it would be to revert the feature on installation, but I don't know if that might cause problems for users with highly customised coupon bundles. @AngryWookie I think the upgrade was a red herring (the difference between the latest dev and alpha1 is a runtime check - not something that should make any difference to the stored default rule validating or not AFAICT).

So for now I'm going to mark this as can't reproduce - if anyone has this problem, please look at the features page for this module (admin/structure/features/commerce_couponprodref) and see if anything needs reverting. Maybe at a later date I'll turn it into a plain ol' module that adds the field.

If anyone has this problem and everything looks good on the feature screen please reopen the issue.

Thanks again

Pere Orga’s picture

I don't know when this started to happen to me, but after reverting the field in the features page everything worked fine again.

Thanks

benjy’s picture

I can confirm #4 worked for me also.