|
Blank year in UtilValidate.isYear should return false
----------------------------------------------------- Key: OFBIZ-4171 URL: https://issues.apache.org/jira/browse/OFBIZ-4171 Project: OFBiz Issue Type: Bug Components: framework Affects Versions: Release Branch 10.04, SVN trunk Environment: Win XP Reporter: Stephen Rufle Priority: Minor UtilValidate.isYear returns true for a blank year which the calling function UtilValidate.isDate(String, String, String) tries to parse. This causes an exception to be thrown ValidateMethod.java:96 :ERROR] [ValidateMethod.exec] Error in validation method isDateAfterToday of class org.ofbiz.base.util.UtilValidate: null I found this error when trying to add a new credit card in the eCommerce checkout flow. # Add a product to the cart # login as any user I used "admin" # Checkout Step "Shipping Address" (Step 1: Where shall we ship it?) #* Click Next # Checkout Step "Shipping Options" (Step 2: How shall we ship it?) #* Choose "UPS Air" #* Click Next # Checkout Step "Payment Options" (Step 3: How shall you pay?) # Create "Credit Card" #* Fill Name #* Card Type "Visa" #* Card Number "4111111111111111" #* Expiration Date Month drop-down 01 #* Expiration Date Year drop-down leave blank #* Choose billing address #* Click "Save" button Should see "Error in validation method isDateAfterToday of class org.ofbiz.base.util.UtilValidate: null" My fix is to change isYear, isMonth, and isDay to return false when a blank value is entered. After I make my change the message is "The expiration date is before today" -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
[ https://issues.apache.org/jira/browse/OFBIZ-4171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stephen Rufle updated OFBIZ-4171: --------------------------------- Attachment: OFBIZ-4171.patch Changes UtilValidate isYear, isMonth, and isDay to return false when a blank value is entered. > Blank year in UtilValidate.isYear should return false > ----------------------------------------------------- > > Key: OFBIZ-4171 > URL: https://issues.apache.org/jira/browse/OFBIZ-4171 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: Release Branch 10.04, SVN trunk > Environment: Win XP > Reporter: Stephen Rufle > Priority: Minor > Attachments: OFBIZ-4171.patch > > > UtilValidate.isYear returns true for a blank year which the calling function UtilValidate.isDate(String, String, String) tries to parse. This causes an exception to be thrown > ValidateMethod.java:96 :ERROR] [ValidateMethod.exec] Error in validation method isDateAfterToday of class org.ofbiz.base.util.UtilValidate: null > I found this error when trying to add a new credit card in the eCommerce checkout flow. > # Add a product to the cart > # login as any user I used "admin" > # Checkout Step "Shipping Address" (Step 1: Where shall we ship it?) > #* Click Next > # Checkout Step "Shipping Options" (Step 2: How shall we ship it?) > #* Choose "UPS Air" > #* Click Next > # Checkout Step "Payment Options" (Step 3: How shall you pay?) > # Create "Credit Card" > #* Fill Name > #* Card Type "Visa" > #* Card Number "4111111111111111" > #* Expiration Date Month drop-down 01 > #* Expiration Date Year drop-down leave blank > #* Choose billing address > #* Click "Save" button > Should see "Error in validation method isDateAfterToday of class org.ofbiz.base.util.UtilValidate: null" > My fix is to change isYear, isMonth, and isDay to return false when a blank value is entered. > After I make my change the message is "The expiration date is before today" -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux closed OFBIZ-4171. ---------------------------------- Resolution: Fixed Fix Version/s: SVN trunk Release Branch 10.04 Assignee: Jacques Le Roux Thanks Stephen, Your patch is in trunk at r1070230, R10.04 at r1070232. > Blank year in UtilValidate.isYear should return false > ----------------------------------------------------- > > Key: OFBIZ-4171 > URL: https://issues.apache.org/jira/browse/OFBIZ-4171 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: Release Branch 10.04, SVN trunk > Environment: Win XP > Reporter: Stephen Rufle > Assignee: Jacques Le Roux > Priority: Minor > Fix For: Release Branch 10.04, SVN trunk > > Attachments: OFBIZ-4171.patch > > > UtilValidate.isYear returns true for a blank year which the calling function UtilValidate.isDate(String, String, String) tries to parse. This causes an exception to be thrown > ValidateMethod.java:96 :ERROR] [ValidateMethod.exec] Error in validation method isDateAfterToday of class org.ofbiz.base.util.UtilValidate: null > I found this error when trying to add a new credit card in the eCommerce checkout flow. > # Add a product to the cart > # login as any user I used "admin" > # Checkout Step "Shipping Address" (Step 1: Where shall we ship it?) > #* Click Next > # Checkout Step "Shipping Options" (Step 2: How shall we ship it?) > #* Choose "UPS Air" > #* Click Next > # Checkout Step "Payment Options" (Step 3: How shall you pay?) > # Create "Credit Card" > #* Fill Name > #* Card Type "Visa" > #* Card Number "4111111111111111" > #* Expiration Date Month drop-down 01 > #* Expiration Date Year drop-down leave blank > #* Choose billing address > #* Click "Save" button > Should see "Error in validation method isDateAfterToday of class org.ofbiz.base.util.UtilValidate: null" > My fix is to change isYear, isMonth, and isDay to return false when a blank value is entered. > After I make my change the message is "The expiration date is before today" -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12994144#comment-12994144 ] Jacques Le Roux commented on OFBIZ-4171: ---------------------------------------- On David's advice on dev ML, reverted at r1070282 for the trunk, r1070284 for R10.04 > Blank year in UtilValidate.isYear should return false > ----------------------------------------------------- > > Key: OFBIZ-4171 > URL: https://issues.apache.org/jira/browse/OFBIZ-4171 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: Release Branch 10.04, SVN trunk > Environment: Win XP > Reporter: Stephen Rufle > Assignee: Jacques Le Roux > Priority: Minor > Fix For: Release Branch 10.04, SVN trunk > > Attachments: OFBIZ-4171.patch > > > UtilValidate.isYear returns true for a blank year which the calling function UtilValidate.isDate(String, String, String) tries to parse. This causes an exception to be thrown > ValidateMethod.java:96 :ERROR] [ValidateMethod.exec] Error in validation method isDateAfterToday of class org.ofbiz.base.util.UtilValidate: null > I found this error when trying to add a new credit card in the eCommerce checkout flow. > # Add a product to the cart > # login as any user I used "admin" > # Checkout Step "Shipping Address" (Step 1: Where shall we ship it?) > #* Click Next > # Checkout Step "Shipping Options" (Step 2: How shall we ship it?) > #* Choose "UPS Air" > #* Click Next > # Checkout Step "Payment Options" (Step 3: How shall you pay?) > # Create "Credit Card" > #* Fill Name > #* Card Type "Visa" > #* Card Number "4111111111111111" > #* Expiration Date Month drop-down 01 > #* Expiration Date Year drop-down leave blank > #* Choose billing address > #* Click "Save" button > Should see "Error in validation method isDateAfterToday of class org.ofbiz.base.util.UtilValidate: null" > My fix is to change isYear, isMonth, and isDay to return false when a blank value is entered. > After I make my change the message is "The expiration date is before today" -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira |
| Free forum by Nabble | Edit this page |
