Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-12686

Document type with compound not in prototype cannot be saved

    XMLWordPrintable

Details

    • Improvement
    • Status: Open
    • Normal
    • Resolution: Unresolved
    • None
    • None
    • channel-manager
    • None

    Description

      The real problem is that the compound is not configured on the document type's prototype node. This makes that the compound field does not show up in step 2 of the create content editor. Although that is an unwanted situation, it should still be possible to save the document and continue working in the editor in the content perspective.

      On save time the document is marked as having "invalid data". That is because of a detected cardinality problem.

      • when the document data is retrieved for the document type in org.onehippo.cms.channelmanager.content.documenttype.field.FieldTypeUtils#readFieldValues the valueMap is populated from the document node (that was created from the prototype and is missing the compound). So although the compound field is available in the list of fields, is does not cause to add an entry in the valueMap.
      • when the document is saved, in org.onehippo.cms.channelmanager.content.documenttype.field.type.CompoundFieldType#writeValues a cardinality check is done to see if there is a correct number of values to be saved for the compound field. But because the compound was not shown in the editor, of course there are no values available to be saved.

      Please note that this not only is a problem with custom compounds but also with hippo:html child nodes that support the rich text editor. If the prototype has no child node for it, saving the document fails in the same way as described above.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bleunis Bert Leunis (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: