Affects Version/s: 6.2.2 CE GA3
Fix Version/s: None
- Set portal.proxy.path=/portal in portal-ext.properties
- Apply workaround from Bejond Shao's comment from
LPS-49447in order to make Liferay start up properly at all
- Put Audience Targeting 1.1 to Liferay's deploy directory
- Start the portal
- Log in as Administrator, go to control panel
- Go to some site's administration
- First sign of a problem is the fact that the Audience Targeting portlet's icon is broken. This is due to a faulty src attribute of the icon's img tag: /portal/portal/o/content-targeting-web/icons/icon.png instead of /portal/o/content-targeting-web/icons/icon.png (note the duplicated proxy path)
The problem, at first glance, lies in the PortletImpl.getStaticResourcePath() method, which concatenates proxyPath (/portal) with the result of getContextPath() method (/portal/o/content-targeting-web).
By comparison to a similar getStaticResourcePath method in ThemeImpl I came to conclusion that it's the getContextPath() method where the root of the problem lies, because in the ThemeImpl the proxy path is not contained in context path.
Going further I found out that the context path is retrieved from a ServletContext from ServletContextPool. This was where I hit the wall, not being able to track down what creates the faulty servletContext which is later put into the ServletContextPool in the first place.
A quick and dirty workaround may be to replace this line in getStaticResourcePath():
I think it may lead to some unexpected behaviour if proxy path equals o or some portlet's name, but that seems like a rather cornery case and it gets the job done, i.e. makes Audience Targeting work.