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

Application adapters aren't applied in taglib's startTag

    Details

      Description

      When an Application Adapter hook is used to hook for example \html\taglib\ui\search\page.jsp ** \html\taglib\ui\section\start.jsp file, portal does not take it into account and shows only the original page.jsp start.jsp file.

      Application Adapter logic is applied for files only in #doEndTag in com.liferay.taglib.util.IncludeTag. We should use #getCustomPage method in #doStartTag too.

      steps to reproduce

      1. start portal
      2. deploy tagappadapter-hook
      3. select tagappadapter-hook for Liferay site Application Adapter (Admin=>Configuration=>Site settings, select Tag ApplicationAdapter Hook)
        A bug on trunk prevent select anything on this page. See the warning.
      4. Save
      5. Put Navigation and Bookmarks portlets onto a page

      h4. expected behaviour
      Both Navigation and Bookmarks portlet should change (some text will appear on the portlets)
      Bookmarks portet, go to Configuration, Sharing and check the sections on the page

      h4. experienced behaviour
      Only Navigation portlet is hooked

      warning

      A bug on trunk (LPS-54205) prevent selecting an Application Adapter hook (or anything) on Site settings.
      Edit liferay-portal\modules\apps\site\site-admin-web\src\META-INF\resources\edit_site.jsp
      and insert after this code:

      		var toggleCompatibleSiteTemplates = function(event) {
      			var siteTemplate = applicationAdapter.val();
      

      this:

      			if (!siteTemplate) {
      				return;
      			}
      

      comment for changes (**)

      The search tag is not used on master, so I found the section tag for testing.

        Attachments

        1. fix-62.png
          fix-62.png
          40 kB
        2. IncludeTag.java
          10 kB
        3. reproduce.png
          reproduce.png
          37 kB
        4. tagappadapter-hook-7.0.0.3.war
          4 kB

          Issue Links

            Activity

              People

              Assignee:
              melody.wu Melody Wu
              Reporter:
              jan.eerdekens@gmail.com Jan Eerdekens
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                4 years, 41 weeks, 4 days ago

                  Packages

                  Version Package
                  6.2.X EE
                  7.0.0 M6