Hello Kalvin MacLeod,
Meta data can't be null, it either exists or doesn't exist. However, UI elements that show meta data can be optional.
We initialize the metafields controls with something like:
For every metafield in the provider, if there is a control with the same id, extract its value.
We save in much the same manner:
For every mandatory mentafield in the provider, get its control and save its value.
Mandatory are all fields that are declared as such in web.config.
The above was about the admin part.
Here is what applies to ContentView-based controls:
according to the metafield type, the following control must be used:
- ShortText or LongText: either ITextControl or HyperLink
- DateTime: Telerik.Cms.Web.UI.DateTimeLiteral or ITextControl
ContentView tries to find a control with the appropriate type and id, but if it doesn't it should throw no exceptions. I spent a lot of time analysing the code and didn't find any potential problems.
Perhaps if you gave us a step-by-step instructions on how to reproduce the exception, we wil be able to find a solution for your problem.
the Telerik team