Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
First off, stellar package! We are using uSync to automatically generate strong Document Type Models and things for the most part are perfect.
We do, however, have a huge problem when generating Document Types containing ArcheType properties. I can't replicate the issue reliably, but it seems to happen after repeatedly editing fieldset properties of an Archetype Data Type. uSync eventually encounters an error and then generates a completely blank class in the Models > DocumentType directory. This brings our entire solution to a halt because we can't compile without getting "missing assembly reference" errors. Here is the Umbraco log message that I think is the culprit:
 ERROR Umbraco.CodeGen.CodeGenerator - [Thread 429] Generating typed model failed
System.InvalidOperationException: Sequence contains more than one matching element
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at Umbraco.CodeGen.Generators.Annotated.PropertyInfoGenerator.AddDataType(CodeAttributeDeclaration attribute, GenericProperty property)
at Umbraco.CodeGen.Generators.Annotated.PropertyInfoGenerator.Generate(Object codeObject, Entity entity)
at Umbraco.CodeGen.Generators.AttributeCodeGenerator.Generate(Object codeObject, Entity entity)
at Umbraco.CodeGen.Generators.PropertyDeclarationGenerator.Generate(Object codeObject, Entity entity)
at Umbraco.CodeGen.Generators.PropertiesGenerator.Generate(Object codeObject, Entity entity)
at Umbraco.CodeGen.Generators.CompositeCodeGenerator.Generate(Object codeObject, Entity entity)
at Umbraco.CodeGen.Generators.NamespaceGenerator.Generate(Object codeObject, Entity entity)
at Umbraco.CodeGen.CodeGenerator.Generate(ContentType contentType, TextWriter writer)
at Umbraco.CodeGen.Integration.ApplicationEvents.GenerateModels(String inputPath)
at Umbraco.CodeGen.Integration.ApplicationEvents.OnDocumentTypeSaved(XmlDocFileEventArgs e)
The ROOT of this problem could possibly reside within the Archetype project, but I think its important to at least program an exception into uSync so the export process encounters an error it gracefully excludes the property in question so we can still get a valid Document Type class.
This is a high priority issue for us in a Production environment so any feedback would be very appreciated. If I can offer any more details, please ask.
Some additional details:
Our Archetype contains only default property editors (a textstring, media picker, and richtext editor). I've experienced this issue on SEVERAL different Archetype property editors so I know it isn't tied to a particular instance or some unusual data-driven edge case.
The only way around the issue so far has been to create a new Archetype Data Type and remap all the existing property values which, you can imagine, is a nightmare. We tried identifying a single property that might be causing the problem, but weren't successful.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted