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

Error when editing a content value from a result grid

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.3.0
    • None
    • None
    • None

      How to reproduce

      • On a ODF project I do a solr search on program contents, with the result column title and place
      • "place" is a content metadata (reference table)
      • I try to edit the place of the returned programs

      I have the following error

      class java.util.ArrayList cannot be cast to class java.lang.String (java.util.ArrayList and java.lang.String are in module java.base of loader 'bootstrap')
      java.lang.ClassCastException: class java.util.ArrayList cannot be cast to class java.lang.String (java.util.ArrayList and java.lang.String are in module java.base of loader 'bootstrap')
          at org.ametys.cms.workflow.EditContentFunction._bindAndValidateContentReferenceMetadata(EditContentFunction.java:2264)
          at org.ametys.cms.workflow.EditContentFunction._bindAndValidateMetadata(EditContentFunction.java:861)
          at org.ametys.cms.workflow.EditContentFunction._bindAndValidateMetadataSetElement(EditContentFunction.java:633)
          at org.ametys.cms.workflow.EditContentFunction._bindAndValidateContent(EditContentFunction.java:583)
      

          [CMS-10167] Error when editing a content value from a result grid

          It is because the "place" field is an externalizable field.

          Th expected json by the EditContentFunction is not the sent json from the grid

          Laurence Aumeunier added a comment - It is because the "place" field is an externalizable field. Th expected json by the EditContentFunction is not the sent json from the grid

          Laurence Aumeunier added a comment - - edited

          Parameters sent to server are :
          URL: /plugins/cms/do-action/2
          Parameters:

          {
              "values": {
                      "content.input.place": [
                              "content://5847568f-8069-4a12-b711-0233d3c0c32e"
                          ]
                  },
              "contentId": "programContent://45959e34-2e04-457a-82d9-b4402893b472",
              "quit": true,
              "content.metadata.set": null
          }
          

          Laurence Aumeunier added a comment - - edited Parameters sent to server are : URL: /plugins/cms/do-action/2 Parameters: { "values": { "content.input.place": [ "content://5847568f-8069-4a12-b711-0233d3c0c32e" ] }, "contentId": "programContent://45959e34-2e04-457a-82d9-b4402893b472", "quit": true, "content.metadata.set": null }

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

              Created:
              Updated:
              Resolved: