Error displaying categories in Commerce 7.5

Vote:
 

In the Catalog view within the EPiServer Backend for Commerce, a SQL exception will occur when there is a single quote in the name of the category name. Entries do not have this problem. Within the Commerce Manager, categories are displayed correctly.

 

 

EPiServer.Core.OptimisticCache`1.Read - cacheKey=EPChildrenData:1073742286:nl__CatalogContent, last exception was:

System.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near the keyword 'OR'.

Unclosed quotation mark after the character string ', ObjectId, SortOrder from @Page_temp;'.

   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)

   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)

   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)

   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite)

   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)

   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)

   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()

   at Mediachase.Data.Provider.SqlDataProvider.ExecuteNonExec(DataCommand command)

   at Mediachase.Commerce.Catalog.Search.CatalogSearch.SearchEntries(Guid searchGuid)

   at Mediachase.Commerce.Catalog.Managers.CatalogEntryManager.FindItemsDtoWorker(CatalogSearch search)

   at Mediachase.Commerce.Catalog.Managers.CatalogEntryManager.FindItemsDto(CatalogSearch search, Int32& recordsCount, CatalogEntryResponseGroup responseGroup)

   at EPiServer.Commerce.Catalog.Provider.CatalogContentLoader.GetCatalogEntries(ContentReference parentLink, Int32 startIndex, Int32 endIndex, Int32& totalCount)

   at EPiServer.Commerce.Catalog.Provider.CatalogContentProvider.LoadChildrenReferencesAndTypes(ContentReference contentLink, String languageID, Boolean& languageSpecific)

   at EPiServer.Core.ContentProvider.<>c__DisplayClass17`1.<TryGetChildren>b__16()

   at EPiServer.Core.OptimisticCache`1.Read(String cacheKey, ReadAndCacheObject`1 readAndCacheObject)

#79799
Jan 07, 2014 13:51
Vote:
 

How did you create the category with the quote in the name? What is its Code property?

#79800
Jan 07, 2014 15:05