In-Portal Issue Tracker - In-Commerce
Viewing Issue Advanced Details
908 [In-Portal CMS] Data Management bug report always 2010-10-28 10:36 2011-03-30 09:58
Dmitry  
alex  
normal  
closed 5.1.1-B2  
fixed  
 
none 5.1.1-RC1  
http://groups.google.com/group/in-portal-bugs/browse_thread/thread/4032a058c92f6c63
Fixes Fatal error on Creating Coupon in Admin
0
0000908: Fatal Error on Creating Coupon
Fatal error when I try to add a coupon for Entire Order.

This is the error and appears when on the Items tab when adding coupon
(as root user):

Fatal Error: Query method is called in class kDBItem for prefix coupi in /home/sites/betainportal/web/5.1.1-beta2/full/core/kernel/db/dbitem.php on line 1504
NOTES by Alex:

After debugger report inspection several errors were discovered, that together resulted in error you've totally got:

   - "coupi" (coupon item) validation errors: Weight (value_out_of_range)
   - Requested ID for prefix coupi not passed

This a bug in 0000845 task implementation (which was done in 5.1.1 release only), that resulted default value equals to *0*, while *Weight* field was also having "min_value_exc" option equals to *0*. Resulted in situation, that will always produce error, since there is way to fix it. I suppose we can set default value to NULL, since that Weight field is virtual.
related to 0000917closed  (5.1.1)alex In-Commerce Fatal Error on Creating Discount and Affiliate Plan Items 
child of 0000845closed  (5.1.1)Dmitry In-Portal CMS Revising usage of NULL columns 
patch Fatal-Error-on-Creating-Coupon.patch (10,137) 2010-11-01 11:44
http://tracker.in-portal.org/file_download.php?file_id=829&type=bug
Issue History
2011-03-30 09:58 Dmitry Note Added: 0003387
2011-03-30 09:58 Dmitry Status resolved => closed
2010-11-02 14:15 Dmitry Relationship added related to 0000917
2010-11-02 14:05 Dmitry Change Log Message Fixes error Fatal error on Creating Coupon => Fixes Fatal error on Creating Coupon in Admin
2010-11-01 15:34 alex Note Added: 0002945
2010-11-01 15:34 alex Status reviewed and tested => resolved
2010-11-01 15:34 alex Fixed in Version => 5.1.1-RC1
2010-11-01 15:34 alex Resolution open => fixed
2010-11-01 15:34 alex Assigned To Dmitry => alex
2010-11-01 15:34 alex Changeset attached 5.1.x r14028
2010-11-01 15:33 alex Note Edited: 0002944 bug_revision_view_page.php?bugnote_id=0002944#r602
2010-11-01 15:33 alex Note Edited: 0002944 bug_revision_view_page.php?bugnote_id=0002944#r601
2010-11-01 15:33 alex Note Added: 0002944
2010-11-01 15:33 alex Assigned To alex => Dmitry
2010-11-01 15:33 alex Status needs testing => reviewed and tested
2010-11-01 11:45 Dmitry Note Added: 0002936
2010-11-01 11:45 Dmitry Assigned To Dmitry => alex
2010-11-01 11:45 Dmitry Developer => Dmitry
2010-11-01 11:45 Dmitry Status needs work => needs testing
2010-11-01 11:44 Dmitry File Added: Fatal-Error-on-Creating-Coupon.patch
2010-10-28 10:38 Dmitry Assigned To => Dmitry
2010-10-28 10:38 Dmitry Status active => needs work
2010-10-28 10:36 Dmitry Relationship added child of 0000845
2010-10-28 10:36 Dmitry New Issue
2010-10-28 10:36 Dmitry Reference => http://groups.google.com/group/in-portal-bugs/browse_thread/thread/4032a058c92f6c63
2010-10-28 10:36 Dmitry Change Log Message => Fixes error Fatal error on Creating Coupon

Notes
(0002936)
Dmitry   
2010-11-01 11:45   
Please test the patch:

1. Specified as Default NULL in Weight field.
2. Reworked the whole config so it complies with our Unit Config formatting rules.
(0002944)
alex   
2010-11-01 15:33   
Tested, but you've made too aggressive changes to structure of changed unit config file. For example order of unit config options and order of field declaration options was changed a lot, so it even remotely wasn't matching common order, used in other unit configs and on http://guide.in-portal.org/eng/index.php/K4:%D0%9A%D0%BE%D0%BD%D1%84%D0%B8%D0%B3%D1%83%D1%80%D0%B0%D1%86%D0%B8%D0%BE%D0%BD%D0%BD%D1%8B%D0%B5_%D1%84%D0%B0%D0%B9%D0%BB%D1%8B page.

(0002945)
alex   
2010-11-01 15:34   
Fix committed to 5.1.x branch. Commit Message:

1. Fixes 0000908: Fatal Error on Creating Coupon
2. Commit on behalf of Dmitry
(0003387)
Dmitry   
2011-03-30 09:58   
Closing, since 5.1.1 release has been released.