Author: jleroux
Date: Fri Nov 27 07:25:06 2009
New Revision: 884758
URL:
http://svn.apache.org/viewvc?rev=884758&view=revLog:
A patch from Arpit Singh Pandya "Error is not Handle for Inventory, if wrong productId is passed, it is breaking the ftl." (
https://issues.apache.org/jira/browse/OFBIZ-3265) - OFBIZ-3265
Steps to generate the problem
– Go to
https://demo.ofbiz.org/catalog/control/main– In Right bar at Search Products section Leave Product Id.
– Select "Inventory" in "Product Jump" DropDown.
It is breaking the ProductInventorySummary.ftl and EditProductInventoryItems.ftl code.
Modified:
ofbiz/trunk/applications/product/webapp/catalog/product/EditProductInventoryItems.ftl
ofbiz/trunk/applications/product/webapp/catalog/product/ProductInventorySummary.ftl
Modified: ofbiz/trunk/applications/product/webapp/catalog/product/EditProductInventoryItems.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/product/EditProductInventoryItems.ftl?rev=884758&r1=884757&r2=884758&view=diff==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/product/EditProductInventoryItems.ftl (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/product/EditProductInventoryItems.ftl Fri Nov 27 07:25:06 2009
@@ -18,6 +18,7 @@
-->
<#assign externalKeyParam = "&externalLoginKey=" + requestAttributes.externalLoginKey?if_exists>
<div class="screenlet">
+ <#if product?exists>
<div class="screenlet-title-bar">
<h3>${uiLabelMap.ProductInventoryItems} ${uiLabelMap.CommonFor} <#if product?exists>${(product.internalName)?if_exists} </#if> [${uiLabelMap.CommonId}:${productId?if_exists}]</h3>
</div>
@@ -111,4 +112,7 @@
</table>
</#if>
</div>
+ <#else>
+ <h2>${uiLabelMap.ProductProductNotFound} ${productId?if_exists}!</h2>
+ </#if>
</div>
\ No newline at end of file
Modified: ofbiz/trunk/applications/product/webapp/catalog/product/ProductInventorySummary.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/product/ProductInventorySummary.ftl?rev=884758&r1=884757&r2=884758&view=diff==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/product/ProductInventorySummary.ftl (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/product/ProductInventorySummary.ftl Fri Nov 27 07:25:06 2009
@@ -22,6 +22,7 @@
<a href="EditProductInventoryItems?productId=${productId}&showAllFacilities=Y" class="buttontext">${uiLabelMap.ProductShowAllFacilities}</a>
</#if>
<div class="screenlet">
+ <#if product?exists>
<div class="screenlet-title-bar">
<h3>${uiLabelMap.ProductInventorySummary}</h3>
</div>
@@ -105,4 +106,7 @@
</#list>
</table>
</div>
+ <#else>
+ <h2>${uiLabelMap.ProductProductNotFound} ${productId?if_exists}!</h2>
+ </#if>
</div>