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

JSON WS GUI is not permitting blank themeDisplay value for get-article-content, even though it is permissible via curl

Details

    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.

      Attachments

        Issue Links

          Activity

            People

              spencer.woo Spencer Woo
              brian.suh Brian Suh
              Kiyoshi Lee Kiyoshi Lee
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                5 years, 15 weeks, 3 days ago

                Packages

                  Version Package