Foros de discusión

<liferay-ui:language /> not working in own portlet

thumbnail
Manuel Miklo, modificado hace 10 años.

<liferay-ui:language /> not working in own portlet

New Member Mensajes: 20 Fecha de incorporación: 30/01/10 Mensajes recientes
Hi folks,

i have a problem with the <liferay-ui:language /> Tag.
I have created a small portlet which implement this tag. But in Liferay 6.2 its not working.
The problem is the generated link with its namespace.
Here is a link, which is generated from my portlet.

http://localhost:8080/web/guest/256?p_p_id=82&p_p_lifecycle=1&p_p_state=normal&p_p_mode=view&p_p_col_id=column-2&p_p_col_pos=1&p_p_col_count=2&_82_struts_action=%2Flanguage%2Fview&_82_redirect=%2Fweb%2Fguest%2F256&_testlanguage_WAR_testlanguageportlet_languageId=de_DE

The problem is the last parameter with its namespace.
If i put a small code in the portal-web/docroot/html/taglib/ui/language/page.jsp which replace the namespace, it works very well.

<%
if(!namespace.equals("_82_")){
namespace = "_82_";
}
%>
So the problem must be, that its not working with this namespace.

When the link is rendered as follow, it works.
http://localhost:8080/web/guest/256?p_p_id=82&p_p_lifecycle=1&p_p_state=normal&p_p_mode=view&p_p_col_id=column-2&p_p_col_pos=1&p_p_col_count=2&_82_struts_action=%2Flanguage%2Fview&_82_redirect=%2Fweb%2Fguest%2F256&_82_languageId=de_DE

What would be a clean solution to solve this problem?

Greats and regards
Manuel
Gunnar Brinkmann, modificado hace 10 años.

RE: <liferay-ui:language /> not working in own portlet

Junior Member Mensajes: 53 Fecha de incorporación: 2/12/11 Mensajes recientes
I'm voting for this question, too :-)

(we hide the dockbar for non-admins and customize the login portlet via hook to add logout, language selection and site selection)
thumbnail
Marino Alcaide, modificado hace 10 años.

RE: <liferay-ui:language /> not working in own portlet

New Member Mensajes: 4 Fecha de incorporación: 6/04/10 Mensajes recientes
Hi Manuel,

I have the same problem!! Did you found any solution?

Thanks in advance
thumbnail
Aritz Galdos, modificado hace 9 años.

RE: <liferay-ui:language /> not working in own portlet

Expert Mensajes: 416 Fecha de incorporación: 15/05/07 Mensajes recientes
Hi Guys

It looks pretty much like a bug.

I inserted the code proposed by Manuel using a Hook to modify the jsp that renders the language and it works just fine.

I think that in this very case, the namespace variable should not be determined by the portlet rendering the links ( that make the request to change the language) and should always be the namespace of portlet 82 ( language portlet)

I will check whether it is reported in Jira.

Regards!
thumbnail
Aritz Galdos, modificado hace 9 años.

RE: <liferay-ui:language /> not working in own portlet

Expert Mensajes: 416 Fecha de incorporación: 15/05/07 Mensajes recientes
Hi,

I created the issue in JIRA

https://issues.liferay.com/browse/LPS-49415

Regards,