Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Ben Swayne (StoreBuilder) 3 posts 96 karma points
    Dec 21, 2017 @ 00:10
    Ben Swayne (StoreBuilder)

    Umbraco Courier Fails to Deploy - "Error extracting item"

    Umbraco Courier fails to deploy for me between the staging site and production.

    However 3 doctypes are shown in red with a small warning symbol that says "This item will be created on the target machine".

    However these doctypes already exist on the target site (the target site is identical to the staging site).

    It appears to be trying to re-create doc types that already exist on the production side. Even if I uncheck the doc type when selecting what to publish with Courier, the log entries are the same. Unselecting appears to have no affect.

    I have already updated Umbraco and Courier to current versions.

    2017-11-28 19:22:21,070 [170] ERROR Umbraco.Courier.Core.BackgroundTaskRunner - [Thread 170] An error occurred consuming task
    System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Error extracting item, ID: 93800298-d053-37f6-9c8c-126cf8be0c9b_d8e6ad84-e73a-11df-9492-0800200c9a66, Name: SEO, Type: Umbraco.Courier.ItemProviders.DocumentType ---> could not insert: [Umbraco.Courier.Persistence.V6.NHibernate.EntityClasses.CmsPropertyTypeGroup][SQL: INSERT INTO cmsPropertyTypeGroup (contenttypeNodeId, sortorder, text, uniqueID) VALUES (?, ?, ?, ?); select SCOPE_IDENTITY()] ---> Cannot insert duplicate key row in object 'dbo.cmsPropertyTypeGroup' with unique index 'IX_cmsPropertyTypeGroupUniqueID'. The duplicate key value is (7af77845-80a5-ab9b-5a9a-a355a45236f6).
    The statement has been terminated.
       at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
       at System.Web.Services.Protocols.SoapHttpClientProtocol.EndInvoke(IAsyncResult asyncResult)
       at Umbraco.Courier.RepositoryProviders.WebServiceProvider.RepositoryWebservice.EndExtractItems(IAsyncResult asyncResult)
       at Umbraco.Courier.RepositoryProviders.CourierWebserviceRepositoryProvider.ExtractItems(Item[] items, Boolean overWrite)
       at Umbraco.Courier.Core.Extraction.RevisionExtraction.ExtractItems(List`1 nodes)
       at Umbraco.Courier.Core.Extraction.RevisionExtraction.ExtractReadyRevisionBatch()
       at Umbraco.Courier.Core.Extraction.RevisionExtraction.Extract()
       at Umbraco.Courier.Core.Tasks.ExtractionTask.Run()
       at Umbraco.Courier.Core.BackgroundTaskRunner`1.ConsumeTaskInternal(T task)
  • Ben Swayne (StoreBuilder) 3 posts 96 karma points
    Dec 28, 2017 @ 18:11
    Ben Swayne (StoreBuilder)

    This problem has been resolved after many many emails with Umbraco support.

    The above exception is a bit of a red herring as the duplicate property group is trying to be created as a result of Courier attempting to duplicate a Document Type. So the root of the problem was that the Document Type is the item being duplicated (not the property group in the exception message).

    This is a result of having manually created duplicate document types on 2 umbraco sites (instead of having originally couriered the doc type from one site to the next) and later trying to courier content between the sites. (This would also be experienced when using the export doc type and import doc type feature in umbraco which does not export/import the unique GUID)

    In our case we had manually copied/duplicated document types prior to using Courier for our workflow. The duplicate doctypes were identical in every way except the uniqueId column on the umbracoNodes tables in SQL. This GUID was uniquely generated for each manually created copy of the doc type.

    As of this post, Courier only uses the GUID to find existing document types on the target site when couriering content from one site to the other. Therefor it did not find the exact duplicate doc type on the target umbraco instance and was trying to recreate it via Courier resulting in duplication issues.

    I resolved this by manually syncing the umbracoNodes.uniqueId for my doc types in SQL Server Management Studio.

    However, I would also suggest an improvement to Courier, that if something is not found on the target site by a given GUID value, Courier should secondarily try to find the item by Alias/Name in order to either:

    1. Sync the GUID keys, or
    2. Provide a clear human readable error message to the user to suggest disambiguating the duplicate item.
Please Sign in or register to post replies

Write your reply to: