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

returnItems.ftl freemarker null error when returnPrice or returnQuantity is null

    Details

      Description

      This error message:

      FreeMarker template error: The following has evaluated to null or missing: ==> null [in template "component://order/webapp/ordermgr/return/returnItems.ftl" at line 155, column 48]

      1. OFBIZ-6142.patch
        3 kB
        Christian Carlow

        Activity

        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Just a question before reviewing: is it normally possible that returnPrice or returnQuantity is null?

        Show
        jacques.le.roux Jacques Le Roux added a comment - Just a question before reviewing: is it normally possible that returnPrice or returnQuantity is null?
        Hide
        pfm.smits Pierre Smits added a comment -

        Is this related to purchase orders and thus purchase returns? Or is this related to sales orders and sales returns?

        Show
        pfm.smits Pierre Smits added a comment - Is this related to purchase orders and thus purchase returns? Or is this related to sales orders and sales returns?
        Hide
        pfm.smits Pierre Smits added a comment -

        It seems illogical for the return quantity to be 0, as nothing would be returned.

        Show
        pfm.smits Pierre Smits added a comment - It seems illogical for the return quantity to be 0, as nothing would be returned.
        Hide
        ofbizzer Christian Carlow added a comment -

        This error was encountered due to imported data where the price and quantity weren't set correctly so it probably won't occur under normal circumstances.

        Show
        ofbizzer Christian Carlow added a comment - This error was encountered due to imported data where the price and quantity weren't set correctly so it probably won't occur under normal circumstances.
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        So we can close as invalid, right?

        Show
        jacques.le.roux Jacques Le Roux added a comment - So we can close as invalid, right?
        Hide
        ofbizzer Christian Carlow added a comment -

        I think the patch is still valid. I also updated it so that it prevents Freemarker errors from appearing in the quantity and price input fields when they are set to blank. Perhaps logic should be implemented to prevent the fields from being updated to blank but as of right now its allowed which cause the errors to appear which make the screen look very messy. This patch basically cleans up the screen if either of those scenarios occur.

        To reproduce just update the quantity or price of a return item to blank.

        Show
        ofbizzer Christian Carlow added a comment - I think the patch is still valid. I also updated it so that it prevents Freemarker errors from appearing in the quantity and price input fields when they are set to blank. Perhaps logic should be implemented to prevent the fields from being updated to blank but as of right now its allowed which cause the errors to appear which make the screen look very messy. This patch basically cleans up the screen if either of those scenarios occur. To reproduce just update the quantity or price of a return item to blank.
        Hide
        ofbizzer Christian Carlow added a comment -

        Updated patch again to prevent OrderView.groovy getReturnableItems error which prevents page from displaying when returnQuantity gets set to blank due to getReturnableQuantity in OrderReturnServices.java.

        Show
        ofbizzer Christian Carlow added a comment - Updated patch again to prevent OrderView.groovy getReturnableItems error which prevents page from displaying when returnQuantity gets set to blank due to getReturnableQuantity in OrderReturnServices.java.
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Thanks Christian,

        Your patch is in
        trunk r1666836
        R14.12 r1666837
        R13.07 r1666838
        R12.04 r1666839

        Show
        jacques.le.roux Jacques Le Roux added a comment - Thanks Christian, Your patch is in trunk r1666836 R14.12 r1666837 R13.07 r1666838 R12.04 r1666839

          People

          • Assignee:
            jacques.le.roux Jacques Le Roux
            Reporter:
            ofbizzer Christian Carlow
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development