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.
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
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.
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).
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; }
}
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?
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
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...
Cheers, Lee
Lee,
I thought it might be something to do with missing umbraco.config ill get them to check.
Cheers
Ismail
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
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.
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
How is Ditto being used on the website? In MVC controllers, or in the View itself?
Lee,
In the view itself:
Then im doing
if (currentDestination.EmbedVideo != null && currentDestination.EmbedVideo.Any())
Im using via nuget ditto 0.8.3 and also modelfactory 0.1.1
Regards
Ismail
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?
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:
and for traveltips the actual class is
Like i say this all used to work.
Regards
Ismail
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
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.Just had a thought... Could the property-aliases have been renamed on the doctype?
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:
Its null. Even though items have been set. When i look at another property which is also mntp and do
I get stuff. This is really weird.
Regards
Ismail
Lee,
Apologies but https://our.umbraco.org/forum/developers/api-questions/75382-getpropertyvalue-returns-null#241260 epic noobness
Doh! ;-)
Well, at least I'm glad it wasn't Ditto :-)
Cheers,
- Lee
is working on a reply...