Feature Pack 5

Enabling interim fix JR47591

Enable this fix if you have issues with associating attachments to catalog entries in Management Center.

Interim fix JR47591 updates the Management Center Catalogs tool so that the name of the attachment relationship (that is displayed in the storefront in EJB and search based stores) saves to the correct table, ATCHRELDSC. To enable this interim fix, you must implement and deploy changes to OpenLaszlo code that is reserved for client customization.

Before you begin

Install the cumulative interim fix for Feature Pack 5, JR53048.fep.

Procedure

Complete the following manual steps to apply the interim fix to WebSphere Commerce Developer.
  1. Start WebSphere Commerce Developer.
  2. Open the J2EE perspective and select the Enterprise Explorer view.
  3. Select LOBTools > WebContent > config > commerce > catalog > listViewDefinitions.
  4. Open the AttachmentReferenceGrid.def file.
  5. Search for the following grid column definition for the object grid: "catAttachmentReferenceGrid":
     <GridText languageSensitive="true"      
    	name="attachmentName"
    	text="${attachmentResources.attachmentName}"      
    	width="230">
    	 ...
    </GridText>
  6. Replace this grid column definition with the following code snippet:
    <GridText name="attachmentGeneralName"
    	propertyName="name"
    	languageSensitive="true"
    	objectPath="AttachmentGroup/AttachmentDescription"
    	text="${attachmentResources.attachmentAdministrativeName}" width="230" visible="true"/>
    
    <GridText name="attachmentName"
    	editable="true" languageSensitive="true"
    	objectPath="AttachmentReferenceDescription"
    	propertyName="name"
    	text="${attachmentResources.attachmentDisplayName}"
    	width="230"/>
  7. Go to LOBTools > src/com/ibm/commerce/attachment/client/lobtools/properties
  8. Open AttachmentLOB_en_US.properties and add the following 2 new strings:
    attachmentDisplayName=Display name     
    attachmentAdministrativeName=Administrative name
  9. Go to LOBTools > WebContent > WEB-INF > src > lzx > commerce > attachment > restricted
  10. Open AttachmentManagementResourceBundle.lzx and add the following code snippet:
    <wcfResourceBundleKey name="attachmentDisplayName"/>      
    <wcfResourceBundleKey name="attachmentAdministrativeName"/> 
  11. Go to LOBTools > WebContent > WEB-INF > config > com.ibm.commerce.catalog.
  12. Open wc-catalog-clientobjects.xml
  13. Find the following definitions, and add the mappings that are in bold to the file.
    <_config:URLParameterGroup name="CatalogGroupAttachmentReferenceDescription"
    noun="CatalogGroup">
    <_config:URLParameter name="attachmentRefId"
    nounElement="/AttachmentReference/AttachmentReferenceIdentifier/UniqueID" key="true" return="true" />
    <_config:URLParameter name="name"
    nounElement="/AttachmentReference/AttachmentReferenceDescription/Name" />
    <_config:URLParameter name="sdesc"
    nounElement="/AttachmentReference/AttachmentReferenceDescription/ShortDescription" />
    <_config:URLParameter name="ldesc"
    nounElement="/AttachmentReference/AttachmentReferenceDescription/LongDescription" />
    <_config:URLParameter name="languageId"
    nounElement="/AttachmentReference/AttachmentReferenceDescription/@language" key="true" return="true"/>
    </_config:URLParameterGroup>
    
    <_config:URLParameterGroup name="CatalogAttachmentReferenceDescription"
    noun="Catalog">
    <_config:URLParameter name="attachmentRefId"
    nounElement="/AttachmentReference/AttachmentReferenceIdentifier/UniqueID" key="true" return="true" />
    <_config:URLParameter name="name"
    nounElement="/AttachmentReference/AttachmentReferenceDescription/Name" />
    <_config:URLParameter name="sdesc"
    nounElement="/AttachmentReference/AttachmentReferenceDescription/ShortDescription" />
    <_config:URLParameter name="ldesc"
    nounElement="/AttachmentReference/AttachmentReferenceDescription/LongDescription" />
    <_config:URLParameter name="languageId"
    nounElement="/AttachmentReference/AttachmentReferenceDescription/@language" key="true" return="true"/>
    </_config:URLParameterGroup>
    
    <_config:URLParameterGroup name="CatalogEntryAttachmentReferenceDescription"
    noun="CatalogEntry">
    <_config:URLParameter name="attachmentRefId"
    nounElement="/AttachmentReference/AttachmentReferenceIdentifier/UniqueID" key="true" return="true" />
    <_config:URLParameter name="name"
    nounElement="/AttachmentReference/AttachmentReferenceDescription/Name" />
    <_config:URLParameter name="sdesc"
    nounElement="/AttachmentReference/AttachmentReferenceDescription/ShortDescription" />
    <_config:URLParameter name="ldesc"
    nounElement="/AttachmentReference/AttachmentReferenceDescription/LongDescription" />
    <_config:URLParameter name="languageId"
    nounElement="/AttachmentReference/AttachmentReferenceDescription/@language" key="true" return="true"/>
    </_config:URLParameterGroup>
  14. Right-click the LOBTools project and select Build OpenLaszlo Project.
  15. Deploy the changes to your WebSphere Commerce Server:
    1. Export the LOBTools project:
      1. In the Enterprise Explorer view, right-click LOBTools and select Export > WAR file.
      2. Click Browse and select a destination.
      3. Click Finish.
    2. Deploy the new LOBTools.war file on the target WebSphere Commerce Server.
      For information about deploying, see Deploying a WAR module.
The search indexing also needs to be updated to look for the attachment name, short description, and long description in the ATCHRELDSC table instead of the ATCHTGTDSC table.
  1. Go to the following directory: Search_home/pre-processConfig
    Note: If the directory does not exist, or if no subdirectories exist that start with MC_masterCatalogId, then the following steps are not required.
  2. Perform the following steps for each of the MC_masterCatalogId directories:
    1. Go to Search_home/pre-processConfig/MC_masterCatalogId/db_type
    2. Rename the wc-dataimport-preprocess-unstructured-content.xml file to wc-dataimport-preprocess-unstructured-content.xml.orig
    3. Go to WC_installdirWCDE_installdir/components/foundation/samples/dataimport/catalog/db_type
    4. Copy the wc-dataimport-preprocess-unstructured-content.xml file to Search_home/pre-processConfig/MC_masterCatalogId/db_type
    5. Find the index scope tag by running the following SQL statement:
      select indexscope, indextype, config from srchconf 
      where indexscope='masterCatalogId' and indextype='CatalogEntry'
      For example, if IndexScopeTag=0, then the tag is 0.
    6. Open the wc-dataimport-preprocess-unstructured-content.xml file under Search_home/pre-processConfig/MC_masterCatalogId/db_type in a text editor.
    7. Replace all occurrences of #INDEX_SCOPE_TAG# with the index scope tag.
    8. Replace all occurrences of #MASTER_CATALOG_ID# with the master catalog ID.
    9. Check the table names in the file. For example, TI_CATENTREL_0 if the index scope tag is 0.