[MSHOP-175] Euro currency formatting (###.###,00) cause problems in product pages and shopping cart Created: 17/Feb/15  Updated: 16/Mar/23  Resolved: 16/Mar/23

Status: Closed
Project: Magnolia Shop (closed)
Component/s: None
Affects Version/s: 2.1
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Edwin Guilbert Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Magnolia 5.3.6


Attachments: PNG File Screen Shot 2015-02-17 at 17.03.39.png     Text File exceptionLog.txt    
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

Steps to reproduce:

1.- Create a currency with this format: ###.###,00
2.- Create a product and assign this currency with the previous format: 2,65 for example.
3.- Render the product page. This will not show the price because of the formatting.
4.- Try to add this product to the cart.

You get a blank page and this exception:

info.magnolia.rendering.engine.RenderException: java.lang.RuntimeException: Can't read value of nodedata shopProducts:/edwinShop/calcetin1/prices/0/price[String]
.....
Caused by: java.lang.RuntimeException: Can't read value of nodedata shopProducts:/edwinShop/calcetin1/prices/0/price[String]
at info.magnolia.cms.core.DefaultNodeData.getDouble(DefaultNodeData.java:146)
.....
Caused by: javax.jcr.ValueFormatException: not a double: 2,65
at org.apache.jackrabbit.spi.commons.value.AbstractQValue.getDouble(AbstractQValue.java:287)
.....
Caused by: java.lang.NumberFormatException: For input string: "2,65"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1250)
at java.lang.Double.parseDouble(Double.java:540)
at org.apache.jackrabbit.spi.commons.value.AbstractQValue.getDouble(AbstractQValue.java:285)



 Comments   
Comment by Edwin Guilbert [ 18/Feb/15 ]

Full exception log

Comment by Adam Jones [ 16/Mar/23 ]

Closing due to project being archived.

Generated at Mon Feb 12 07:10:04 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.