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

Unable to edit a external and local field in a result grid

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.4.0
    • 4.1.12, 4.2.0
    • None
    • None
    • 4.4 RC3

      For a "synchronizable" field (external and local value) the excepted value for edition is a json map but we have the textfield to edit the metadata instead of the externalizable widget.

      In a search model the widget to edit the field is determined by the SearchUIColumn. This can not depend on edited content. But to get the external and local fields we need the content...

      Sample of error when editing a "synchronizable" string from a search result grid

      Unrecognized token 'TEST': was expecting ('true', 'false' or 'null')
      at [Source: java.io.StringReader@39257fa4; line: 1, column: 9]
      com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'TEST': was expecting ('true', 'false' or 'null')
      at [Source: java.io.StringReader@39257fa4; line: 1, column: 9]
          at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1702)
          at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:558)
          at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._reportInvalidToken(ReaderBasedJsonParser.java:2839)
          at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._handleOddValue(ReaderBasedJsonParser.java:1903)
          at com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextToken(ReaderBasedJsonParser.java:749)
          at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:3850)
          at com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:3772)
          at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2115)
          at org.ametys.core.util.JSONUtils.convertJsonToMap(JSONUtils.java:94)
          at org.ametys.cms.workflow.EditContentFunction._getLocalValues(EditContentFunction.java:867)
          at org.ametys.cms.workflow.EditContentFunction._bindAndValidateStringMetadata(EditContentFunction.java:1112)
          at org.ametys.cms.workflow.EditContentFunction._bindAndValidateMetadata(EditContentFunction.java:813)
          at org.ametys.cms.workflow.EditContentFunction._bindAndValidateMetadataSetElement(EditContentFunction.java:627)
          at org.ametys.cms.workflow.EditContentFunction._bindAndValidateContent(EditContentFunction.java:577)
          at org.ametys.cms.workflow.EditContentFunction.execute(EditContentFunction.java:324)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at 
      

        1. image-2021-03-23-11-39-08-309.png
          5 kB
          Magali Franchet
        2. image-2021-03-23-11-39-20-390.png
          3 kB
          Magali Franchet
        3. image-2021-03-23-11-45-00-883.png
          9 kB
          Magali Franchet
        4. image-2021-03-23-11-45-14-427.png
          9 kB
          Magali Franchet
        5. image-2021-03-23-12-00-51-249.png
          3 kB
          Magali Franchet
        6. image-2021-03-23-18-05-09-312.png
          9 kB
          Magali Franchet
        7. image-2021-03-29-10-39-56-375.png
          24 kB
          Magali Franchet

            cbayle Caroline Bayle
            laurence Laurence Aumeunier
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: