Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-9993

[Content] Impossible to override global validators

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.3.0
    • 4.2.3, 4.3.0
    • None
    • None
    • 4.3 RC1

      Steps to reproduce :

      1. Create the file to override a content type : WEB-INF/param/content-types/org.ametys.web.default.Content.article.xml
      2. Add your own global validator in it :
        <?xml version="1.0" encoding="UTF-8"?>
        <cms:content-type xmlns:cms="http://www.ametys.org/schema/cms">
            <cms:global-validators>
                <cms:global-validator class="my.own.GlobalValidator"/>
            </cms:global-validators>
        </cms:content-type>
      3. Add a breakpoint into your validator in the method #validate(Content, Form, MetadataSet, Errors)
      4. Restart your CMS
      5. Edit a content (of the modified content type)
      6. Nothing happens while saving

            Unassigned Unassigned
            bmaurel Bérénice Maurel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: