|
Author: jleroux
Date: Sat Dec 29 18:11:02 2012 New Revision: 1426798 URL: http://svn.apache.org/viewvc?rev=1426798&view=rev Log: "Applied fix from trunk for revision: 1426787 " ------------------------------------------------------------------------ r1426787 | jleroux | 2012-12-29 18:14:16 +0100 (sam., 29 déc. 2012) | 20 lines Fix an issue reported by Duc Trung NGUYEN on user ML: > I tried to test the theme multiflex (for ecommerce) and detect a small > problem as the following: (USING http://demo-trunk.ofbiz.apache.org) > > 1.connect to catalog manager > 2.go to "store" tab and select the store with id 9000 > 3.change its viual theme to MULTIFLEX > > 4.open the ecommerce site (it's ok with new theme) > 5.select a catagory from the categories menu on the left side. > 6.select another language > > And the problem come up: > The theme now is EC_DEFAULT instead of MULTIFLEX It was related to a not finished change introduced with http://svn.apache.org/viewvc?view=revision&revision=1128983 I mean the addCheckValue request and sequel... It was just missing the productStore, I added it in the category.groovy script I briefly tried to do it in a simpler way using a redirected parameter on setSessionLocale request, but got issue, gave up and simply reused the same way but moved the simple method from AffiliateSimpleEvents.xml to CustomerEvents.xml ------------------------------------------------------------------------ Modified: ofbiz/branches/release12.04/ (props changed) ofbiz/branches/release12.04/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Category.groovy ofbiz/branches/release12.04/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml ofbiz/branches/release12.04/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/misc/AffiliateSimpleEvents.xml ofbiz/branches/release12.04/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/controller.xml ofbiz/branches/release12.04/specialpurpose/ecommerce/widget/CatalogScreens.xml Propchange: ofbiz/branches/release12.04/ ------------------------------------------------------------------------------ Merged /ofbiz/trunk:r1426787 Modified: ofbiz/branches/release12.04/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Category.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Category.groovy?rev=1426798&r1=1426797&r2=1426798&view=diff ============================================================================== --- ofbiz/branches/release12.04/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Category.groovy (original) +++ ofbiz/branches/release12.04/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Category.groovy Sat Dec 29 18:11:02 2012 @@ -27,6 +27,7 @@ import org.ofbiz.entity.*; import org.ofbiz.product.catalog.*; import org.ofbiz.product.category.CategoryWorker; import org.ofbiz.product.category.CategoryContentWrapper; +import org.ofbiz.product.store.ProductStoreWorker; detailScreen = "categorydetail"; catalogName = CatalogWorker.getCatalogName(request); @@ -34,6 +35,8 @@ catalogName = CatalogWorker.getCatalogNa productCategoryId = request.getAttribute("productCategoryId") ?: parameters.category_id; context.productCategoryId = productCategoryId; +context.productStore = ProductStoreWorker.getProductStore(request); + pageTitle = null; metaDescription = null; metaKeywords = null; Modified: ofbiz/branches/release12.04/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml?rev=1426798&r1=1426797&r2=1426798&view=diff ============================================================================== --- ofbiz/branches/release12.04/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml (original) +++ ofbiz/branches/release12.04/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml Sat Dec 29 18:11:02 2012 @@ -1314,4 +1314,9 @@ under the License. <default-message property="CommonGenericServiceSuccessMessage" resource="CommonUiLabels"></default-message> </call-service> </simple-method> + <simple-method method-name="fromSetSessionLocale" + short-description="Add field to request for redirection after SetSessionLocale" login-required="false"> + <set field="fromSetSessionLocale" value="true"/> + <field-to-request field="fromSetSessionLocale" request-name="fromSetSessionLocale"/> + </simple-method> </simple-methods> Modified: ofbiz/branches/release12.04/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/misc/AffiliateSimpleEvents.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/misc/AffiliateSimpleEvents.xml?rev=1426798&r1=1426797&r2=1426798&view=diff ============================================================================== --- ofbiz/branches/release12.04/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/misc/AffiliateSimpleEvents.xml (original) +++ ofbiz/branches/release12.04/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/misc/AffiliateSimpleEvents.xml Sat Dec 29 18:11:02 2012 @@ -126,10 +126,5 @@ under the License. <call-service service-name="createAffiliate" in-map-name="af_context"> <default-message resource="EcommerceUiLabels" property="EcommerceAffiliateCreatedSuccessfully"/> </call-service> - - </simple-method> - <simple-method method-name="addCheckValue" short-description="Add field to request for investigation purpose" login-required="false"> - <set field="checkValue" value="check" type="PlainString"/> - <field-to-request field="checkValue" request-name="checkValue"/> </simple-method> </simple-methods> Modified: ofbiz/branches/release12.04/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/controller.xml?rev=1426798&r1=1426797&r2=1426798&view=diff ============================================================================== --- ofbiz/branches/release12.04/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/controller.xml (original) +++ ofbiz/branches/release12.04/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/controller.xml Sat Dec 29 18:11:02 2012 @@ -132,7 +132,7 @@ under the License. <request-map uri="setSessionLocale"> <security https="false" auth="false"/> <event type="java" path="org.ofbiz.common.CommonEvents" invoke="setSessionLocale"/> - <response name="success" type="request-redirect" value="checkValue"/> + <response name="success" type="request-redirect" value="fromSetSessionLocale"/> <response name="error" type="view" value="main"/> </request-map> @@ -1966,8 +1966,8 @@ under the License. <security https="true" auth="false"/> <response name="success" type="view" value="productCategoryList" save-current-view="true"/> </request-map> - <request-map uri="checkValue"> - <event type="simple" path="component://ecommerce/script/org/ofbiz/ecommerce/misc/AffiliateSimpleEvents.xml" invoke="addCheckValue"/> + <request-map uri="fromSetSessionLocale"> + <event type="simple" path="component://ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml" invoke="fromSetSessionLocale"/> <response name="success" type="view-last" value="main"/> <response name="error" type="view" value="main"/> </request-map> Modified: ofbiz/branches/release12.04/specialpurpose/ecommerce/widget/CatalogScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/specialpurpose/ecommerce/widget/CatalogScreens.xml?rev=1426798&r1=1426797&r2=1426798&view=diff ============================================================================== --- ofbiz/branches/release12.04/specialpurpose/ecommerce/widget/CatalogScreens.xml (original) +++ ofbiz/branches/release12.04/specialpurpose/ecommerce/widget/CatalogScreens.xml Sat Dec 29 18:11:02 2012 @@ -534,7 +534,7 @@ under the License. <property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/> <property-map resource="OrderUiLabels" map-name="uiLabelMap" global="true"/> <script location="component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Category.groovy"/> - <set field="check" type="PlainString" value="${groovy: return request.getAttribute('checkValue');}"/> + <set field="fromSetSessionLocale" value="${groovy: return request.getAttribute('fromSetSessionLocale');}"/> <set field="visualThemeId" from-field="productStore.visualThemeId" default-value="EC_DEFAULT"/> <service service-name="getVisualThemeResources"> <field-map field-name="visualThemeId"/> @@ -545,7 +545,7 @@ under the License. <widgets> <section> <condition> - <if-compare operator="equals" value="check" field="check" type="PlainString"/> + <if-compare operator="equals" value="true" field="fromSetSessionLocale"/> </condition> <widgets> <include-screen name="category"/> |
| Free forum by Nabble | Edit this page |
