Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Yannick Smits 321 posts 718 karma points
    Oct 03, 2013 @ 18:19
    Yannick Smits

    Error when using DataEditor in Front-end

    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.

  • Comment author was deleted

    Oct 04, 2013 @ 12:49
  • Yannick Smits 321 posts 718 karma points
    Oct 04, 2013 @ 15:04
    Yannick Smits

    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...

Please Sign in or register to post replies

Write your reply to: