[jira] [Commented] (OFBIZ-12016) DiskFileItem as request attribute creates problems

2021-09-18 Thread Jacques Le Roux (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-12016?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17417101#comment-17417101
 ] 

Jacques Le Roux commented on OFBIZ-12016:
-

Hi Sebastian,

About
bq. I noticed, that in SafeObjectInputStream.java we throw a ClassCastException 
which isn't catched anywhere.
I guess you speak about SafeObjectInputStream::getObjectException. Then that's 
not exactly true. It's indeed not cathed in UtilObject::getObjectException, and 
that's on purpose. ClassCastException, ClassNotFoundException, IOException are 
rather thrown and catched by callers (ie EntityCrypto::doDecrypt and 
SafeObjectInputStream::getObject, I don't consider tests here). As Nicolas 
mentionned there is an history there. The last instance you may refer is 
OFBIZ-12216. Anyway better use revisions informaiton to followinvestigate the 
past if necessary.

I'm not sure what to say about your other remark. Please suggest changes that 
fit your needs :)
bq.  And there was a special code line for DiskFileItems where a ClassNotFound 
Exception was thrown, which was removed again. While this made it impossible to 
retrieve error messages from previous requests at least we don't have an 
Exception shown on the surface.

> DiskFileItem as request attribute creates problems
> --
>
> Key: OFBIZ-12016
> URL: https://issues.apache.org/jira/browse/OFBIZ-12016
> Project: OFBiz
>  Issue Type: Bug
>Affects Versions: 18.12.01, Trunk
>Reporter: Sebastian Berg
>Assignee: Jacques Le Roux
>Priority: Major
> Fix For: Upcoming Branch
>
>
> Hi,
> while working on a custom project based on the 18.12.01 version, I noticed a 
> problem with the request handling during a request-redirect-noparam if a 
> DiskFileItem was involved.
> So the situation for me is as follows: during the first request a file is 
> uploaded. I choose a wrong format on purpose, which results in an error 
> respond for that event. Nevertheless the DiskFileItem is set as request 
> attribute together with the error message.
> The request is finished and based on the controller configurations redirected 
> to a second request.
> While handling the second request the previous request's attributes get 
> restored (RequestHandler.java line 733ff). This goes down into 
> SafeObjectInfo.resolveClass() where an Incompatible class exception is 
> thrown. I compared my custom project with the current development status and 
> worked in the changes from commit 3f60efb343a11723aa56c1bc1f5afac3a2f26e9f in 
> OFBIZ-10837.
> While this fixes the issue with the incompatible class exception it also 
> makes it impossible to retrieve any attributes from the first request. 
> Therefore my error message cannot be shown.
> Is there a way to fix it or is it otherwise necessary to always set 
> "fileItems" as request attribute as added in -OFBIZ-11246-?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (OFBIZ-12298) Wrong price calculation for productConfigProduct

2021-09-18 Thread Jacques Le Roux (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-12298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17417197#comment-17417197
 ] 

Jacques Le Roux commented on OFBIZ-12298:
-

Hi Priya, Mart,

Sorry for the late, since I was involced in this with OFBIZ-1495 I'll have a 
look as soon as I'll get a chance. Should not be that long...

> Wrong price calculation for productConfigProduct
> 
>
> Key: OFBIZ-12298
> URL: https://issues.apache.org/jira/browse/OFBIZ-12298
> Project: OFBiz
>  Issue Type: Bug
>  Components: product
>Reporter: Mart Naum
>Assignee: Priya Sharma
>Priority: Major
> Attachments: config-product.png
>
>
> The enchiladas are implemented in the backend using productConfigProduct. For 
> the standard product, the cheese enchiladas, the productPrice is configured 
> to be 6 USD. The productPrice for fajita beef enchiladas is 8 USD.
> However, the order in the webshop shows a price of 12 USD for a single order 
> of cheese enchiladas. That's exactly double the price stored in productPrice. 
> On the other hand the price calculation for the fajita beef enchiladas seems 
> to be correct.
> I experimented a bit with productConfigProduct and saw that the price always 
> doubles in the ecommerce UI as well as in the resulting order when the 
> productConfigProduct is identical to the parent product of this product 
> configuration. This is so also the case with the configurable PC. I assume 
> there is a glitch within the price calculation for productConfigProducts.
>  
> Update: When I add enchiladas to a shoppingList, the shoppingList shows the 
> correct price of 6USD.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)