Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
6.2.0 CE M2
-
4
-
Regression Bug
Description
LPS-28904 introduced support of title and description translation for multi-portlet plugins on trunk. It could seem at first sight that this LPS solved the page title problem on trunk, but it doesn't work properly:
PortalImpl.java
// ... public String getPortletTitle(RenderRequest renderRequest) { String portletId = (String)renderRequest.getAttribute( WebKeys.PORTLET_ID); Portlet portlet = PortletLocalServiceUtil.getPortletById(portletId); HttpServletRequest request = PortalUtil.getHttpServletRequest( renderRequest); ServletContext servletContext = (ServletContext)request.getAttribute( WebKeys.CTX); Locale locale = request.getLocale(); return getPortletTitle(portlet, servletContext, locale); } // ...
>>> During the creation of HttpServletRequest the original locale of RenderRequest (e.g. fr_FR) is being lost, and the new request will have different locale.
More precisely: The locale of the newly created HttpServletRequest will be equal to the value of the renderRequest's "Accept-Language" header, which is equal to the given browser's locale, regardless of the set portal displayLocale or portal defaultLocale.
Changing the portal's default locale doesn't solve the problem.