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

Actions block of MessageBoardThreads has incorrect id in the built URL

    Details

    • Fix Priority:
      3

      Description

      When you send a GET request to get a MessageBoardThread (or a collection of MessageBoardThreads), the actions block received in the response has the incorrect identifier replaced in the built URL.

      Steps to reproduce:

      1. Create some MBThreads
      2. Make a sent request to get the threads:
      3. curl "http://localhost:8080/o/headless-delivery/v1.0/sites/{SITE_ID}/message-board-threads" -u '[email protected]:test'
      4. Check the Thread id and the id used in the built URL actions

      Expected result: Both should be the same

      Result: The id used in the URL is incorrect, seems to be the id of the thread's root message

      Response example:

      {
        "actions" : {
          "reply-to-thread" : {
            "method" : "POST",
            "href" : "http://localhost:8080/o/headless-delivery/v1.0/message-board-threads/39145/message-board-messages"
          },
          "subscribe" : {
            "method" : "PUT",
            "href" : "http://localhost:8080/o/headless-delivery/v1.0/message-board-threads/39145/subscribe"
          },
          "unsubscribe" : {
            "method" : "PUT",
            "href" : "http://localhost:8080/o/headless-delivery/v1.0/message-board-threads/39145/unsubscribe"
          },
          "get" : {
            "method" : "GET",
            "href" : "http://localhost:8080/o/headless-delivery/v1.0/message-board-threads/39145"
          },
          "replace" : {
            "method" : "PUT",
            "href" : "http://localhost:8080/o/headless-delivery/v1.0/message-board-threads/39145"
          },
          "delete" : {
            "method" : "DELETE",
            "href" : "http://localhost:8080/o/headless-delivery/v1.0/message-board-threads/39145"
          }
        },
        "articleBody" : "blabla",
        "creator" : {
          "additionalName" : "",
          "contentType" : "UserAccount",
          "familyName" : "Test",
          "givenName" : "Test",
          "id" : 20129,
          "name" : "Test Test"
        },
        "creatorStatistics" : {
          "joinDate" : "2021-03-25T11:35:30Z",
          "postsNumber" : 3,
          "rank" : "Youngling"
        },
        "customFields" : [ ],
        "dateCreated" : "2021-03-25T11:54:39Z",
        "dateModified" : "2021-03-25T11:54:40Z",
        "encodingFormat" : "bbcode",
        "friendlyUrlPath" : "my-thread",
        "hasValidAnswer" : false,
        "headline" : "my thread",
        "id" : 39146,
        "keywords" : [ ],
        "locked" : false,
        "messageBoardSectionId" : 0,
        "numberOfMessageBoardAttachments" : 0,
        "numberOfMessageBoardMessages" : 2,
        "relatedContents" : [ ],
        "seen" : true,
        "showAsQuestion" : false,
        "siteId" : 20125,
        "subscribed" : true,
        "taxonomyCategoryBriefs" : [ ],
        "viewCount" : 6
      }

        Attachments

          Activity

            People

            Assignee:
            javier.gamarra Javier Gamarra
            Reporter:
            javier.dearcos Javier de Arcos Velilla
            Participants of an Issue:
            Recent user:
            Sophia Zhang
            Engineering Assignee:
            Javier Gamarra
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              36 weeks, 1 day ago

                Packages

                Version Package
                7.4.0 CE GA1 DXP 7,4
                7.4.13 DXP GA1
                Master