0

I have a content schema that contains an embedded schema with a text field that is populated from a category:

FooSchema
    |
    - heading (text field)
    - offers (embedded schema field)
         |
         - offer (component)
         - area  (category drop-down list)

When the category that populates the "area" drop-down list only contains a single item, the value does not get included in the component XML. It looks something like this:

<Foo xmlns="uuid:4089297c-34a4-4c61-bb0e-4f7a0f9fd138">   
    <heading>test</heading>
    <offers>
        <offer xlink:type="simple" xlink:href="tcm:13-27777" xmlns:xlink="http://www.w3.org/1999/xlink"></offer>
    </offers>
</Foo>

Because the offer and area fields are both required, attempting to save new components results in an XML validation error. As a workaround, we added a second keyword to the category, which allows the content editors to select the second item and then select the first item.

Has anyone else experienced this issue? Is there a fix, or a better workaround?

3
  • I've checked this works as expected in 2013 SP1 HR1 - tested with a mandatory field linked to a single keyword and an optional field linked to a single keyword. Have you checked you're not missing a hotfix for your implementation? Commented Apr 24, 2015 at 16:11
  • perhaps post the XML schema for review... Commented Apr 24, 2015 at 16:12
  • may be you can define the categories and keywords on the same level and define the schema for that field as default value
    – Velmurugan
    Commented Apr 28, 2015 at 7:13

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.