Details
-
Type:
Story
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Completed
-
Affects Version/s: 6.1.1 CE GA2, 6.1.20 EE GA2
-
Fix Version/s: 6.2.0 CE M3
-
Component/s: WCM
-
Labels:
-
Similar Issues:
Description
The pattern:
<portlet:actionURL name="doSomething" var="doSomethingURL">
<portlet:param name="mvcPath" value="..." />
<portlet:param name="redirect" value="<%= redirect %>" />
<portlet:param name="backURL" value="<%= backURL %>" />
</portlet:actionURL>
<aui:form action="<%= doSomethingURL %>">
May break if redirect and backURL point to long urls, thus making doSomethingURL too long.
The better pattern is:
<portlet:actionURL name="doSomething" var="doSomethingURL" />
<aui:form action="<%= doSomethingURL %>">
<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
<aui:input name="backURL" type="hidden" value="<%= backURL %>" />
That way, the url doSomethingURL never gets too long.

This causes problems, when you use the form URL to be different portlet (like <liferay-portlet:actionURL portletName="<%= PortletKeys.LAYOUTS_ADMIN %>" var="resetPrototypeURL">) than the one you're currently in. Then hidden params in the form have wrong namespace and never arrive to target portlet's action.
Example:
Dockbar -> html/portlet/dockbarview.jsp, where URL is to 88 (PortletKeys.LAYOUTS_ADMIN), but hidden params have previx _145, since you're in a Dockbar portlet.
I guess the same issue will appear on many places in portal, where you use <liferay-portlet:actionURL /> and send user to some other portlet.