Hi

When trying to add your modules i get error in the rules

The data type of the configured argument does not match the parameter's list requirement. On all the rules for percentage coupons.

I use
Coupons 7.x-1.x-dev (also tried beta)
Commerce coupon percentage 7.x-1.x-dev
Rules 7.x-2.2+5-dev (also tried latest stable )
Entity API 7.x-1.0-rc3+11-dev
Entity Reference 7.x-1.0-rc5

Any thought on how to move solve?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

AndyF’s picture

Status: Active » Postponed (maintainer needs more info)

Hi, thanks for reporting this. Does the feature show as overridden at admin/structure/features/commerce_couponprodref? If so, try reverting it and see if that helps.

If that doesn't help, could you switch on Rules debugging and post the output below?

Thanks,

Andy

Strutsagget’s picture

Hi!

Seems to do it! Thx alot.

Last thing on my list before rolling out to prod :)

Strutsagget’s picture

Then the bigger things happens....

After getting it to work a couple of times I get a a wsod and get locked out fom drupal totally

Turning PHP Errors on i get

Fatal error: Cannot use object of type EntityDrupalWrapper as array in /home/arefjallsloppet/public_html/sites/all/modules/rules/includes/rules.plugins.inc on line 597

drush show this message when disableing the coupon module

WD rules: The reaction rule Apply percentage coupons to product line item (commerce_coupon_pct_apply_pct_coupons_to_line_item) fails the integrity check and cannot be [error]
executed. Error: The data type of the configured argument does not match the parameter's list requirement.

So after that drush disables

ommerce_coupon was disabled
commerce_couponprodref was disabled
commerce_coupon_pct was disabled
commerce_coupon_ui was disabled successfully.

and i can get back into the system.

Any clue what that can be?
I havent made any changes after adding the settings in rules again for coupons_prod_ref

And then i get errors on these rules
Apply percentage coupons to product line item
Maskinläsbart namn: commerce_coupon_pct_apply_pct_coupons_to_line_item, Vikt: 0
Error: The data type of the configured argument does not match the parameter's list requirement.

Calculate coupon with percentage amount
Maskinläsbart namn: commerce_coupon_pct_percent_amount, Vikt: 0
Error: The data type of the configured argument does not match the parameter's list requirement.

AndyF’s picture

The reaction rule Apply percentage coupons to product line item (commerce_coupon_pct_apply_pct_coupons_to_line_item) fails the integrity check

It shouldn't still be using commerce_coupon_pct_apply_pct_coupons_to_line_item... check out the Installation & Use section of the project page. Let me know if you still have issues.

Strutsagget’s picture

I got it working so far on reverting to

Commerce Coupon 7.x-1.0-beta6
Commerce Coupon by product reference 7.x-1.0-alpha1

And recreating the feature module.

Not sure if it started with me changing widget on the field to check-boxes and limited number of product types showing up.

Strutsagget’s picture

LOCATED THE PROBLEM!

If i change the number of times coupons can be applied in

store -> konfiguration -> settings for purchase-> manage field
change the coupon field to only allows 1 value submitted...

AndyF’s picture

If you edit the rule Apply percentage coupons to product line item what do you see? Does it match this screenshot?

Strutsagget’s picture

FileSize
244.28 KB
266.84 KB
228.64 KB

Yup
Adding pictures of:

Posting Before
What i change
After picture

AndyF’s picture

Sorry I'm getting a bit confused now. It looks fine in before.jpg. You change the field to be a single-value field in changeNumber.jpg and then it gives a validation problem because it can't loop over the field in After.jpg (which makes sense - it has only one value).

So why did you change the field to single-value?!

(Sorry if I'm missing something here!)

Strutsagget’s picture

Yes i want to make sure no one can enter more then 1 coupon. It makes sense a little bit but for me a loop should be ok no matter if the array has 1 or more values. It should just loop 1 time :)

But i understand why just seems strange the rules stuff crashed the whole system when entering a checkoutpage. But guess that is a issue outside of your feature/module.

Do you think it would work if i just remove the loop?

You can close this issue as working as expected if you wish. And thx for your patience and help.

AndyF’s picture

Title: Rules Error » How do I limit the number of coupons applied to the order?
Category: bug » support
Status: Postponed (maintainer needs more info) » Closed (works as designed)

Ah, so you want to limit the number of coupons applied to an order? That's completely different - you were altering the number of products a single coupon could apply to. I've not done it myself, but it looks like what you want is possible: see #1538158: Limit number of coupons applied to the order..