Copied to clipboard

Flag this post as spam?

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


  • Paul de Quant 403 posts 1520 karma points
    May 17, 2018 @ 11:06
    Paul de Quant
    0

    Problem transferring content - error thrown

    Hello,

    Hopefully someone can help me. We have a custom GridCellResolverProvider. When we attempt to deploy a page, we get an error:-

    Exception Message: Server was unable to process request. ---> String "umb://media/3d89c8210dae45ae83c6f65e700fd6d4\" is not a valid udi.

    Exception Type: System.Web.Services.Protocols.SoapException

    Stack Trace: 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.EndGetHashes(IAsyncResult asyncResult) at Umbraco.Courier.RepositoryProviders.CourierWebserviceRepositoryProvider.GetHashes(ItemIdentifier[] itemIds) at Umbraco.Courier.Core.Packaging.RevisionPackaging.GetTargetHashes(IPackagingTarget2 target, IEnumerable1 ids) at Umbraco.Courier.Core.Packaging.RevisionPackaging.PackageBatch() at Umbraco.Courier.Core.Packaging.RevisionPackaging.Package() at Umbraco.Courier.Core.Tasks.PackagingTask.Run() at Umbraco.Courier.Core.BackgroundTaskRunner1.ConsumeTaskInternal(T task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Umbraco.Courier.Core.TaskManager.GetSuccessfulProcessedTasks() at Umbraco.Courier.UI.Dialogs.CommitItem.GetTask(String id)

    Now I know why it's generating this issue, it's because of the \ at the end of the UDI, my problem is that this error is being thrown before it hits our custom code. So I have no way of handling it.

    Has anyone encountered this issue before and can anyone suggest a fix/workaround. I've debugged it locally, but it's not hitting any of my break points.

    Thanks

    Paul

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Aug 01, 2018 @ 09:58
    Alex Skrypnyk
    0

    Hi Paul

    Did you solve this issue? Can you share with our community how to do it?

    Alex

  • Paul de Quant 403 posts 1520 karma points
    Aug 01, 2018 @ 10:01
    Paul de Quant
    100

    Hi Alex, I did. I ended up using a regular expressions to sort it.

     foreach (Match match in Regex.Matches(rteMarkup, @"(umb?:\/\/[^,\\""\s]+)"))
    

    This seems to have done the trick.

    Hope it helps someone else.

    Thanks

    Paul

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Aug 01, 2018 @ 11:45
    Alex Skrypnyk
    0

    Of course, it will help. Paul, thanks for sharing, have a great day!

  • Mike Donahue 36 posts 158 karma points
    Jan 15, 2019 @ 15:19
    Mike Donahue
    0

    Hi Paul, Im creating a custom resolver and unable to hit any breakpoints within the class. Any tips on creating my first grid resolver?

    I created the class, compiled to site, attached to correct w3 process and no methods ever get hit. Sample class:

    public class ButtonComponentDataResolver : GridCellResolverProvider
    {
       public override bool ShouldRun(string view, GridValueControlModel cell)
       {...}
       public override void PackagingCell(Item item, ContentProperty propertyData, GridValueControlModel cell)
       {...}
       public override void ExtractingCell(Item item, ContentProperty propertyData, GridValueControlModel cell)
       {...}
       private void ProcessCell(Item item, ContentProperty propertyData, GridValueControlModel cell, Action direction)
       {...}
    }
    
  • Paul de Quant 403 posts 1520 karma points
    Jan 15, 2019 @ 15:29
    Paul de Quant
    0

    Hi Mike,

    So do you have two localhost sites running at the same time?

    Thanks Paul

  • Mike Donahue 36 posts 158 karma points
    Jan 15, 2019 @ 15:51
    Mike Donahue
    0

    Sure do: one for editing and publishing and one for delivery

  • Paul de Quant 403 posts 1520 karma points
    Jan 15, 2019 @ 16:29
    Paul de Quant
    0

    Apologies, it's been a few months since I did this last and the whole thing was fraught with issues (much like yours) - needless to say it put me right off using Courier.

    Anyway, I know it's possible to debug locally - I put our class file in the root ( In a folder called Courier), don't forget to make sure the Build Action for the file is set to compile.

    The break point should kick in shortly after it works out what to transfer.

    I'm not being much help sorry.

  • Mike Donahue 36 posts 158 karma points
    Jan 15, 2019 @ 16:34
    Mike Donahue
    0

    No worries Paul I really appreciate your time. So strange, I'm doing the same - my file is in a root folder called DataResolvers and Build Action is compile. You didnt have any config settings anywhere web or courier config - to register your grid component or resolver?

  • Mike Donahue 36 posts 158 karma points
    Jan 15, 2019 @ 17:00
    Mike Donahue
    0

    Oddly, I addded another class using PropertyDataResolverProvider just to see if the type of component was being mistaken - all of a sudden my GridCellResolverProvider class breakpoints started working! Ok, step one complete! LOL, this'll be a long one.

    Thanks again!

  • Paul de Quant 403 posts 1520 karma points
    Jan 15, 2019 @ 17:01
    Paul de Quant
    0

    Good luck (you'll need it :) ). If you need any parser code to pull out links to internal pages/media let me know.

Please Sign in or register to post replies

Write your reply to:

Draft