Copied to clipboard

Flag this post as spam?

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


  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Feb 24, 2016 @ 09:32
    Ismail Mayat
    0

    Ditto not working on different machine

    Guys,

    We are using ditto on an umbraco 7.3.3 project all works fine on my machine and also on our dev and staging servers. However we recently handed over code and db to client and they started to get some anomalies.

    So their dev running locally with local db all works fine. When they run on their dev server the pocos do not hydrate at all. It was working initially then stopped. I checked error logs but cannot see anything. The client dev has also somehow managed to re create the issue locally. Think his db was not the same as the server. I have requested dump from them see if i can recreate.

    Has anyone seen something similar?

    Regards

    Ismail

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Feb 24, 2016 @ 09:45
    Lee Kelleher
    0

    Hey Ismail,

    Nope, I haven't heard of that happening before.

    Do you know which version of Ditto it is?

    Other things to rule out...

    • is the Ditto DLL on production?
    • Are there any custom ValueResolvers/TypeConverters? (that might be swallowing an exception?)
    • Does the umbraco.config exist? (might be bigger issues than Ditto?)

    Cheers, Lee

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Feb 24, 2016 @ 10:29
    Ismail Mayat
    0

    Lee,

    I thought it might be something to do with missing umbraco.config ill get them to check.

    Cheers

    Ismail

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Feb 24, 2016 @ 14:35
    Ismail Mayat
    0

    Lee,

    I go their db and i get same issue. Their content is different from what i had originally. Is there way to get ditto to log stuff? I suspect it is something in their content that is causing ditto to fail silently

    Regards

    Ismail

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Feb 24, 2016 @ 14:43
    Lee Kelleher
    0

    We have MiniProfiler traces enabled within Ditto, but they only run when the website is in debug-mode, (in Web.config). Add ?umbDebug=true on the frontend.

    We don't have any other logging in Ditto. You'd have to get the source-code (tagged by version) and debug against it.

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Feb 24, 2016 @ 15:19
    Ismail Mayat
    0

    Lee,

    Turned on miniprofiler but all is see is stuff for /scheduledPubhlish/index which is weird. I do not see anything for the actual page i am viewing.

    Regards

    Ismail

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Feb 24, 2016 @ 15:23
    Lee Kelleher
    0

    How is Ditto being used on the website? In MVC controllers, or in the View itself?

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Feb 24, 2016 @ 15:35
    Ismail Mayat
    0

    Lee,

    In the view itself:

    @inherits UmbracoTemplatePage<DestinationItem>
    

    Then im doing

     var currentDestination = Model.Content;
    

    if (currentDestination.EmbedVideo != null && currentDestination.EmbedVideo.Any())

    Im using via nuget ditto 0.8.3 and also modelfactory 0.1.1

    Regards

    Ismail

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Feb 24, 2016 @ 15:44
    Lee Kelleher
    0

    Ah okay, I didn't know you were using DittoModelFactory.

    It sounds like the model-factory isn't being registered... or that another model-factory is being used?

    On a side-note, we've dropped development of DittoModelFactory and don't recommend that people use it. We found too many edge-cases that we couldn't support, and caused us many headaches (when we really just wanted to focus on Ditto core itself).

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Feb 24, 2016 @ 16:27
    Ismail Mayat
    0

    Lee,

    Looking at this a bit more i don't think its the modelfactory not being registered. It looks like any property that is IEnumerable is not being hydrated. E.g:

    [PublishedContentModel("DestinationItem")]
    [TypeConverter(typeof(DittoPickerConverter))]
    public class DestinationItem : PublishedContentModel
    {
        public DestinationItem(IPublishedContent content) : base(content)
        { }
    
        public IEnumerable<AttractionItem> Attractions { get; set; }
    
        public IEnumerable<TravelTip> TravelTips { get; set; }
    

    and for traveltips the actual class is

    [TypeConverter(typeof(DittoPickerConverter))]
    public class TravelTip
    {
        public string Name { get; set; }
    
        public IPublishedContent Image { get; set; }
    
        public MultiUrls Link { get; set; }
    
        public string Description { get; set; }
    }
    

    Like i say this all used to work.

    Regards

    Ismail

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Feb 25, 2016 @ 08:09
    Ismail Mayat
    1

    Lee,

    Just an update on this its not all IEnumerable properties that have stopped working just 2 of them. I have downloaded source and looking to debug any pointers on where i should be sticking breakpoints?

    Regards

    Ismail

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Feb 25, 2016 @ 08:17
    Lee Kelleher
    0

    Try...

    https://github.com/leekelleher/umbraco-ditto/blob/0.8.3/src/Our.Umbraco.Ditto/Extensions/PublishedContentExtensions.cs#L383

    This is where the property value will be set, you can see if the result has a value.

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Feb 25, 2016 @ 08:32
    Lee Kelleher
    0

    Just had a thought... Could the property-aliases have been renamed on the doctype?

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Feb 25, 2016 @ 09:47
    Ismail Mayat
    0

    Lee,

    Just double checked that and that is not the issue. So I do not think its an issue with ditto. The issue is the property convertor so when i do:

      var tips = Model.Content.GetPropertyValue<IEnumerable<IPublishedContent>>("travelTips");
    

    Its null. Even though items have been set. When i look at another property which is also mntp and do

     var attractions = Model.Content.GetPropertyValue<IEnumerable<IPublishedContent>>("attractions");
    

    I get stuff. This is really weird.

    Regards

    Ismail

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Feb 25, 2016 @ 14:41
  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Feb 25, 2016 @ 14:47
    Lee Kelleher
    0

    Doh! ;-)

    Well, at least I'm glad it wasn't Ditto :-)

    Cheers,
    - Lee

Please Sign in or register to post replies

Write your reply to:

Draft