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
For information about
how to install an interim fix, see
Procedure
Complete the following manual steps to apply the interim fix to WebSphere
Commerce Developer.
- Start WebSphere Commerce Developer.
- Open the J2EE perspective and select the Enterprise Explorer view.
- Select LOBTools > WebContent > config > commerce > catalog > listViewDefinitions.
- Open the AttachmentReferenceGrid.def file.
-
Search for the following grid column definition for the object grid:
"
catAttachmentReferenceGrid
":<GridText languageSensitive="true" name="attachmentName" text="${attachmentResources.attachmentName}" width="230"> ... </GridText>
-
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"/>
- Go to LOBTools > src/com/ibm/commerce/attachment/client/lobtools/properties
-
Open AttachmentLOB_en_US.properties and add the following
2 new strings:
attachmentDisplayName=Display name attachmentAdministrativeName=Administrative name
- Go to LOBTools > WebContent > WEB-INF > src > lzx > commerce > attachment > restricted
-
Open AttachmentManagementResourceBundle.lzx and add the
following code snippet:
<wcfResourceBundleKey name="attachmentDisplayName"/> <wcfResourceBundleKey name="attachmentAdministrativeName"/>
- Go to LOBTools > WebContent > WEB-INF > config > com.ibm.commerce.catalog.
- Open wc-catalog-clientobjects.xml
-
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> - Right-click the LOBTools project and select Build OpenLaszlo Project.
-
Deploy the changes to your WebSphere Commerce Server:
-
Export the LOBTools project:
- In the Enterprise Explorer view, right-click LOBTools and select Export > WAR file.
- Click Browse and select a destination.
- Click Finish.
-
Deploy the new LOBTools.war file on the target
WebSphere Commerce Server.
For information about deploying, see Deploying a WAR module.
-
Export the LOBTools project:
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.
-
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.
-
Perform the following steps for each of the
MC_masterCatalogId directories:
- Go to Search_home/pre-processConfig/MC_masterCatalogId/db_type
- Rename the wc-dataimport-preprocess-unstructured-content.xml file to wc-dataimport-preprocess-unstructured-content.xml.orig
- Go to WC_installdirWCDE_installdir/components/foundation/samples/dataimport/catalog/db_type
- Copy the wc-dataimport-preprocess-unstructured-content.xml file to Search_home/pre-processConfig/MC_masterCatalogId/db_type
- Find the index scope tag by running the following SQL statement:
For example, if IndexScopeTag=0, then the tag is 0.select indexscope, indextype, config from srchconf where indexscope='masterCatalogId' and indextype='CatalogEntry'
- Open the wc-dataimport-preprocess-unstructured-content.xml file under Search_home/pre-processConfig/MC_masterCatalogId/db_type in a text editor.
- Replace all occurrences of
#INDEX_SCOPE_TAG#
with the index scope tag. - Replace all occurrences of
#MASTER_CATALOG_ID#
with the master catalog ID. - Check the table names in the file. For example, TI_CATENTREL_0 if the index scope tag is 0.