Foros de discusión

[Solved?] Broken: "Back" (Plugin Installer), "Return to Full Page"

thumbnail
Sebastien Diot, modificado hace 14 años.

[Solved?] Broken: "Back" (Plugin Installer), "Return to Full Page"

Junior Member Mensajes: 35 Fecha de incorporación: 10/02/09 Mensajes recientes
I have "Liferay Portal Standard Edition 5.2.3 (Augustine / Build 5203 / May 20, 2009)" installed as a Tomcat ROOT Bundle. I went to the Plugin Installer, and installed a few themes and layouts. I noticed that the "Back" button in the top right corner that one sees when looking at the description of a plugin is broken. The link looks like this:

http://group/control_panel/manage?p_p_id=111&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&doAsGroupId=10136&refererPlid=10139&_111_struts_action=%2Fplugin_installer%2Fview&_111_backURL=%2F%2Fgroup%2Fcontrol_panel%2Fmanage%3Fp_p_id%3D136%26p_p_lifecycle%3D0%26p_p_state%3Dmaximized%26p_p_mode%3Dview%26doAsGroupId%3D10136%26refererPlid%3D10139%26_136_struts_action%3D%252Fadmin_plugins%252Fview%26_136_tabs1%3Dplugins%26_136_tabs3%3D%26tabs2%3Dlayout-template-plugins&_111_tabs1=plugins&_111_tabs2=layout-template-plugins


As you can see, the host is missing. I have Apache proxy everything to Tomcat like this:

<location />
        Order allow,deny
        Allow from all

       ProxyPass           ajp://127.0.0.1:8009/
       ProxyPassReverse    ajp://127.0.0.1:8009/


Can't really get more simple then this. The link is OK if I go directly to Tomcat http://host:8080/, but not under http://host/. Strange thing is that it only seems to be that one link, and nothing else, so it must be somehow differently implemented then all the others. Should I raise an issue on this? What could I have done wrong? I haven't found anyone else complaining about that. I can't imagine anyone having Tomcat run on port 80 for an real Internet site, so others must have noticed this problem too.

EDIT:

I found another occurrence. If I select "Configuration" for any displayed portlet on a page, the "Return to Full Page" button is also broken. This is a lot more significant, as portlets are much more often configured then installed.
thumbnail
Sebastien Diot, modificado hace 14 años.

RE: Broken: "Back" (Plugin Installer), "Return to Full Page&

Junior Member Mensajes: 35 Fecha de incorporación: 10/02/09 Mensajes recientes
Since I got no reply at all, I downloaded the source code and looked around for the bug myself. In the file "liferay-portal-src-5.2.3\portal-web\docroot\html\portal\render_portlet.jsp", line 670 is this code:

	urlBack = ParamUtil.getString(renderRequestImpl, "returnToFullPageURL");
	urlBack = HtmlUtil.stripHtml(urlBack);

When accessing Liferay under http://host:8080/web/guest/home and configuring a portlet there, the Return to Full Page button is also http://host:8080/web/guest/home, which is what is expected. If I give out the value of "urlBack", it is /web/guest/home. Now if I access Liferay through Apache, the value of "urlBack" is //web/guest/home (notice the double / at the beginning). That is why it doesn't work. Now I can fix this by adding the following lines in the code, but it's really just a hack, as I have no clue why Liferay/Tomcat produce different HTML depending from whether it is accessed directly over 8080 or through AJP.

    if ((urlBack != null) &amp;&amp; urlBack.startsWith("//")) {
        urlBack = urlBack.substring(1);
    }

Does anyone have a clue about the real cause of this problem?
mohammed abdelouhab, modificado hace 13 años.

RE: Broken: "Back" (Plugin Installer), "Return to Full Page&

New Member Mensaje: 1 Fecha de incorporación: 27/02/11 Mensajes recientes
Hi

The solution is,
First your problem is occurred because your httpd (proxy-mode) configuration is not correct; your address ajp must be ajp://127.0.0.1:8009 and not ajp://127.0.0.1:8009/ with "/"
<Location />
Order allow,deny
Allow from all

ProxyPass ajp://127.0.0.1:8009
ProxyPassReverse ajp://127.0.0.1:8009
</Location>