Author: jleroux
Date: Sun Aug 19 15:30:42 2018
New Revision: 1838381
URL:
http://svn.apache.org/viewvc?rev=1838381&view=revLog:
Fixed: Search in Ecommerce no longer works
(OFBIZ-10531)
I guess that when I worked on OFBIZ-9164 I broke that.
I found 3 occurences where the dispatcher was not in the session because the
session comes from the request and the request has not it in.
Modified:
ofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/entry/catalog/KeywordSearch.groovy
ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/find/KeywordSearch.groovy
ofbiz/ofbiz-plugins/trunk/ecommerce/groovyScripts/catalog/LayeredNavigation.groovy
Modified: ofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/entry/catalog/KeywordSearch.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/entry/catalog/KeywordSearch.groovy?rev=1838381&r1=1838380&r2=1838381&view=diff==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/entry/catalog/KeywordSearch.groovy (original)
+++ ofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/entry/catalog/KeywordSearch.groovy Sun Aug 19 15:30:42 2018
@@ -28,6 +28,7 @@ import org.apache.ofbiz.product.product.
module = "KeywordSearch.groovy"
// note: this can be run multiple times in the same request without causing problems, will check to see on its own if it has run again
+request.getSession().setAttribute("dispatcher",dispatcher)
ProductSearchSession.processSearchParameters(parameters, request)
prodCatalogId = CatalogWorker.getCurrentCatalogId(request)
result = ProductSearchSession.getProductSearchResult(request, delegator, prodCatalogId)
Modified: ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/find/KeywordSearch.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/find/KeywordSearch.groovy?rev=1838381&r1=1838380&r2=1838381&view=diff==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/find/KeywordSearch.groovy (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/find/KeywordSearch.groovy Sun Aug 19 15:30:42 2018
@@ -24,6 +24,7 @@ import org.apache.ofbiz.product.product.
module = "KeywordSearch.groovy"
// note: this can be run multiple times in the same request without causing problems, will check to see on its own if it has run again
+request.getSession().setAttribute("dispatcher",dispatcher)
ProductSearchSession.processSearchParameters(parameters, request)
prodCatalogId = CatalogWorker.getCurrentCatalogId(request)
result = ProductSearchSession.getProductSearchResult(request, delegator, prodCatalogId)
Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/groovyScripts/catalog/LayeredNavigation.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ecommerce/groovyScripts/catalog/LayeredNavigation.groovy?rev=1838381&r1=1838380&r2=1838381&view=diff==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ecommerce/groovyScripts/catalog/LayeredNavigation.groovy (original)
+++ ofbiz/ofbiz-plugins/trunk/ecommerce/groovyScripts/catalog/LayeredNavigation.groovy Sun Aug 19 15:30:42 2018
@@ -47,6 +47,7 @@ if (!parameters.clearSearch || !"N".equa
ProductSearchSession.searchClear(session)
}
+request.getSession().setAttribute("dispatcher",dispatcher)
ProductSearchSession.processSearchParameters(parameters, request)
prodCatalogId = CatalogWorker.getCurrentCatalogId(request)
result = ProductSearchSession.getProductSearchResult(request, delegator, prodCatalogId)