Application adapters aren't applied in taglib's startTag

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:

this:

comment for changes (**)

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

Attachments

4

Activity

Show:

Manuel de la PeñaFebruary 16, 2016 at 6:32 AM

I'm closing this ticket because it seems it has been solved in https://github.com/brianchandotcom/liferay-portal/pull/26888

Please reopen it if you consider there is something to be done.

Thanks

Melody WuDecember 22, 2015 at 12:37 AM

PASSED Manual Testing following the steps in the description.

Reproduced on:
Tomcat 7.0.62 + MySQL 5.6.10 Portal master GIT ID: 0affd5b26916e6801e1d60e0b2b3525e553a6564.

Article appears on live page.

Fixed on:
Tomcat 7.0.62 + MySQL 5.6.10 Portal ee-6.2.x EE GIT ID: b91d5c1d5286994dfc0009e5303b4d284a666b1e.

Article does not appear on live page.

Raymond AugéMay 28, 2015 at 11:32 AM

{markdown}Just started reviewing <br><br>![NodeGH](http://nodegh.io/images/octocat.png) Sent from [GH](http://nodegh.io).{markdown}

Peter BorkutiMay 15, 2015 at 3:53 AM
Edited

Dear Jan,

Thank you for your effort, it helped a lot.

Jan EerdekensJune 6, 2014 at 2:22 AM

After checking the code we ended up in com.liferay.taglib.util.IncludeTag where it seems the body will have application adapters applied, but nog the start and end JSPs. After quickly changing the class to take into account application adapters in doStartTag and doEndTag it seems that it can possibly work. I've attached our quickly hacked IncludeTag class as an example.

Fixed

Details

Assignee

Reporter

Branch Version/s

6.2.x

Backported to Branch

Committed

Fix Priority

4

Git Pull Request

Story Points

Components

Fix versions

Priority

Zendesk Support

Created June 6, 2014 at 2:17 AM
Updated June 25, 2023 at 10:18 PM
Resolved February 16, 2016 at 6:32 AM
Loading...