Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-9653

Issue while creating new person in the party component

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Upcoming Release
    • Component/s: None
    • Labels:
      None

      Description

      Steps to regenerate:
      1) Open link https://demo-trunk.ofbiz.apache.org/webtools/control/main
      2) Go to party component.
      2) Click on Create new person.
      3) Fill in the mandatory fields and click on save button.

      Actual: Redirects to the view profile page https://demo-trunk.ofbiz.apache.org/partymgr/control/viewprofile with following description "party found with the partyId of:"

      1. screenshot-1.png
        338 kB
        Rubia Elza Joshep
      2. OFBIZ-9653.patch
        0.8 kB
        Suraj Khurana

        Activity

        Hide
        suraj.khurana Suraj Khurana added a comment -

        Here is the patch with the proper fix. Curious to know that how it was working earlier? Is there any change in request-redirect behaviour?

        Show
        suraj.khurana Suraj Khurana added a comment - Here is the patch with the proper fix. Curious to know that how it was working earlier? Is there any change in request-redirect behaviour?
        Hide
        jacques.le.roux Jacques Le Roux added a comment - - edited

        Hi Suraj,

        Yes that's weird. Normally request-redirect redirects also parameters, unlike request-redirect-noparam:

        <xs:enumeration value="request-redirect">
            <xs:annotation>
                <xs:documentation>
                    Send a redirect down to the browser telling it to go to the new request.
                    Automatically redirect all current request parameters to the new request or only redirected parameters if specified.
                </xs:documentation>
            </xs:annotation>
        </xs:enumeration>
        <xs:enumeration value="request-redirect-noparam">
            <xs:annotation>
                <xs:documentation>
                    Send a redirect down to the browser telling it to go to the new request.
                    No current request parameters are sent to the new request, nor redirected parameters if specified.
                </xs:documentation>
            </xs:annotation>
        </xs:enumeration>
        

        Since you suggest (did not test but I guess it's OK)

        • <response name="success" type="request-redirect" value="viewprofile"/>
          + <response name="success" type="request-redirect" value="viewprofile">
          + <redirect-parameter name="partyId"/>
          + </response>
          
          

          It must be that request-redirect behaviour has changed

        Show
        jacques.le.roux Jacques Le Roux added a comment - - edited Hi Suraj, Yes that's weird. Normally request-redirect redirects also parameters, unlike request-redirect-noparam: <xs:enumeration value= "request-redirect" > <xs:annotation> <xs:documentation> Send a redirect down to the browser telling it to go to the new request. Automatically redirect all current request parameters to the new request or only redirected parameters if specified. </xs:documentation> </xs:annotation> </xs:enumeration> <xs:enumeration value= "request-redirect-noparam" > <xs:annotation> <xs:documentation> Send a redirect down to the browser telling it to go to the new request. No current request parameters are sent to the new request, nor redirected parameters if specified. </xs:documentation> </xs:annotation> </xs:enumeration> Since you suggest (did not test but I guess it's OK) <response name="success" type="request-redirect" value="viewprofile"/> + <response name="success" type="request-redirect" value="viewprofile"> + <redirect-parameter name="partyId"/> + </response> It must be that request-redirect behaviour has changed
        Hide
        deepak.dixit Deepak Dixit added a comment -

        Hi Jacques its changed due to changes done under OFBIZ-9240

        And I think current behavior is correct, request-redirect should only redirect those parameter that are define in redirect-parameter in request mapping (It should also redirect system variable as well.)

        http://markmail.org/message/fnanwil63wogsfqc

        Show
        deepak.dixit Deepak Dixit added a comment - Hi Jacques its changed due to changes done under OFBIZ-9240 And I think current behavior is correct, request-redirect should only redirect those parameter that are define in redirect-parameter in request mapping (It should also redirect system variable as well.) http://markmail.org/message/fnanwil63wogsfqc
        Hide
        jacques.le.roux Jacques Le Roux added a comment - - edited

        Hi Deepak,

        But see the xsd documentation

        Automatically redirect all current request parameters to the new request or only redirected parameters if specified.

        If it's not the request-redirec behaviour which has changed then something else must have changed. So maybe before applying Surajk's suggested change we should be sure it's the best solution. Or possibly change the XSD documentation...

        Show
        jacques.le.roux Jacques Le Roux added a comment - - edited Hi Deepak, But see the xsd documentation Automatically redirect all current request parameters to the new request or only redirected parameters if specified. If it's not the request-redirec behaviour which has changed then something else must have changed. So maybe before applying Surajk's suggested change we should be sure it's the best solution. Or possibly change the XSD documentation...
        Hide
        arunpati Arun Patidar added a comment -

        Committed revision 1813627.

        Thanks Rubia Elza Joshep and Suraj Khurana for your contribution.

        Show
        arunpati Arun Patidar added a comment - Committed revision 1813627. Thanks Rubia Elza Joshep and Suraj Khurana for your contribution.

          People

          • Assignee:
            arunpati Arun Patidar
            Reporter:
            rubia.joseph Rubia Elza Joshep
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development