Microsoft KB Archive/811354

= FIX: Display Names May Be Deleted When You Create a New Display Name =

Article ID: 811354

Article Last Modified on 8/11/2003

-

APPLIES TO


 * Microsoft Commerce Server 2002 Standard Edition

-



SYMPTOMS
When you create display names for catalog product properties, the display names may be deleted. If this problem occurs, all display names for the language where you created the new display name are removed from the database.



RESOLUTION
To resolve this problem, change the edit_PropertyDefinition.asp file. To do this, follow these steps:  Locate the following file in the folder that contains your Business Desk Web site:

\Catalogs\Designer\edit_PropertyDefinition.asp

  Locate the line of code that includes the following: Function AddMultilingualAttributes   Replace the function AddMultilingualAttributes with the following code: Function AddMultilingualAttributes (ByRef g_sXMLData, ByRef sAttributeBaseName, _                                   ByRef sFormName) Dim xmlDoc, root, record Dim sAttributeName, sState Dim sLang, sLangNode, sPrevLang, sPrevLangNode

sLangNode = sFormName & &quot;_lang&quot; sPrevLangNode = sFormName & &quot;_prev_lang&quot; Set xmlDoc = Server.CreateObject(&quot;MSXML.DOMDocument&quot;) xmlDoc.async = False xmlDoc.LoadXML (g_sXMLData) Set root = xmlDoc.documentElement

On Error Resume Next if not root is nothing then For Each record In root.selectNodes(&quot;//record[(@state = 'new') $or$ (@state = 'changed')]&quot;) sState = record.getAttribute(&quot;state&quot;) sLang = sCultureName (record.selectSingleNode(sLangNode).text, g_xmlLanguages) sAttributeName = sAttributeBaseName & &quot;_&quot; & sLang

If (sState = &quot;changed&quot;) Then sPrevLang = record.selectSingleNode (sPrevLangNode).text ' Notice the following line: If (UCASE(sPrevLang) <> UCASE(sLang) Then                   g_oCatMgr.RemovePropertyAttribute sAttributeBaseName & &quot;_&quot; & sPrevLang                End If            End If            g_oCatMgr.AddPropertyAttribute sAttributeName, STRING_TYPE, 128            ' If the property attribute already exists, ignore the error.            If (Err.Number = &h8898010F) Then Err.Clear            Set g_rsAttributes = Nothing        Next    end if

Set AddMultilingualAttributes = root End Function  Save the modified file, and then restart Business Desk.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

Keywords: kbbug kbfix KB811354

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.