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.
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
Comment #1
AndyF CreditAttribution: AndyF commentedCan I just confirm this is with 7.x-1.x-dev?
Comment #2
AngryWookie CreditAttribution: AngryWookie commentedI was receiving this same error with the alpha1 version, upgrading to dev fixed it.
Comment #3
AndyF CreditAttribution: AndyF commentedThanks 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
Comment #4
Pere OrgaI don't know when this started to happen to me, but after reverting the field in the features page everything worked fine again.
Thanks
Comment #5
benjy CreditAttribution: benjy commentedI can confirm #4 worked for me also.