Details

    • Liferay Contributor's Agreement:
      Accept
    • Similar Issues:
      Show 4 results 

      Description

      We implementing own portlet - this portlet shoudl display web-content by specified articleId.
      So, to do it we are using followed code:

      <%
      JournalArticleDisplay articleDisplay = JournalContentUtil.getDisplay(themeDisplay.getScopeGroupId(), String.valueOf(articleId), null, themeDisplay.getLanguageId(), themeDisplay);
      %>

      <%= displayArticle == null ? StringPool.BLANK : displayArticle.getContent() %>

      this works fine for normal articles - but in case we are trying to display template driven article - we always got null from getDisplay method.

        Issue Links

          Activity

          Alexey Kakunin created issue -
          Hide
          Alexey Kakunin added a comment -

          Problem in com.liferay.portal.kernel.templateparser.BaseTransformer class - in method transform it creates templateParser (actually com.liferay.portlet.journal.util.VelocityTemplateParser) with using current thread classloader - which is plugins classloader - and failed (since this class is from portal-impl and not available fro plugins).

          To fix this bug we need to use portal's classloader and change code in lines starting from 143 to:

          if (Validator.isNotNull(templateParserClassName)) {
          TemplateParser templateParser = null;
          // Fix for LPS-25992
          ClassLoader classLoader =
          PortalClassLoaderUtil.getClassLoader();

          try

          { templateParser = (TemplateParser)InstanceFactory.newInstance(classLoader, templateParserClassName); }

          catch (Exception e)

          { throw new TransformException(e); }
          Show
          Alexey Kakunin added a comment - Problem in com.liferay.portal.kernel.templateparser.BaseTransformer class - in method transform it creates templateParser (actually com.liferay.portlet.journal.util.VelocityTemplateParser) with using current thread classloader - which is plugins classloader - and failed (since this class is from portal-impl and not available fro plugins). To fix this bug we need to use portal's classloader and change code in lines starting from 143 to: if (Validator.isNotNull(templateParserClassName)) { TemplateParser templateParser = null; // Fix for LPS-25992 ClassLoader classLoader = PortalClassLoaderUtil.getClassLoader(); try { templateParser = (TemplateParser)InstanceFactory.newInstance(classLoader, templateParserClassName); } catch (Exception e) { throw new TransformException(e); }
          Alexey Kakunin made changes -
          Field Original Value New Value
          Status Open [ 1 ] Contributed Solution [ 10001 ]
          Company Name EmDev Limited
          Liferay Contributor's Agreement Accept [ 10033 ]
          Alexey Kakunin made changes -
          Status Contributed Solution [ 10001 ] Community Resolved [ 10009 ]
          Hide
          Richard Gibson added a comment -

          This is a duplicate of LPS-18364

          Show
          Richard Gibson added a comment - This is a duplicate of LPS-18364
          Mika Koivisto made changes -
          Link This issue duplicates LPS-18364 [ LPS-18364 ]
          Mika Koivisto made changes -
          Status Community Resolved [ 10009 ] Resolved [ 5 ]
          Assignee SE Support [ support-lep@liferay.com ] Mika Koivisto [ koivimik ]
          Resolution Duplicate [ 3 ]
          Michael Saechang made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Fix Version/s 6.1.1 CE GA2 [ 11326 ]
          Michael Saechang made changes -
          Verified By: koivimik
          Andrew Kim made changes -
          Workflow LPS Workflow [ 294158 ] Copy of LPS Workflow [ 430955 ]
          Andrew Kim made changes -
          Workflow Copy of LPS Workflow [ 430955 ] LPS Workflow [ 462563 ]
          Andrew Kim made changes -
          Workflow LPS Workflow [ 462563 ] Copy 2 of LPS Workflow [ 494938 ]
          Andrew Kim made changes -
          Workflow Copy 2 of LPS Workflow [ 494938 ] LPS Workflow [ 526824 ]
          Randy Zhu made changes -
          Workflow LPS Workflow [ 526824 ] PUBLIC - LPS Generic Workflow [ 578790 ]
          Randy Zhu made changes -
          Workflow PUBLIC - LPS Generic Workflow [ 578790 ] Copy of PUBLIC - LPS Generic Workflow [ 613090 ]
          Randy Zhu made changes -
          Workflow Copy of PUBLIC - LPS Generic Workflow [ 613090 ] PUBLIC - LPS Generic Workflow [ 645018 ]
          Randy Zhu made changes -
          Workflow PUBLIC - LPS Generic Workflow [ 645018 ] PUBLIC - LPS General Workflow [ 738323 ]
          Randy Zhu made changes -
          Workflow PUBLIC - LPS General Workflow [ 738323 ] PUBLIC - LPS Bugs Workflow [ 833540 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Contributed Solution Contributed Solution
          3m 59s 1 Alexey Kakunin 08/Mar/12 1:46 PM
          Contributed Solution Contributed Solution Community Resolved Community Resolved
          6s 1 Alexey Kakunin 08/Mar/12 1:46 PM
          Community Resolved Community Resolved Resolved Resolved
          326d 4h 1m 1 Mika Koivisto 28/Jan/13 5:48 PM
          Resolved Resolved Closed Closed
          2m 24s 1 Michael Saechang 28/Jan/13 5:50 PM

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

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

                Development

                  Structure Helper Panel