-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 6.2.0 CE GA1, 6.2.10 EE GA1, 6.2.X EE, 7.0.0 M3
-
Fix Version/s: 7.0.0 DXP FP35, 7.0.0 DXP SP7, 7.0.5 CE GA6, 7.0.X, Master
-
Branch Version/s:7.0.x
-
Backported to Branch:Committed
-
Story Points:1
-
Fix Priority:2
-
Git Pull Request:
When merging parameters from RenderParametersPool, these parameters are added into local _params store during generateToString() and generateWSRPToString().
Calling portletURLImpl.toString() multiple times causes the parameters to be duplicated in the serialization output.
Steps to reproduce:
- Go to Control Panel -> Server Administration -> Script console
- Execute as Groovy script:
themeDisplay = actionRequest.getAttribute("LIFERAY_SHARED_THEME_DISPLAY"); plid = themeDisplay.getPlid(); renderParameters = new java.util.HashMap(); String[] values = ["test1", "test2"]; renderParameters.put("test", values); com.liferay.portlet.RenderParametersPool.put(com.liferay.portal.util.PortalUtil.getHttpServletRequest(actionRequest), plid, "0", renderParameters); portletURL = com.liferay.portlet.PortletURLFactoryUtil.create(actionRequest, "0", plid, "RENDER_PHASE"); portletURL.setCopyCurrentRenderParameters(true); out.println(portletURL.toString()); portletURL.clearCache(); out.println(portletURL.toString()); portletURL.clearCache(); out.println(portletURL.toString());
Expected result: all 3 URLs are the same
Actual result example:
http://localhost:8080/group/control_panel/manage?p_p_id=0&p_p_lifecycle=0&refererPlid=10188&_0_test=test1&_0_test=test2 http://localhost:8080/group/control_panel/manage?p_p_id=0&p_p_lifecycle=0&refererPlid=10188&_0_test=test1&_0_test=test2&_0_test=test1&_0_test=test2 http://localhost:8080/group/control_panel/manage?p_p_id=0&p_p_lifecycle=0&refererPlid=10188&_0_test=test1&_0_test=test2&_0_test=test1&_0_test=test2&_0_test=test1&_0_test=test2