Copied to clipboard

Flag this post as spam?

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


  • Gordon Saxby 1461 posts 1883 karma points
    Aug 24, 2017 @ 09:48
    Gordon Saxby
    0

    Courier fails if textstring contains [ and ]

    I have a standard textstring property inside a Nested Content datatype and it contains

    [[Email]]
    

    However, that causes Courier to fail, with this shown in the log:

        2017-08-24 09:23:13,140 [46] INFO  Umbraco.Courier.Core.TaskManager - [Thread 46] Added PackagingTask behind queue of : 0
    2017-08-24 09:23:13,140 [46] INFO  Umbraco.Courier.Core.BackgroundTaskRunner - [Thread 46]  Task added Umbraco.Courier.Core.Tasks.PackagingTask
    2017-08-24 09:23:13,140 [23] INFO  Umbraco.Courier.Core.TaskManager - [Thread 23] Starting PackagingTask with id: ab2cdbc6-ac50-42cf-88eb-7e49b880c685
    2017-08-24 09:23:13,140 [23] INFO  Umbraco.Courier.Core.Tasks.PackagingTask - [Thread 23] PackagingTask running by user Admin
    2017-08-24 09:23:13,278 [23] INFO  Umbraco.Courier.Core.Packaging.RevisionPackaging - [Thread 23] Documents: fc7c984b-643e-49ff-aee2-177de1fd46d3 hash-mismatch (local/remote) e1cfdc6cf1324561f07e8defcb3be8fe64b3d47e / a0b0bf3c384bec68ad5373f1540887c700b442d2
    2017-08-24 09:23:13,635 [23] DEBUG Umbraco.Courier.Persistence.V6.NHibernate.NHibernateProvider - [Thread 23] Closing session, UseGlobalSession: False, key: c0cb9d02-0af2-4d29-9fdd-f68e1c652b59
    2017-08-24 09:23:13,636 [23] INFO  Umbraco.Courier.Core.TaskManager - [Thread 23] Completed PackagingTask with id: ab2cdbc6-ac50-42cf-88eb-7e49b880c685
    2017-08-24 09:23:15,713 [41] INFO  Umbraco.Courier.Core.TaskManager - [Thread 41] Added ExtractionTask behind queue of : 0
    2017-08-24 09:23:15,713 [41] INFO  Umbraco.Courier.Core.BackgroundTaskRunner - [Thread 41]  Task added Umbraco.Courier.Core.Tasks.ExtractionTask
    2017-08-24 09:23:15,713 [22] INFO  Umbraco.Courier.Core.TaskManager - [Thread 22] Starting ExtractionTask with id: ccc55edf-37a4-4ffe-9bd2-79513b4e8954
    2017-08-24 09:23:15,713 [22] INFO  Umbraco.Courier.Core.Tasks.ExtractionTask - [Thread 22] ExtractionTask running by user Admin
    2017-08-24 09:23:15,713 [22] INFO  Umbraco.Courier.Core.Extraction.RevisionExtraction - [Thread 22] Running PopulateGraph
    2017-08-24 09:23:15,717 [22] INFO  Umbraco.Courier.Core.Extraction.RevisionExtraction - [Thread 22] Finished PopulateGraph (took 3ms)
    2017-08-24 09:23:15,717 [22] INFO  Umbraco.Courier.Core.Extraction.RevisionExtraction - [Thread 22] Starting extraction
    2017-08-24 09:23:15,717 [22] INFO  Umbraco.Courier.Core.Extraction.RevisionExtraction - [Thread 22] Opens database session
    2017-08-24 09:23:15,724 [22] INFO  Umbraco.Courier.Core.Extraction.RevisionExtraction - [Thread 22] Transfering pre-extraction files
    2017-08-24 09:23:15,724 [22] INFO  Umbraco.Courier.Core.Extraction.RevisionExtraction - [Thread 22] Running ExtractReadyRevisionBatch
    2017-08-24 09:23:15,724 [22] INFO  Umbraco.Courier.Core.Extraction.RevisionExtraction - [Thread 22] Extracting batch of 1 items
    2017-08-24 09:23:15,738 [22] INFO  Umbraco.Courier.Core.Extraction.RevisionExtraction - [Thread 22] Extracting batch of 1 items
    2017-08-24 09:23:15,772 [22] INFO  Umbraco.Courier.Core.Extraction.RevisionExtraction - [Thread 22] Finished ExtractReadyRevisionBatch (took 48ms)
    2017-08-24 09:23:15,772 [22] INFO  Umbraco.Courier.Core.Extraction.RevisionExtraction - [Thread 22] Rolling back changes due to errors
    2017-08-24 09:23:15,779 [22] ERROR Umbraco.Courier.Core.Extraction.RevisionExtraction - [Thread 22] There was a problem with extracting database information for the item: CurrentItem is null
    System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Unexpected character encountered while parsing value: w. Path '[0]', line 1, position 2.
       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.ExtractReadyRevisionBatch()
       at Umbraco.Courier.Core.Extraction.RevisionExtraction.Extract()
    2017-08-24 09:23:15,779 [22] DEBUG Umbraco.Courier.Persistence.V6.NHibernate.NHibernateProvider - [Thread 22] Closing session, UseGlobalSession: False, key: fe3f9284-5a0e-4ff5-a1ec-c4b90b51e148
    2017-08-24 09:23:15,788 [22] ERROR Umbraco.Courier.Core.TaskManager - [Thread 22] Error ExtractionTask with id: ccc55edf-37a4-4ffe-9bd2-79513b4e8954
    System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Unexpected character encountered while parsing value: w. Path '[0]', line 1, position 2.
       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.ExtractReadyRevisionBatch()
       at Umbraco.Courier.Core.Extraction.RevisionExtraction.Extract()
       at Umbraco.Courier.Core.Tasks.ExtractionTask.Run()
       at Umbraco.Courier.Core.BackgroundTaskRunner`1.ConsumeTaskInternal(T task)
    2017-08-24 09:23:15,788 [22] ERROR Umbraco.Courier.Core.BackgroundTaskRunner - [Thread 22] An error occurred consuming task
    System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Unexpected character encountered while parsing value: w. Path '[0]', line 1, position 2.
       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.ExtractReadyRevisionBatch()
       at Umbraco.Courier.Core.Extraction.RevisionExtraction.Extract()
       at Umbraco.Courier.Core.Tasks.ExtractionTask.Run()
       at Umbraco.Courier.Core.BackgroundTaskRunner`1.ConsumeTaskInternal(T task)
    

    If I remove the [[ and ]] then Courier works OK. I have also tried [ and ], as well as { } and {{ }}. Using < > or << >> works, but that would mean making code and content changes to the application!

  • Gordon Saxby 1461 posts 1883 karma points
    Aug 24, 2017 @ 11:19
    Gordon Saxby
    0

    This is what is written to the "properties" courier file (just showing the specific property):

        <ContentProperty>
            <UniqueId>bfd09a50-0667-44f1-81f7-15f1fd2911b4</UniqueId>
            <Alias>forgottenPasswordEmail</Alias>
            <DataType>9f4cc24d-0f82-4f8d-8048-72067aa42b41</DataType>
            <PropertyEditorAlias>Our.Umbraco.NestedContent</PropertyEditorAlias>
            <DBType>Ntext</DBType>
            <Value xsi:type="xsd:string">[{"name":"CustomerForgottenPassword","ncContentTypeAlias":"nCEmail","emailCode":"CustomerForgottenPassword","enableSend":1,"senderName":"Admin","senderEmail":"[email protected]","subject":"{\"values\":null,\"dtdGuid\":\"ebea8f81-206c-4d10-ac5c-0d2c17a1ffd8\"}","receiverEmail":"[[Email]]","cCEmail":"","bCCEmail":"","body":"{\"values\":{\"en\":\"Email test\"},\"dtdGuid\":\"96985b1d-bfa8-4522-a3a7-a5738fb51b73\"}"}]</Value>
        </ContentProperty>
    

    Is that correctly formatted / encoded?

  • Brad Kelley 2 posts 20 karma points
    Feb 07, 2018 @ 21:41
    Brad Kelley
    0

    You've probably gotten this resolved already, but the issue may stem from how ]] is used to close XML CDATA content.

    Some background: https://stackoverflow.com/questions/2784183/what-does-cdata-in-xml-mean

Please Sign in or register to post replies

Write your reply to:

Draft