Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

FIX: Error message when you try to import a virtual catalog in Commerce Server 2007 and in Commerce Server 2009: "You should create the category before using it as a parent category"


View products that this article applies to.

Symptoms

Consider the following scenario in Microsoft Commerce Server 2007 and in Microsoft Commerce Server 2009:
  • In a virtual catalog, you create a new category.
  • You add a previously created category as a child category of the new category.
  • You export the virtual catalog to an XML file.
  • You try to import the virtual catalog in the XML file into a catalog database.
In this scenario, you cannot import the virtual catalog. Additionally, in the Status View of Commerce Server Catalog Manager, you see an error that resembles the following:
Line <number>: The category <Category Name>(<Virtual Catalog Name>) defined as a parent category in the catalog <Virtual Catalog Name> does not exit in the catalog. You should create the category before using it as a parent category.

↑ Back to the top


Cause

In Commerce Server 2007 and in Commerce Server 2009, when you export a virtual catalog to an XML file, the sequence of XML nodes is ordered according to the times that the categories were created. Therefore, the earliest categories are displayed at the beginning of the XML file.

If there is parent-child association defined in the catalog, the name of the parent category is specified in the ParentCategory element in the definition section of the child category.

This issue occurs because the definition of the child category appears before the definition of the parent category in the XML file. Therefore, the name of the parent category is referred to before the parent category is defined. Because of this, neither Commerce Server 2007 nor Commerce Server 2009 can interpret the name of the parent category which causes the import operation to fail.

↑ Back to the top


Resolution

Hotfix information

A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that is described in this article. Apply it only to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Commerce Server 2007 service pack that contains this hotfix or for the next Commerce Server 2009 service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Prerequisites

You must have Commerce Server 2007 Service Pack 2 (SP2) or Commerce Server 2009 installed to apply this hotfix.

Restart requirement

You do not have to restart the computer. However, you must restart Internet Information Services (IIS) and the Commerce Server Catalog Import Host COM+ application after you apply this hotfix. To restart IIS, run the following command at a command prompt:
IISRESET /RESTART
Note This option stops and then restarts all IIS services that are running.

Hotfix replacement information

This hotfix does not replace any other hotfixes.

File information

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.

Commerce Server 2007
File nameFile versionFile sizeDateTimePlatform
Catalogcreate.sqlNot applicable1,152,78711-Jun-107:26Not applicable

Commerce Server 2009
File nameFile versionFile sizeDateTimePlatform
Catalogcreate.sqlNot applicable1,152,78711-Jun-1015:16Not applicable

Installation instructions

After you extract the hotfix package, you obtain the following files:

For Commerce Server 2007
File nameFile versionFile sizeDateTime
Commerceserver2007sp2-kb970717-enu.exe6.1.22.0370,56815-Jun-20101:46
Kb970717.sqlNot Applicable6,26506-May-20100:48

For Commerce Server 2009

File nameFile versionFile sizeDateTime
Commerceserver2007sp3-kb970717-enu.exe6.1.22.0385,41615-Jun-20100:20
Kb970717.sqlNot Applicable6,26506-May-20100:48


Install the CommerceServer2007SP2-KB970717-ENU.exe file to update the Catalogcreate.sql file for Commerce Server 2007. Install the CommerceServer2007SP3-KB970717-ENU.exe file to update the Catalogcreate.sql file for Commerce Server 2009. This makes sure that this issue does not occur for new catalog databases.

Additionally, you must run the KB970717.sql file against the existing catalog databases to update the stored procedure.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


More information

In Catalog Manager, you can export the virtual catalog into an XML file. To do this, follow these steps:
  1. Select the Virtual Catalog.
  2. In the Tasks pane, click Export this Catalog.
  3. In the Export Product Catalog Wizard, click Next to move to the File Location page, click Advanced, specify the file location, and then click Next.
  4. On the Export properties page, click Export as virtual catalog, and then click Next.
For more information about how to manage virtual catalogs, visit the following Microsoft Web site:

↑ Back to the top


Keywords: kbautohotfix, kbbug, kbexpertiseinter, kbsurveynew, kbqfe, KB970717

↑ Back to the top

Article Info
Article ID : 970717
Revision : 4
Created on : 9/9/2010
Published on : 9/9/2010
Exists online : False
Views : 31