Samples > Sample stores > Consumer direct sample store > IBM Gift Center for the Consumer direct sample store
Troubleshoot: Error creating a GiftRegistry in the migrated environment
You cannot create a GiftRegistry on the migrated environment.
Problem
After migrating from WebSphere Commerce Version 6 to WebSphere Commerce v7, you cannot create a GiftRegistry in the migrated environment.
Solution
Some of the GiftRegistry JSP files used for composing e-mails and WebSphere MQ messages need to be changed.
- In the WC_EAR/Stores.war/ConsumerDirect/Messages/GiftRegistryAnnouncementTemplate1.jsp and WC_EAR/Stores.war/ConsumerDirect/Messages/GiftRegistryAnnouncementTemplate2.jsp file:
- Search for:
<wcbase:useBean id="storeDataBean" classname="com.ibm.commerce.common.beans.StoreDataBean" scope="page"> <c:set target="${storeDataBean}" property="storeId" value="${WCParam.storeId}" /> </wcbase:useBean>
Replace with:
<wcbase:useBean id="storeDataBean" classname="com.ibm.commerce.common.beans.StoreDataBean" scope="page"/>
- Add the following after the preceding code:
<c:set target="${WCParam}" property="storeId" value="${storeDataBean.storeId}" /> <c:set target="${WCParam}" property="catalogId" value="${storeDataBean.masterCatalogDataBean.catalogReferenceNumber}"/>The changed snippet should look like:
<wcbase:useBean id="storeDataBean" classname="com.ibm.commerce.common.beans.StoreDataBean" scope="page"/> <c:set target="${WCParam}" property="storeId" value="${storeDataBean.storeId}" /> <c:set target="${WCParam}" property="catalogId" v alue="${storeDataBean.masterCatalogDataBean.catalogReferenceNumber}"/>
- In the WC_EAR/Stores.war/ConsumerDirect/Messages/UpdateGiftRegistryMessage.jsp file:
- Search for </c:if> tag.
- Move the last </c:if> tag before the </UpdateGiftRegistryBOD> tag. It should look like:
</c:if> </UpdateGiftRegistryBOD>
- In the WC_EAR/Stores.war/ConsumerDirect/Messages/GiftRegistryConfirmationNotify.jsp file:
- Search for:
<wcbase:useBean id="storeDataBean" classname="com.ibm.commerce.common.beans.StoreDataBean" scope="page"> <c:set target="${storeDataBean}" property="storeId" value="${WCParam.storeId}" /> </wcbase:useBean>
- Replace with:
<wcbase:useBean id="storeDataBean" classname="com.ibm.commerce.common.beans.StoreDataBean" scope="page"/> <c:set target="${WCParam}" property="storeId" value="${storeDataBean.storeId}" /> <c:set target="${WCParam}" property="catalogId" value="${storeDataBean.masterCatalogDataBean.catalogReferenceNumber}"/>
- Search for:
<c:import url="${jspStoreDir}include/RegistryCreateEMarketingSpotDisplay.jsp">The content should look like:
<c:import url="${jspStoreDir}include/RegistryCreateEMarketingSpotDisplay.jsp"> <c:param name="emsName" value="GiftRegistryConfirmation" /> <c:param name="registrantAccessKey" value="${grDataBean.registrantAccessKey}" /> <c:param name="externalId" value="${GiftRegistryVO.externalId}" /> <c:param name="maxNumDisp" value="8" /> <c:param name="catalogId" value="${WCParam.catalogId}" /> <c:param name="storeId" value="${WCParam.storeId}"/> <c:param name="maxItemsInRow" value="4" /> <c:param name="maxColInRow" value="3" /> </c:import>Add to the above code a new parameter as shown in bold.
- In the WC_EAR/Stores.war/ConsumerDirect/include/RegistryCreateEMarketingSpotDisplay.jsp file:
- Search for <%}catch(Exception e){ } %> and move the tag between the <c:if> tags at the end of the JSP file.