Foros de discusión

Default Landing Page

Marco Bolzan, modificado hace 14 años.

Default Landing Page

Junior Member Mensajes: 47 Fecha de incorporación: 3/09/09 Mensajes recientes
On Control Panel > Portal > Settings > General I found a field "Default Landing Page",
tooltip suggests that path will be the path on where a user is redirect after login.

I create a site named "communityproject" and I write in landing filed "/web/communityproject/home",
but when I login with my user (that is member of this community) I'm redirect on "/web/marco/home",

why?
which comfigurations I have to check also?

Thanks
thumbnail
Jonas Yuan, modificado hace 14 años.

RE: Default Landing Page

Liferay Master Mensajes: 993 Fecha de incorporación: 27/04/07 Mensajes recientes
Hi Marco,

Which version are you using? Portal 5.2.x? Social Office 1.5b?

Some behaviors would be different in both Portal and SO, since hooks are applied in SO.

Just verifying similar scenario in SO 1.5b, it is working fine at

Server URL:
http://liferay.cignex.com

An account from LDAP:
jane/jane

Or create new account on fly.

Oh, one second, I got the same - due to the hooks of so-portlet.

Jonas Yuan
Liferay Portal 5.2 Systems Development
Liferay Portal Enterprise Intranets
thumbnail
Jonas Yuan, modificado hace 14 años.

RE: Default Landing Page

Liferay Master Mensajes: 993 Fecha de incorporación: 27/04/07 Mensajes recientes
Hi Marco,

The following code shows the reason:

public class LoginPostAction extends Action {

	public void run(HttpServletRequest request, HttpServletResponse response) {
		try {
			User user = PortalUtil.getUser(request);

			String redirect = "/web/" + user.getScreenName() + "/home";

			response.sendRedirect(redirect);
		}
		catch (Exception e) {
			if (_log.isWarnEnabled()) {
				_log.warn(e);
			}
		}
	}

	private static Log _log =
		LogFactoryUtil.getLog(LoginPostAction.class);

}


You can disable it by commenting out the following line in portal.properties of so-portlet.

login.events.post=com.liferay.so.hook.events.LoginPostAction


Hope that it helps

Thanks

Jonas Yuan
Liferay Portal 5.2 Systems Development
Liferay Portal Enterprise Intranets
Marco Bolzan, modificado hace 14 años.

RE: Default Landing Page

Junior Member Mensajes: 47 Fecha de incorporación: 3/09/09 Mensajes recientes
If is not out of topic, can you explain me better what is "hooks" of so-portlet ?

We use only SO 1.5b for now..

Thank u v much


And answering to your suggest, adding
login.events.post=com.liferay.so.hook.events.LoginPostAction

to portal-ext.properties file doesn't resolve my problem,
after login I reach always "/web/admin/home" and not "/web/communitydiprogetto/home"

Bolzan
Marco Bolzan, modificado hace 14 años.

RE: Default Landing Page

Junior Member Mensajes: 47 Fecha de incorporación: 3/09/09 Mensajes recientes
Sorry, I didn't understand more or less nothing.. :-)
Now I solve:

In /so-portlet/WEB-INF/classes/portal.properties comment
#auth.forward.by.last.path=false
#login.events.post=com.liferay.so.hook.events.LoginPostAction


in /ROOT/WEB-INF/classes/portal-ext.properties add
default.landing.page.path=/web/communitydiprogetto/home
login.events.post=com.liferay.portal.events.DefaultLandingPageAction
auth.forward.by.last.path=true


Now after login I'm redirect where I wanted..

Thanks

Bolzan
thumbnail
Jonas Yuan, modificado hace 14 años.

RE: Default Landing Page

Liferay Master Mensajes: 993 Fecha de incorporación: 27/04/07 Mensajes recientes
Hi macro,

You can see real example with hooks

at (Chapter 10)

Liferay-Portal-5-2-Systems-Development

General information

http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Portal+Hook+Plugins

Thanks

Jonas Yuan
Liferay Portal 5.2 Systems Development
Liferay Portal Enterprise Intranets