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

Global structure not found when selecting template as a request parameter

    Details

    • Story Points:
      2

      Description

      Reproduction Steps
      1- Add a template and structure in global scope. Note the template ID
      2 - Modify the journal_content/view.jsp
      from line 347:
      <liferay-portlet:renderURL portletName="<%= PortletKeys.JOURNAL %>" var="addArticleURL" windowState="<%= WindowState.MAXIMIZED.toString() %>">
      <portlet:param name="struts_action" value="/journal/edit_article" />
      <portlet:param name="redirect" value="<%= currentURL %>" />
      <portlet:param name="portletResource" value="<%= portletDisplay.getId() %>" />
      <portlet:param name="groupId" value="<%= String.valueOf(scopeGroupId) %>" />
      <portlet:param name="templateId" value="TEMPLATEID" /> <!--This is the new one. Suppose there's a template in global scope with ID "TEMPLATEID" -->
      </liferay-portlet:renderURL>

      Add a new Web Content from a web content display. You'll get a NoSuchStructureException.

      Additional Information

      The problem is in /html/portlet/journal/article/content.jsp line 75:
      Instead of

      structure = JournalStructureLocalServiceUtil.getStructure(structureGroupId, structureId);

      it should be

      structure = JournalStructureLocalServiceUtil.getStructure(structureGroupId, structureId, true);

      Furthermore, on the UI, the Template will say "None". This is set in content.jsp, due to the fact that the template is empty. There seems to be an issue with setting the templateId this way when the structure is from the global scope.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mark.jin Mark Jin (Inactive)
                Reporter:
                gabor.pusoma Gabor Pusoma (Inactive)
                Participants of an Issue:
                Recent user:
                Randy Zhu (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  4 years, 1 week, 3 days ago

                  Subcomponents