Troubleshooting: Resetting passwords not working after local store migration

After migrating a store from an earlier version of WebSphere Commerce to HCL Commerce Version 9.1, otherwise known as a migrated local store, password resets no longer function in Management Center for HCL Commerce or on the Aurora-based storefront.

Problem

In a migrated local store, resetting passwords for users in Management Center for HCL Commerce or on the Aurora-based storefront no longer works as anticipated.

This is due to the fact that the RemoteStoreConfiguration configuration is removed from the WC_installdir/xml/config/com.ibm.commerce.foundation/wc-component.xml configuration file for migrated local stores.

Solution

To correct this issue, make the following changes within your custom Transaction server Docker container:
  1. Copy the PasswordChangeConfirmationNotify.jsp Java Server Page file to the following locations:
    • Stores.war/EmailTemplates/User/
    • Stores.war/AuroraB2BStorefrontAssetStore/EmailTemplates/User/
    • Stores.war/AuroraStorefrontAssetStore/EmailTemplates/User/
  2. Modify the Stores.war/WEB-INF/classes/struts-wcs-stores-custom.xml configuration file.
    Add the following results code between the PasswordNotifyView and PasswordReEnterErrorView result blocks.
    <result name="PasswordResetConfirmationNotifyView/10651/-3" type="wcsstore">
    	<param name="implClassName">com.ibm.commerce.messaging.viewcommands.MessagingViewCommandImpl</param>
    	<param name="interfaceName">com.ibm.commerce.messaging.viewcommands.MessagingViewCommand</param>
    	<param name="location">/EmailTemplates/User/PasswordChangeConfirmationNotify.jsp</param>
    </result>
    <result name="PasswordResetConfirmationNotifyView/10701/-3" type="wcsstore">
    	<param name="implClassName">com.ibm.commerce.messaging.viewcommands.MessagingViewCommandImpl</param>
    	<param name="interfaceName">com.ibm.commerce.messaging.viewcommands.MessagingViewCommand</param>
    	<param name="location">/EmailTemplates/User/PasswordChangeConfirmationNotify.jsp</param>
    </result>
    
    Note: Replace 10651 and 10701 with the AuroraStorefrontAssetStore and AuroraB2BStorefrontAssetStore STOREENT_ID values for your deployment.
  3. Modify the Stores.war/WEB-INF/classes/struts-wcs-stores.xml configuration file.
    • Add the following result between the results named PasswordNotifyView and PickBatchGenerateErrorView.
      <result name="PasswordResetConfirmationNotifyView/0/-3">
      	<param name="direct">true</param>
      	<param name="implClassName">com.ibm.commerce.messaging.viewcommands.MessagingViewCommandImpl</param>
      	<param name="interfaceName">com.ibm.commerce.messaging.viewcommands.MessagingViewCommand</param>
      	<param name="location">/EmailTemplates/User/PasswordChangeConfirmationNotify.jsp</param>
      	<param name="properties">storeDir=no</param>
      	<param name="resourceClassName">com.ibm.commerce.messaging.viewcommands.MessagingViewCommandImpl</param>
      </result>
      
    • Add the following action between the actions named defaultStoreAction and *.jsp.
      <action class="com.ibm.commerce.struts.v2.BaseAction" name="PasswordResetConfirmationNotifyView">
      	<param name="https">0:1</param>
      </action>
      
  4. Modify the following two property files:
    • ts.ear/properties/PasswordResetNotification_en_US.properties
    • ts.ear/properties/PasswordResetNotification.properties
    Add the following message.
    PasswordResetNotification.MessagePart3=has been changed
  5. Create a piece of Marketing Content and link it to an E-Marketing Spot by running the following SQL queries against your database.
    1. Create the Marketing Content.
      INSERT INTO COLLATERAL (COLLATERAL_ID,STOREENT_ID,COLLTYPE_ID,NAME,URL,FIELD1,FIELD2,BEHAVIOR,UIDISPLAYABLE,MANAGINGTOOL,OVRMKTLIMIT,OPTCOUNTER) VALUES ((SELECT MAX(COLLATERAL_ID) AS COLLATERALID
      FROM COLLATERAL)+1, (SELECT STOREENT_ID FROM STOREENT WHERE STOREENT.IDENTIFIER='AuroraB2BESite'), 2, 'PasswordChangeConfirmationNotifyCenter_Content4',NULL,NULL, NULL,1,NULL,NULL,0,0);
      
    2. Add a Description and Values to the Marketing Content.
      INSERT INTO COLLDESC VALUES ((SELECT MAX(COLLATERAL_ID) AS COLLATERALID
      FROM COLLATERAL), -1,NULL, '<p> Dear [userName],<br /><br /><br />This is to confirm that your password has been updated. <br /><br /><br />Thanks,<br />The [storeName] team</p><br />',NULL,NULL,NULL, 0);
      
    3. Create a new E-Marketing Spot.
      INSERT INTO WCS.EMSPOT
      (EMSPOT_ID, STOREENT_ID, NAME, DESCRIPTION, SUPPORTEDTYPES, DEFAULTRULE, USAGETYPE,  UIDISPLAYABLE, MANAGINGTOOL, OPTCOUNTER)
      VALUES((SELECT MAX(EMSPOT_ID) AS EMSPOTID
      FROM EMSPOT)+1, (SELECT STOREENT_ID FROM STOREENT WHERE STOREENT.IDENTIFIER='AuroraB2BESite'),
      'PasswordChangeConfirmationNotifyCenter_Content4', '', NULL, NULL, 'MARKETING', NULL, NULL, 0);
      
    4. Attach the E-Marketing Spot to the Default Content Section.
      INSERT INTO WCS.DMEMSPOTDEF
      (DMEMSPOTDEF_ID, EMSPOT_ID, STOREENT_ID, CONTENTTYPE, CONTENT, "SEQUENCE", OPTCOUNTER)
      VALUES((SELECT MAX(DMEMSPOTDEF_ID) AS DMEMSPOTDEFID
      FROM WCS.DMEMSPOTDEF)+1, (SELECT MAX(EMSPOT_ID) AS EMSPOTID
      FROM EMSPOT), (SELECT STOREENT_ID FROM STOREENT WHERE STOREENT.IDENTIFIER='AuroraB2BESite'), 'MarketingContent',
      (SELECT MAX(COLLATERAL_ID) AS COLLATERALID
      FROM COLLATERAL), 0.0, 1);
      
    5. Repeat steps a. through d., but in each SQL statement, replace AuroraB2BESite with AuroraESite.
  6. Restart the Transaction server.

The password reset function on the Aurora-based storefront, as well as within Management Center now function as anticipated.