Details
-
Bug
-
Status: Closed
-
Resolution: Duplicate
-
7.0.0 DXP FP26, 7.0.X, Master
-
None
Description
While attempting to test /journal.journalarticle/get-article-content through JSON WS's GUI form, we cannot pass a blank value for themeDisplay.
When we try to pass the values through the UI, we get an error:
"Conversion failed: com.liferay.portal.kernel.theme.ThemeDisplay"
However, when we can pass a blank value using curl or URL by setting -theme-display:
curl http://localhost:8080/api/jsonws/journal.journalarticle/get-article-content \ -u [email protected]:test \ -d groupId=20143 \ -d articleId='37320' \ -d languageId='en-US' \ -d -themeDisplay=
In practice, if we run this, it'll return with the article:
$ curl http://localhost:8080/api/jsonws/journal.journalarticle/get-article-content \ > -u [email protected]:test \ > -d groupId=20143 \ > -d articleId='37320' \ > -d languageId='en-US' \ > -d -themeDisplay= "<p>Test Data<\/p>"
Steps to Reproduce
1. Start up Liferay DXP + FP26
2. In a new window, note the Liferay DXP (default site)'s GroupID
3. Create a new article in Web Content in Liferay DXP (default site), and note its article ID
4. Access JSON WS, and go to the get-article-content-4 method: http://localhost:8080/api/jsonws?contextName=journal&signature=%2Fjournal.journalarticle%2Fget-article-content-4-groupId-articleId-languageId-themeDisplay
5. Fill in the form with the details found in steps 2-4 (en_US for languageId), and leave the themeDisplay blank
Result
"Conversion failed: com.liferay.portal.kernel.theme.ThemeDisplay"
However, if we try the curl example as listed in the description above (where we set -themeDisplay), it works fine.