Closed (works as designed)
Project:
Commerce coupon fixed amount
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 May 2012 at 18:08 UTC
Updated:
30 May 2012 at 18:40 UTC
Getting
Fatal error: Call to undefined function commerce_coupon_type_disable() in sites/all/modules/commerce_coupon_fixed_amount.install line 27
I am trying to re-install this but can't uninstall it first. Same error happening in percent off module but for the pct.install file
Comments
Comment #1
pcambraMaybe we should use drupal_load instead of module_load_include.
Comment #2
sher1 commentedI was wanting to uninstall because my rules are corrupted for the coupons and the coupon types. Is there some way to fix that? Is there some way to force an uninstall?
Comment #3
pcambraYou didn't provide feedback about the alternative in #1, anyways, I tweaked it a little so it calls drupal_load now.
If you look to the function it's giving you the error, you'll see that it disables the coupon type (status =0) and sets all coupons to disabled too (is active = 0): http://drupalcode.org/project/commerce_coupon.git/blob/refs/heads/7.x-1....
But this can't be happening on uninstall because that function is called on disable.
Comment #4
sher1 commentedThe error that I am getting is
Call to undefined function commerce_coupon_type_disable()
because this function is not defined in any of the coupon code. I didn't respond to the suggestion because it wasn't the error that was listed above. Are you saying that module_load_include is the reason commerce_coupon_type_disable() is not found?
Comment #5
pcambraYes, it is:
http://drupalcode.org/project/commerce_coupon.git/blob/refs/heads/7.x-1....
Please, update commerce coupon to the latest dev. Closing this.
Comment #6
sher1 commentedI have updated commerce coupon fixed amount, commerce coupon, commerce coupon percent. This function is not found in any of the modules although it is invoked here
commerce_coupon_fixed_amount/commerce_coupon_fixed_amount.install:27: commerce_coupon_type_disable('commerce_coupon_fixed');
commerce_coupon_pct/commerce_coupon_pct.install:49: commerce_coupon_type_disable('commerce_coupon_pct');
Where is that function supposed to be defined?
Comment #7
sher1 commentedAnd it still fails on the uninstall
Comment #8
sher1 commentedSo it doesn't exist in the stable line. I found it in the dev line. There should probably be a note on the percent and fixed amount coupon types saying that the dev line requires the dev line of commerce coupon.
Comment #9
pcambraWell, it seems quite clear to me that the -dev versions of submodules should go with the -dev of the main module.
Anyways, I'm trying to push a new beta and I'll create the according releases on the submodules.
Comment #10
sher1 commentedLooking back, it makes sense now but I was basing it on the fact that the submodules and the beta were on the api 1 version of the coupon module. In any case, things are working much better now. THANKS