Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tag DataType #21

Open
mike-w-kelly opened this issue Jan 6, 2016 · 3 comments
Open

Tag DataType #21

mike-w-kelly opened this issue Jan 6, 2016 · 3 comments
Assignees

Comments

@mike-w-kelly
Copy link

Summary

I'm trying to add a custom tag datatype with the following migration based on the example project

var tagGroup = DataType.Create("Kb Article Tags", PropertyEditor.Tags, DataTypeDatabaseType.Ntext).Save();
tagGroup.SetTagDataTypePreValues("Kb Article Tags", StorageType.Csv).Save();

The migration runs fine and I can see the Data Type in the back office, but when I try to access it I get the following error which suggests there is an error with the PropertyEditor mapping.

Any ideas?

Error

Received an error from the server
Failed to retrieve data for data type id 5130

Could not find property editor with alias 4023E540-92F5-11DD-AD8B-0800200C9A66
Exception Details:
System.InvalidOperationException: Could not find property editor with alias 4023E540-92F5-11DD-AD8B-0800200C9A66
Stacktrace:

at Umbraco.Web.Models.Mapping.PreValueDisplayResolver.Convert(IDataTypeDefinition source)

at Umbraco.Web.Models.Mapping.PreValueDisplayResolver.ResolveCore(IDataTypeDefinition source)

at AutoMapper.ValueResolver`2.Resolve(ResolutionResult source)

at AutoMapper.PropertyMap.b__6(ResolutionResult current, IValueResolver resolver)

at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable1 source, TAccumulate seed, Func3 func)

at AutoMapper.PropertyMap.ResolveValue(ResolutionContext context)

at AutoMapper.Mappers.TypeMapObjectMapperRegistry.PropertyMapMappingStrategy.MapPropertyValue(ResolutionContext context, IMappingEngineRunner mapper, Object mappedObject, PropertyMap propertyMap)

@anD1332 anD1332 self-assigned this Jan 7, 2016
@anD1332
Copy link
Contributor

anD1332 commented Jan 7, 2016

Hi Mike,

I've had a look at the uFluent issue this morning. If you set the property editor to "Umbraco.Tags" in the initial create statement it will work. We need to change the constants so they are not GUID based but if you put the property editor name in there instead of PropertyEditor.Tags it will create the data type

An example of this would be

DataType.Create("Article Tags", "Umbraco.Tags", DataTypeDatabaseType.Ntext)
        .SetTagDataTypePreValues("Article Tags", StorageType.Csv).Save();

This is a workaround for the moment, we will look at getting the issue with the property editor constants fixed.

Thanks
Andy

@mike-w-kelly
Copy link
Author

Thanks Andy, I'll give that a go later today.

Cheers,
Mike

@mike-w-kelly
Copy link
Author

Workaround works, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants