Author: jleroux
Date: Tue Feb 28 10:05:01 2017
New Revision: 1784709
URL:
http://svn.apache.org/viewvc?rev=1784709&view=revLog:
"Applied fix from trunk framework for revision: 1784708"
------------------------------------------------------------------------
r1784708 | jleroux | 2017-02-28 11:02:25 +0100 (mar. 28 févr. 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
------------------------------------------------------------------------
Modified:
ofbiz/branches/release16.11/ (props changed)
ofbiz/branches/release16.11/applications/order/template/entry/catalog/BreadCrumbs.ftl
Propchange: ofbiz/branches/release16.11/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 28 10:05:01 2017
@@ -10,5 +10,5 @@
/ofbiz/branches/json-integration-refactoring:1634077-1635900
/ofbiz/branches/multitenant20100310:921280-927264
/ofbiz/branches/release13.07:1547657
-/ofbiz/ofbiz-framework/trunk:1783202,1783388,1784549,1784558
+/ofbiz/ofbiz-framework/trunk:1783202,1783388,1784549,1784558,1784708
/ofbiz/trunk:1770481,1770490,1770540,1771440,1771448,1771516,1771935,1772346,1772880,1774772,1775441,1779724,1780659,1781109,1781125,1781979,1782498,1782520
Modified: ofbiz/branches/release16.11/applications/order/template/entry/catalog/BreadCrumbs.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release16.11/applications/order/template/entry/catalog/BreadCrumbs.ftl?rev=1784709&r1=1784708&r2=1784709&view=diff==============================================================================
--- ofbiz/branches/release16.11/applications/order/template/entry/catalog/BreadCrumbs.ftl (original)
+++ ofbiz/branches/release16.11/applications/order/template/entry/catalog/BreadCrumbs.ftl Tue Feb 28 10:05:01 2017
@@ -27,6 +27,7 @@ under the License.
</li>
</#if>
<#-- Show the category branch -->
+ <#if session.getAttribute("_BREAD_CRUMB_TRAIL_")??>
<#assign crumbs = Static["org.apache.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>