ofbiz-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Forrest Rae (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OFBIZ-6770) createCustRequestContent Hasn't worked in 6 years and 7 months
Date Tue, 15 Dec 2015 16:58:46 GMT

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

Forrest Rae commented on OFBIZ-6770:
------------------------------------

Sorry, I didn't mean to leave out important details, and sorry for all the emails to the Dev
mailing list while trying to correct the description.  You click anywhere outside of the description
and it saves.

> createCustRequestContent Hasn't worked in 6 years and 7 months
> --------------------------------------------------------------
>
>                 Key: OFBIZ-6770
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-6770
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: Release Branch 11.04, Release Branch 12.04, Release Branch 13.07,
Release Branch 14.12, Trunk
>            Reporter: Forrest Rae
>         Attachments: OFBIZ-6770-option1.patch, OFBIZ-6770-option2.patch, OFBIZ-6770-option3.patch
>
>
> This [commit|https://fisheye6.atlassian.com/changelog/ofbiz?cs=768661] disabled the mimeTypeId
argument in applications/order/widget/ordermgr/CustRequestForms.xml, in order to provide "various
fixes".  I wonder how many people have been frustrated by this when looking for example code
on how to upload documents.  
> The issue is that mimeTypeId field that was commented out from [applications/order/widget/ordermgr/CustRequestForms.xml|https://fisheye6.atlassian.com/browse/~br=trunk/ofbiz/trunk/applications/order/widget/ordermgr/CustRequestForms.xml?r=1686674#to608],
is a required parameter by [createCustRequestContent|https://fisheye6.atlassian.com/browse/~br=trunk/ofbiz/trunk/applications/order/script/org/ofbiz/order/request/CustRequestEvents.xml?r=1328827#to23].
 Lines 52-54 check it's value for the following:
> Line [52|https://fisheye6.atlassian.com/browse/~br=trunk/ofbiz/trunk/applications/order/script/org/ofbiz/order/request/CustRequestEvents.xml?r=1328827#to52]:
if-compare is "Does the web browser's choice of mimeTypeId equal what the user thinks the
mimeTypeId is?"
> Line [53|https://fisheye6.atlassian.com/browse/~br=trunk/ofbiz/trunk/applications/order/script/org/ofbiz/order/request/CustRequestEvents.xml?r=1328827#to53]:
if-compare is "Did the user select anything at all in the mimeTypeId dropdown?" (Before the
mimeTypeId field was commented out.)
> Line [54|https://fisheye6.atlassian.com/browse/~br=trunk/ofbiz/trunk/applications/order/script/org/ofbiz/order/request/CustRequestEvents.xml?r=1328827#to54]:
if-compare is "Did the user submit mimeTypeId form field, but remove the value, submitting
a blank form field?"  This is the weird case, as really this should be a is-null check.
> My question is why are we even doing any of this when the event just goes on to set the
mimeType to what the web browser decided it was, and then to call createContentFromUploadedFile
service?  Also, if mimeTypeId is in fact empty, the call to createContentFromUploadedFile
calls createDataResource, which at applications/content/script/org/ofbiz/content/data/DataServices.xml:53
calls org.apache.tika.Tika#detect(byte[]) to detect the mimeType anyway.  Why not just let
tika handle the mimeType?
> Anyway, I dunno enough about the Content component to make the decision here.  I've attached
three different patches.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message