Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-61479

Unable to add message board attachment via JSON

Details

    Description

      Description
      Unable to add message board attachment via JSON

      UPDATE: Steps to reproduce with patch
      Changed the JSONWS API. New steps to reproduce/test:
      1. Start Liferay and login as admin
      2. Go to

      {domain}/api/jsonws?signature=%2Fmbmessage%2Fadd-message-11-groupId-categoryId-subject-body-format-fileName-file-anonymous-priority-allowPingbacks-serviceContext. Fill out fields like below and submit form.
      groupId: groupId of Guest group
      categoryId: 0
      subject: any string
      body: any string
      fileName: any valid file name with file type. ex: "test.txt"
      file: any file that corresponds to file type from fileName
      3. Go to Site Administration > Message Boards

      Expected results: Results tab shows the MBMessage created. Navigate to Site Administration (of Liferay site) > Content > Message Boards. It should contain the MBMessage with the file attached.

      ----

      Old steps, not applicable!
      Steps to reproduce/Testing done
      # Start Liferay and login as admin
      # Go to {domain}

      /api/jsonws?signature=%2Fmbmessage%2Fadd-message-10-groupId-categoryId-subject-body-format-inputStreamOVPs-anonymous-priority-allowPingbacks-serviceContext

        • groupId: Enter the Site ID located in the Site Settings
        • categoryId: 0
        • Subject: Any string
        • Body: Any string
        • Format: html
        • inputStreamOVPs: [test.txt,123456]
        • Anonymous: Any boolean value
        • Priority: 0
        • allowPingbacks: Any boolean value
      1. Hit Invoke
      2. Receive the following error:
        "Unable to convert to type: com.liferay.portal.kernel.util.ObjectValuePair"

      If inputStreamOVPs is set to:
      []
      The post submits successfully.

      Results of Testing
      Expected behavior: The message board post and attachment is added
      Actual behavior: An error is returned and the post and attachment is not added

      Errors/Logs
      "Unable to convert to type: com.liferay.portal.kernel.util.ObjectValuePair"

      Reproduced...
      Reproduced in trunk? Unable to test; the JSON api has changed ( 66aed56d5b2e1b93d20660fb44b4316f7f0107ef)
      Reproduced in branch? Yes, "jodd.typeconverter.TypeConversionException" (1df12fe8e3e51d564926c8a86b4486fd3ee17589)

      Attachments

        Issue Links

          Activity

            People

              brian.chan Brian Chan
              jonathan.mak Jonathan Mak (Inactive)
              Kiyoshi Lee Kiyoshi Lee
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                7 years, 24 weeks, 2 days ago

                Packages

                  Version Package
                  6.2.5 CE GA6
                  6.2.X EE
                  7.0.0 Beta 1