Catalog Import Fails with Timeout Exception

  • Updated

The article describes an issue with catalog import after upgrading to EPiServer.Commerce.Core 11.2.6. In this version there is an issue with the newly added ecfVersion_UpdateSeoByObjectIds stored procedure.

This issue is slated for resolution in EPiServer.Commerce.Core 11.3 which will be available here. Since the fix might take some time to release, then any customers seeing the issues should :

  • Revert to a previous version (11.2.5 or earlier), or
  • Run the query below (after making backups of all databases)
ALTER PROCEDURE [dbo].[ecfVersion_UpdateSeoByObjectIds]
                             @ObjectIds udttObjectWorkId readonly
AS
BEGIN
                             DECLARE @WorkIds TABLE (WorkId INT)
                             INSERT INTO @WorkIds (WorkId)
                                                          SELECT v.WorkId
                                                          FROM ecfVersion v
                                                          INNER JOIN @ObjectIds c ON v.ObjectId = c.ObjectId AND v.ObjectTypeId = c.ObjectTypeId
                                                          WHERE (v.Status = 4)
                             UNION
                                                          SELECT v.WorkId
                                                          FROM ecfVersion v
                                                          INNER JOIN @ObjectIds c ON v.ObjectId = c.ObjectId AND v.ObjectTypeId = c.ObjectTypeId
                                                          WHERE (v.IsCommonDraft = 1 AND
                                                          NOT EXISTS(SELECT 1 FROM ecfVersion ev WHERE ev.ObjectId = c.ObjectId AND ev.ObjectTypeId = c.ObjectTypeId AND ev.Status = 4 ))

                             UPDATE v
                             SET v.SeoUri = s.Uri,
                                 v.SeoUriSegment = s.UriSegment
                             FROM ecfVersion v
                             INNER JOIN @WorkIds w on v.WorkId = w.WorkId
                             INNER JOIN CatalogItemSeo s ON (s.CatalogEntryId = v.ObjectId AND v.ObjectTypeId = 0) --update entry versions

                             UPDATE v
                             SET v.SeoUri = s.Uri,
                                 v.SeoUriSegment = s.UriSegment
                             FROM ecfVersion v
                             INNER JOIN @WorkIds w on v.WorkId = w.WorkId
                             INNER JOIN CatalogItemSeo s ON (s.CatalogNodeId = v.ObjectId AND v.ObjectTypeId = 1) --update node versions
END