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
I'm trying to use the Google maps datatype in combination with the osMemberControls Member Profile editor but I'm getting an error because the PropertyType.DataTypeDefinition.DataType object is Null. When creating the control this code is run (abreviated):
var mt = new umbraco.cms.businesslogic.member.MemberType(m.ContentType.Id);
var ptypes = mt.PropertyTypes.Where(pt => pt.TabId == _tabtoshow);
foreach (PropertyType pt in ptypes)
IDataType dt = pt.DataTypeDefinition.DataType; // <== this one is null (DataType)
dt.DataEditor.Editor.ID = pt.Alias;
dt.Data.Value = m.getProperty(pt.Alias.ToString()).Value;
I have no clue why the datatype is not being populated corectly as it's digging too deep into the core. Hope somebody can give me some pointers as where to look to enable this datatype for use in the frontend. Other (custom) datatypes work without any problem.
Only thing I can see is that it uses the AbstractDataEditor https://bitbucket.org/vertino/google-maps-for-umbraco/src/3d566a5151ddea70e2a2097e1d016dc04e435a88/Our.Umbraco.GoogleMaps/DataTypes/SingleLocation/SingleLocationDataType.cs?at=default not sure if that has anything to do with the error
What should it normally be inheriting from then?
Strange thing I noticed is that if I create the datatype like this:
var factory = new umbraco.cms.businesslogic.datatype.controls.Factory();
IDataType dt = factory.DataType(new Guid("1b64eae2-f9a1-4276-a071-f25dde6913dd"));
dt is still null...
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted