Uploaded image for project: '[Read Only] - Hippo Plugins'
  1. [Read Only] - Hippo Plugins
  2. HIPPLUG-1580

Content blocks applies validation in an incorrect way

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Won't Fix
    • None
    • None
    • plugins-content-blocks
    • None
    • 5

    Description

      When a block is added with a field that can remain empty you cannot save the document. A validation for the empty block is reported.

      Reproduction path:

      • use an archetype project and add the Events and Content Blocks plugin
      • use the content blocks plugin to add a rich text field to the Event document type
      • edit an event document in the cms: add a block, do not add any text in it and save the document

      Result: validation message 'a rich text field is empty' and you cannot save the document.

      Expected: no validation error is raised because the field is not marked as required.

       

      Probable cause: the validation check by the org.onehippo.forge.contentblocks.validator.ContentBlocksValidator is on Jcr node type. The node type of the hippostd:html field has a required definition for a string field ('hippostd:content'). The check is on that jcr property, which is incorrect. The check must be done using the hipposysedit:validators of the hipposysedit:field nodes in the document type definition.

      My hunch is that this an old way of checking validation, which is now obsolete. The editor will correctly check all fields of the compounds (which content blocks are in fact) and the content block validator is not necessary anymore?

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: