Fórum

message board context path error!

billy chan, modificado 15 Anos atrás.

message board context path error!

Junior Member Postagens: 43 Data de Entrada: 19/11/07 Postagens Recentes
Dear all,
I am using liferay 5.1.1 and set the root path to portal. I have set a message board for a forum. In the home page, I using a RSS portlet to display recent post. However, I find some problem in the RSS link
The link should be http://localhost:8080/portal/c/messageborad/find_message?p_l_id=123456&messageId=123456
but the link become http://localhost:8080/portal/portal/c/messageborad/find_message?p_l_id=123456&messageId=123456

And When i post some image, e.g. emoticon .
The image link should be http://localhost:8080/my-theme/images/emoticons/smile.gif
But the link become http://localhost:8080/portal/my-theme/images/emoticons/smile.gif


Is it a bug, What should i do to fix this problem?

Liferay 5.1.1
tomcat 5.5
Linux
portal.ctx=/portal

Thanks
thumbnail
Tobias Amon, modificado 15 Anos atrás.

RE: message board context path error!

Liferay Master Postagens: 546 Data de Entrada: 08/08/07 Postagens Recentes
Hi,

if you plan to run your Liferay Portal inside another context than ROOT you need to configure several things.

Did you modify more than the entry in the portal-ext.properties?

kind regards
Tobias
billy chan, modificado 15 Anos atrás.

RE: message board context path error

Junior Member Postagens: 43 Data de Entrada: 19/11/07 Postagens Recentes
In the portal-ext.properties file , i have added portal.ctx=/portal
I have changed ROOT.xml to portal.xml in <TomcatRoot>/conf/Catalina/localhost
The ROOT folder changed to portal in <TomcatRoot>/webapps/

What else?
thumbnail
Joe Bond, modificado 15 Anos atrás.

RE: message board context path error

New Member Postagens: 14 Data de Entrada: 20/05/08 Postagens Recentes
I'm having some trouble with this as well. I did a little debugging and found that this line is where the duplicate context root is being built.

String feedURL =
themeDisplay.getURLPortal() + themeDisplay.getPathMain() +
"/message_boards/find_thread?p_l_id=" + plid +
"&threadId=" + threadId;

getURLPortal is displaying the full url with the context root i.e. http://localhost:7001/portal

and getPathMain is returning the context root i.e /cscportal

By changing the struts action to use a custom action I could get the rss link in the message board to display the correct link to the message, but when I run it through the RSS portlet it is duplicating again.

Any insight would be appreciated.

Joe

----update----

i changed all feedURLs in the RssAction.java and switched to using RSS2.0. Now it's working fine.