Skip to content

Multimedia schemas cause exception because they don't have a RootElementName #3

@DominicCronin

Description

@DominicCronin

content.AppendChild(content.CreateElement(string.IsNullOrEmpty(_rootElementName) ? _data.RootElementName : _rootElementName, _data.NamespaceUri));

If you attempt to instantiate Fields for a multimedia Schema/Component, there is no rootElementName for the content. So if you try to do something like this:

Fields.ForContentOf(schemaFields, _componentData);

you come out with a situation where _rootElementName and _data.RootElement name are both null, and CreateElement throws an exception.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions