Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
7.0.4 CE GA5, Master
-
7.0.x
-
Committed
Description
Problem Background
NOTE: The fix for LPS-75807 must be merged prior to testing the fix for this issue.
The Liferay Portal implementation of resourceURL.toString() generates a URL similar to the following:
http://localhost:8080/web/guest/mypage?p_p_id=123,foo_WAR_myportlet&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view& p_p_cacheability=cacheLevelPage&p_r_p_myPRP=abc&foo_WAR_myportlet_myPrivateRenderParam=xyz
The token "p_r_p_myPRP" indicates a public render parameter, "foo_WAR_myportlet_myPrivateRenderParam", indicates a private render parameter, "p_p_mode" indicates the PortletMode, and "p_p_state" indicates the WindowState.
The Portlet 2.0 JavaDoc for ResourceURL.FULL states:
.The URL of type FULL does not need to contain the current state of the page or the current render parameters, portlet mode, or window state of the portlet.
However, when resourceURL.setCacheability(ResourceURL.FULL) is called prior to calling resourceURL.toString(), the only difference in Liferay Portal is the addition of the "p_p_cacheability=cacheLevelFull" name+value pair. In order to conform with the Javadoc and provide URLs with the most "cacheable" (idempotent) URL, the URL should not contain any public/private render parameters and also not contain the "p_p_mode" and "p_p_state" parameters.
Steps to Reproduce
1. Deploy the attached com.liferay.issue.lps75848.portlet.war artifact to $LIFERAY_HOME/deploy
2. Add the lps75848 portlet to a portal page
3. Reload the page in the browser
4. Follow the 11 steps in the UI of the portlet
Expected Result
The values of the parameters in each step are correct. Also, in steps #8 and #11, the fully cacheable ResourceURL does not contain any public/private render parameters and also not contain the "p_p_mode" and "p_p_state" parameters.
Actual Result
The values of the parameters in at least one of the steps are incorrect. Also, in steps #8 and #11, the fully cacheable ResourceURL contains at least one public/private render parameter and also not contains the "p_p_mode" and "p_p_state" parameters.
Attachments
Issue Links
- depends on
-
LPS-75807 Public Render Parameters submitted in a ResourceRequest via ResourceURL do not contain prepended parameter values and incorrectly cause value changes to be propagated to other portlets on the same portal page
- Closed