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

Displaying incorrect article specified with resourcePrimKey

    Details

    • Type: Bug
    • Status: Verified
    • Resolution: Unresolved
    • Affects Version/s: 6.2.3 CE GA4
    • Fix Version/s: None
    • Component/s: Knowledge Base
    • Labels:
    • Story Points:
      3
    • Fix Priority:
      3

      Description

      Display portlet - when a specific article is to be displayed, one can compose render url using mvcPath view.jsp together with resourcePrimKey parameter. But in case the given article is in the root folder, that resourcePrimKey is ignored and the first one in the root folder is served instead.

      This is caused by incorrect condition in isDescendant() method in KBFolderKBArticleSelector.java

      I propose to add the following code to prevent this behaviour:

      if (kbArticle.getKbFolderId() == KBFolderConstants.DEFAULT_PARENT_FOLDER_ID) {
               return true;
      }
      

        Attachments

          Activity

            People

            • Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              honyk Jan Tošovský
              Participants of an Issue:
              Recent user:
              Esther Sanz
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Days since last comment:
                4 years, 21 weeks, 3 days ago

                Packages

                Version Package