You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2017/02/28 10:38:58 UTC

svn commit: r1784721 - in /ofbiz/branches: release13.07/applications/order/webapp/ordermgr/entry/catalog/ release14.12/applications/order/webapp/ordermgr/entry/catalog/ release15.12/applications/order/webapp/ordermgr/entry/catalog/

Author: jleroux
Date: Tue Feb 28 10:38:58 2017
New Revision: 1784721

URL: http://svn.apache.org/viewvc?rev=1784721&view=rev
Log:
"Applied fix from trunk framework for revision: 1784708"  (tree conflict handled by and)
------------------------------------------------------------------------
r1784708 | jleroux | 2017-02-28 11:02:25 +0100 (mar. 28 f\uadf2. 2017) | 21 lignes

Fixed: The ecommerce breadcrumb fails when you come from the catalog product 
link
(OFBIZ-9234)

To reproduce
# Get to https://demo-stable.ofbiz.apache.org/catalog/control/EditProduct?productId=GZ-1000
# Click on the "Product Page" button

You may notice an error which does appear erratically but most of the time, 
same on trunk demo and locally. 

This happens because sometimes the _BREAD_CRUMB_TRAIL_ session attribute is 
empty or null. "Why not alway?" you might ask. I had no time to investigate but 
I guess because there is no bread crum trail when coming from catalog, and for 
some weird reasons, it's sometimes there.

Anyway my fix is simple, if there is no _BREAD_CRUMB_TRAIL_  in session 
I bypass the bread crum block in BreadCrumbs.ftl. It's not perfect but look far 
better


BTW for another reason, when coming from catalog/product or not, the ecommerce webapp is 
broken in R14/15
------------------------------------------------------------------------

Modified:
    ofbiz/branches/release13.07/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl
    ofbiz/branches/release14.12/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl
    ofbiz/branches/release15.12/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl

Modified: ofbiz/branches/release13.07/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl?rev=1784721&r1=1784720&r2=1784721&view=diff
==============================================================================
--- ofbiz/branches/release13.07/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl (original)
+++ ofbiz/branches/release13.07/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl Tue Feb 28 10:38:58 2017
@@ -27,6 +27,7 @@ under the License.
     </li>
 </#if>    
     <#-- Show the category branch -->
+  <#if session.getAttribute("_BREAD_CRUMB_TRAIL_")??>
     <#assign crumbs = Static["org.ofbiz.product.category.CategoryWorker"].getTrail(request)/>
     <#list crumbs as crumb>
          <#if catContentWrappers?exists && catContentWrappers[crumb]?exists>
@@ -57,6 +58,7 @@ under the License.
             <#assign previousCategoryId = crumb />
          </#if>
     </#list>    
+  </#if>
     <#-- Show the product, if there is one -->
     <#if productContentWrapper?exists>
       <#if isDefaultTheme>        

Modified: ofbiz/branches/release14.12/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/release14.12/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl?rev=1784721&r1=1784720&r2=1784721&view=diff
==============================================================================
--- ofbiz/branches/release14.12/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl (original)
+++ ofbiz/branches/release14.12/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl Tue Feb 28 10:38:58 2017
@@ -27,6 +27,7 @@ under the License.
     </li>
 </#if>    
     <#-- Show the category branch -->
+  <#if session.getAttribute("_BREAD_CRUMB_TRAIL_")??>
     <#assign crumbs = Static["org.ofbiz.product.category.CategoryWorker"].getTrail(request)/>
     <#list crumbs as crumb>
          <#if catContentWrappers?? && catContentWrappers[crumb]??>
@@ -57,6 +58,7 @@ under the License.
             <#assign previousCategoryId = crumb />
          </#if>
     </#list>    
+  </#if>
     <#-- Show the product, if there is one -->
     <#if productContentWrapper??>
       <#if isDefaultTheme>

Modified: ofbiz/branches/release15.12/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/release15.12/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl?rev=1784721&r1=1784720&r2=1784721&view=diff
==============================================================================
--- ofbiz/branches/release15.12/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl (original)
+++ ofbiz/branches/release15.12/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl Tue Feb 28 10:38:58 2017
@@ -27,6 +27,7 @@ under the License.
     </li>
 </#if>    
     <#-- Show the category branch -->
+  <#if session.getAttribute("_BREAD_CRUMB_TRAIL_")??>
     <#assign crumbs = Static["org.ofbiz.product.category.CategoryWorker"].getTrail(request)/>
     <#list crumbs as crumb>
          <#if catContentWrappers?? && catContentWrappers[crumb]??>
@@ -57,6 +58,7 @@ under the License.
             <#assign previousCategoryId = crumb />
          </#if>
     </#list>    
+  </#if>
     <#-- Show the product, if there is one -->
     <#if productContentWrapper??>
       <#if isDefaultTheme>