Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
6.2.X EE, 7.0.0 Beta 1
-
6.2.x
-
Committed
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
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
- Hit Invoke
- 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)