Foren

Cannot set friendly url to forgot_password and create_account features

al code, geändert vor 8 Jahren.

Cannot set friendly url to forgot_password and create_account features

New Member Beitrag: 1 Beitrittsdatum: 09.06.15 Neueste Beiträge
Hi everybody,

Currently I'm trying to apply friendly urls on the default login portlet (id 58).

To perform this :
  • I've created an ext plugin
  • I've updated the file portal-ext/docroot/WEB-INF/ext-web/docroot/WEB-INF/liferay-portlet-ext.xml to fit my needs
  • I've put a friendly url route descriptor in several locations but actually it is portal-ext/docroot/WEB-INF/ext-web/docroot/html/portlet/login/login-friendly-url-routes.xml
  • I've deployed my ext plugin (and double checked it was correctly deployed)


I expect to have the create account accessible on <host>/-/create_account but it is not working and i've got no logs related to that.

Here are the two files content :



<!--?xml version="1.0"?-->


<liferay-portlet-app>



	<portlet>
		<portlet-name>58</portlet-name>
		<icon>/html/icons/login.png</icon>
		<struts-path>login</struts-path>
		<configuration-action-class>com.liferay.portlet.login.action.ConfigurationActionImpl</configuration-action-class>

		<!-- To give friendly url dedicated to login portlet (especially create_account 
			and forgot_password feature) -->
		<friendly-url-mapper-class>com.liferay.portal.kernel.portlet.DefaultFriendlyURLMapper</friendly-url-mapper-class>
		<friendly-url-mapping>create_account</friendly-url-mapping>
		<friendly-url-routes>/html/portlet/login/login-friendly-url-routes.xml</friendly-url-routes>


		<preferences-owned-by-group>true</preferences-owned-by-group>
		<use-default-template>false</use-default-template>
		<private-request-attributes>false</private-request-attributes>
		<private-session-attributes>false</private-session-attributes>
		<render-weight>50</render-weight>
		<header-portlet-css>/html/portlet/login/css/main.css</header-portlet-css>
		<css-class-wrapper>portlet-login</css-class-wrapper>
		<add-default-resource>true</add-default-resource>



	</portlet>

</liferay-portlet-app>


<!--?xml version="1.0"?-->


<routes>
	<route>
		<pattern></pattern>
		<implicit-parameter name="p_p_lifecycle">0</implicit-parameter>
		<implicit-parameter name="p_p_state">maximized</implicit-parameter>
		<implicit-parameter name="p_p_mode">view</implicit-parameter>
		<implicit-parameter name="struts_action">/login/create_account</implicit-parameter>
	</route>
	
</routes>


So yes it should be really easy. I've already built ext plugins with java classes and jsps but I'm really getting frustrated not being able to only configure ;)

So if somebody has quite an idea ;)