Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-13434

Problem if xmlblock is required /empty and Add object in objectrelation(s) is clicked

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 3.10.1, 3.9.5, 4.0.1, 4.1.0alpha1
    • 3.10.1rc1, 4.0.1rc1
    • Misc
    • None

    Description

      You will not be able to add relations if xmlblock is required and empty, you'll get a

      The draft could not be stored.
      
      Required data is either missing or is invalid:
      
          * Xml: Content required
      
      

      Patch (to make it work like the other datatypes):

      Index: kernel/classes/datatypes/ezxmltext/handlers/input/ezsimplifiedxmlinput.php
      ===================================================================
      --- kernel/classes/datatypes/ezxmltext/handlers/input/ezsimplifiedxmlinput.php	(revision 22151)
      +++ kernel/classes/datatypes/ezxmltext/handlers/input/ezsimplifiedxmlinput.php	(working copy)
      @@ -108,8 +108,7 @@
                       return eZInputValidator::STATE_INVALID;
                   }
       
      -            $classAttribute = $contentObjectAttribute->contentClassAttribute();
      -            if ( $classAttribute->attribute( 'is_required' ) == true )
      +            if ( $contentObjectAttribute->validateIsRequired() )
                   {
                       $root = $document->documentElement;
                       if ( !$root->hasChildNodes() )
      

      Also affects OE, this is fixed in 5.0.0rc2 rev 3134:
      http://issues.ez.no/IssueView.php?Id=13402&activeItem=2

      Attachments

        Activity

          People

            cyberwolf cyberwolf
            andre1 andre1
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: