Closed (fixed)
Project:
Commerce coupon fixed amount
Version:
7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Apr 2012 at 19:30 UTC
Updated:
27 Apr 2012 at 19:11 UTC
Jump to comment: Most recent file
Comments
Comment #0.0
roam2345 commentedcross ref
Comment #0.1
roam2345 commentedad screen shot
Comment #1
roam2345 commentedPS: you can't get the site back once this has happened, upgrading priority.
Comment #2
pcambraThis definitely doesn't happen in my enviroment, could you specify the steps to reproduce it?
Comment #3
roam2345 commented1. install this module (i used check from git).
2. add a fixed price coupon.
3. run drush cc all
you have the error.
Comment #4
roam2345 commentedchange status
Comment #5
pcambraComment #6
mrfelton commentedSame problem for me too. Seems that the call to entity_metadata_wrapper() in commerce_coupon_fixed_amount_commerce_price_component_type_info was causing a heavily recursive loop, with commerce_coupon_fixed_amount_commerce_price_component_type_info being called over and over again, resulting to a memory overflow on our system. Attached patch reworks to achieve the same thing, without using entity_metadata_wrapper().
Reminds me of the problem I had trying to do stuff that I really cant do in a commerce _info hook. #1509450: Unable to load current order from hook_commerce_checkout_page_info_alter
Not sure how it worked for you @pcambra, but perhaps there is a finite limit to the amount of looping that happens, which on your system wasn't an issue. Try chucking a dd statement at the top of commerce_coupon_fixed_amount_commerce_price_component_type_info and see how many times it gets called.
Comment #7
pcambraNot sure of the environment conditions as I've just installed a kickstart with coupon and can't reproduce this.
About the patch, I'd say that these are not quite the same.
Maybe we could use something like this
$items = field_get_items('commerce_coupon', 'commerce_coupon_fixed', 'commerce_coupon_code');Anyways let's see the feedback by jucallme
Comment #8
pcambraJust seen that field_get_items conflicts with entity and rules at this point, we can gather the info manually, but it would be a little less fancy :)
Comment #9
mrfelton commentedYeah, there was an issue with the previous patch. I think this ons better.
Comment #10
roam2345 commentedYup patch solves issue @pcambra
Comment #11
pcambraGreat, let's commit the code which is actually the same but without wrappers, thanks mrfelton & jucallme!
Also committed to commerce coupon percentage that shares this code atm.
Comment #12
roam2345 commentedNope now that the % bit is using this its blowing up for me.......
Comment #13
pcambraNow both share the code in this patch, are you sure you've updated to the last git version?
Comment #14
roam2345 commentedthere was some change that i missed in commerce_coupon_pct.module
works :)
Comment #15.0
(not verified) commentedremove other issue