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

Websphere 9.0 - Could not add wiki content via headless api

    Details

    • Fix Priority:
      3
    • Application Servers:
      IBM Websphere 9.0

      Description

      Steps to reproduce:

      1. Set up Websphere enviroment
      2. Add a site, get its groupId from database
      3. Add a widget page
      4. Add a Wiki to the widget page
      5. Gets wiki's resourcePrimKey from database table wikipageresource by groupId
      6. Run the following curl command:
         curl -X PUT -H "Content-Type: application/json" -u "[email protected]:test" -d "{\"creator\":{},\"viewableBy\":\"Anyone\",\"keywords\":[],\"taxonomyCategoryIds\":[0],\"encodingFormat\":\"creole\",\"wikiNodeId\":0,\"headline\":\"FrontPage\",\"content\":\"Test Wiki Content\"}" http://localhost:8080/o/headless-delivery/v1.0/wiki-pages/${resourcePrimKey}
      7. Replace resourcePrimKey with the one you get
      8. Check the response

      Actual result:
      Could not add wiki content via headless api, internal server error occurs:

      {
        "status" : "INTERNAL_SERVER_ERROR"
      }
      

      Expected result:
      Could add wiki content via headless api, the following one is get from server tomcat:

         [exec]     Executing commands: curl -X PUT -H 'Content-Type: application/json' -u '[email protected]:test' -d '{
           [exec]     				"content": "Test Wiki Content",
           [exec]     				"creator": {},
           [exec]     				"encodingFormat": "creole",
           [exec]     				"headline": "FrontPage",
           [exec]     				"keywords": [],
           [exec]     				"taxonomyCategoryIds": [0],
           [exec]     				"viewableBy": "Anyone",
           [exec]     				"wikiNodeId": 0
           [exec]     			}' http://localhost:8080/o/headless-delivery/v1.0/wiki-pages/41627
           [exec]     Response: {
           [exec]       "actions" : { },
           [exec]       "content" : "Test Wiki Content",
           [exec]       "creator" : {
           [exec]         "additionalName" : "",
           [exec]         "contentType" : "UserAccount",
           [exec]         "familyName" : "Test",
           [exec]         "givenName" : "Test",
           [exec]         "id" : 20127,
           [exec]         "name" : "Test Test"
           [exec]       },
           [exec]       "customFields" : [ ],
           [exec]       "dateCreated" : "2021-09-08T01:18:50Z",
           [exec]       "dateModified" : "2021-09-08T01:18:56Z",
           [exec]       "description" : "",
           [exec]       "encodingFormat" : "text/x-wiki",
           [exec]       "externalReferenceCode" : "41626",
           [exec]       "headline" : "FrontPage",
           [exec]       "id" : 41627,
           [exec]       "keywords" : [ ],
           [exec]       "numberOfAttachments" : 0,
           [exec]       "numberOfWikiPages" : 0,
           [exec]       "relatedContents" : [ ],
           [exec]       "siteId" : 41618,
           [exec]       "subscribed" : false,
           [exec]       "taxonomyCategoryBriefs" : [ ],
           [exec]       "wikiNodeId" : 41625
           [exec]     }Finished executing commands.

      Note: this issue is found when running LocalFile.ApplicationDisplayTemplatesUseCase#ViewWidgetTemplateAppliedToWiki in websphere.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              yang.cao Yang Cao
              Reporter:
              lu.liu Lu Liu
              Participants of an Issue:
              Recent user:
              Yang Cao
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                19 weeks, 3 days ago

                  Packages

                  Version Package