Umbraco-Core-Property-Value-Converters icon indicating copy to clipboard operation
Umbraco-Core-Property-Value-Converters copied to clipboard

ModelBuilder - "Failed to build models." when Umbraco-Core-Property-Value-Converters installed

Open z4kk opened this issue 8 years ago • 11 comments

Umbraco 7.5.3 Umbraco.ModelsBuilder.ModelsMode - Dll

Exception:


 at Our.Umbraco.PropertyConverters.MultipleMediaPickerPropertyConverter.IsMultipleDataType(Int32 dataTypeId)
 at Our.Umbraco.PropertyConverters.MultipleMediaPickerPropertyConverter.GetPropertyValueType(PublishedPropertyType propertyType)
 at Umbraco.Core.Models.PublishedContent.PublishedPropertyType.InitializeConverters()
 at Umbraco.Core.Models.PublishedContent.PublishedContentType.<.ctor>b__0(PropertyType x)
 at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
 at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
 at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
 at Umbraco.Core.Models.PublishedContent.PublishedContentType..ctor(IContentTypeComposition contentType)
 at Umbraco.Core.Models.PublishedContent.PublishedContentType.CreatePublishedContentType(PublishedItemType itemType, String alias)
 at Umbraco.Core.Cache.CacheProviderExtensions.<>c__DisplayClass9`1.<GetCacheItem>b__8()
 at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
 at Umbraco.Core.Cache.CacheProviderExtensions.GetCacheItem[T](ICacheProvider provider, String cacheKey, Func`1 getCacheItem)
 at Umbraco.Core.Models.PublishedContent.PublishedContentType.Get(PublishedItemType itemType, String alias)
 at Umbraco.ModelsBuilder.Umbraco.Application.GetTypes(PublishedItemType itemType, IContentTypeBase[] contentTypes)
 at Umbraco.ModelsBuilder.Umbraco.Application.GetAllTypes()
 at Umbraco.ModelsBuilder.Umbraco.ModelsBuilderBackOfficeController.GenerateModels(String modelsDirectory, String bin)
 at Umbraco.ModelsBuilder.Umbraco.ModelsBuilderBackOfficeController.BuildModels()```

z4kk avatar Sep 12 '16 13:09 z4kk

Could you please save all of your data types that are using the MultipleMediaPicker in the Umbraco UI and see if that resolves the issue?

Jeavon avatar Sep 12 '16 13:09 Jeavon

I use only standart data tyepes, it's fresh install Here uSync.snapshot description of Multiple Media Picker - datatype

<?xml version="1.0" encoding="utf-8"?>
<DataType Name="Multiple Media Picker" Key="7e3962cc-ce20-4ffc-b661-5897a894ba7e" Id="Umbraco.MultipleMediaPicker" DatabaseType="Nvarchar">
  <PreValues>
    <PreValue Id="5" Value="1" Alias="multiPicker" />
  </PreValues>
</DataType>

z4kk avatar Sep 12 '16 13:09 z4kk

ok. got it. If a uncheck "Pick multiple items" - Save datatype, and set on after and save then that resolves the issue. txh!

p.s. Simple save without uncheck option - not work.

z4kk avatar Sep 12 '16 13:09 z4kk

ok, thanks, sounds like I need a check somewhere, I'll see if I can replicate!

Jeavon avatar Sep 12 '16 14:09 Jeavon

I can't replicate with a new install, any tips?

Jeavon avatar Sep 12 '16 14:09 Jeavon

I also install next package: FALM Housekeeping CM.Seperator uSync.BackOffice uSync.Snapshots

But I don't thinks that's source of problem

z4kk avatar Sep 12 '16 17:09 z4kk

And I use one Document Type with Media Picker (without Multiple items options)

z4kk avatar Sep 12 '16 17:09 z4kk

@Jeavon - I had the exact same error on a new install with a few Doc Types and only a few Packages installed - did not have time to try and work out the underlying issue but I grabbed your alpha build of 3.1.1 and that fixed the issue for me.

Thanks!

AussieInSeattle avatar Sep 13 '16 04:09 AussieInSeattle

@AussieInSeattle thanks Matt, I wish I could replicate :( I will release v3.1.1 anyway now

Jeavon avatar Sep 13 '16 10:09 Jeavon

@Jeavon - Sorry I didn't have time to dig deeper - maybe this will help:

Umbraco 7.5.3

Packages Installed - they were installed in this order too which might help: Nested Content 0.3.0 Doc Type Grid Editor 0.2.1 nuPickers 1.5.3 RJP.MultiUrlPicker 1.3.1 Your Package 3.1.0 (Installed Last)

Data types that might be doing it: RJP.MultiUrlPicker with pre values 0 & 1

Doc Types: One with the above data type (my hunch on what was causing the issue)

AussieInSeattle avatar Sep 13 '16 15:09 AussieInSeattle

Thanks Matt, I wonder about NestedContent, I have released v3.1.1 now anyway :)

Jeavon avatar Sep 13 '16 15:09 Jeavon