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

Edition of a "reference" metadata does not work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.0RC3
    • None
    • None
    • None

      The declared metadata is

      <cms:metadata name="web" type="reference">
                  <cms:label i18n="false">Site Web</cms:label>
                  <cms:description i18n="false">Site Web (le champ doit débuter par http:// ou https://)</cms:description>
                  <cms:validation>
                      <regexp>^https?://.*$</regexp>
                      <invalidText i18n="true">plugin.core:PLUGINS_CORE_REGEXP_INVALID_URL</invalidText>
                  </cms:validation>
              </cms:metadata>
      

      When editing, I have the following error :

      Caused by: java.lang.ClassCastException: java.util.LinkedHashMap cannot be cast to java.lang.String
      	at org.ametys.cms.form.ReferenceField.<init>(ReferenceField.java:34)
      	at org.ametys.cms.workflow.EditContentFunction._bindReferenceField(EditContentFunction.java:2057)
      	at org.ametys.cms.workflow.EditContentFunction._bindAndValidateReferenceMetadata(EditContentFunction.java:2028)
      	at org.ametys.cms.workflow.EditContentFunction._bindAndValidateMetadata(EditContentFunction.java:839)
      	at org.ametys.cms.workflow.EditContentFunction._bindAndValidateMetadataSetElement(EditContentFunction.java:617)
      	at org.ametys.cms.workflow.EditContentFunction._bindAndValidateMetadataSetElement(EditContentFunction.java:623)
      	at org.ametys.cms.workflow.EditContentFunction._bindAndValidateCompositeMetadata(EditContentFunction.java:987)
      	at org.ametys.cms.workflow.EditContentFunction._bindAndValidateMetadata(EditContentFunction.java:836)
      	at org.ametys.cms.workflow.EditContentFunction._bindAndValidateMetadataSetElement(EditContentFunction.java:617)
      	at org.ametys.cms.workflow.EditContentFunction._bindAndValidateMetadataSetElement(EditContentFunction.java:623)
      	at org.ametys.cms.workflow.EditContentFunction._bindAndValidateContent(EditContentFunction.java:567)
      	at org.ametys.cms.workflow.EditContentFunction.execute(EditContentFunction.java:331)
      

            laurence Laurence Aumeunier
            laurence Laurence Aumeunier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: