-
Type:
Regression Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 7.1.X, 7.2.X, Master
-
Fix Version/s: 7.1.10 DXP FP21, 7.1.X, 7.2.10 DXP FP6, 7.2.X, 7.3.10 DXP GA1, Master
-
Component/s: Content Display Widgets > Iframe widget
-
Branch Version/s:7.2.x, 7.1.x
-
Backported to Branch:Committed
-
Fix Priority:4
-
Last Working Version:
-
Git Pull Request:
Context
URL parameters are lost when multiple parameters are passed to the iframe widget, via URL parameters.
This is due to the '&' being incorrectly escaped when crafting the URL with the passed parameters.
Steps to Reproduce
- Startup Liferay
- Create a widget page: testwidget
- Navigate to testwidget page
- Add Announcements widget
- View Announcement widget > Configuration > Sharing
- Copy the URL in the src attribute
- e.g.
http://localhost:8080/widget/web/guest/testwidget/-/com_liferay_announcements_web_portlet_AnnouncementsPortlet
- Note: This URL directly navigates to the created Announcements widget
- e.g.
- Navigate to the Announcements widget via the extracted URL
- Notice the selected tab is 'Unread'
- Prepare URL parameter for tabs1:
?_com_liferay_announcements_web_portlet_AnnouncementsPortlet_tabs1=read
- Append to the URL and Navigate
- e.g.
http://localhost:8080/widget/web/guest/testwidget/-/com_liferay_announcements_web_portlet_AnnouncementsPortlet?_com_liferay_announcements_web_portlet_AnnouncementsPortlet_tabs1=read
- e.g.
- Notice the selected tab is now 'Read'
- Prepare URL parameter for tabs2:
&_com_liferay_announcements_web_portlet_AnnouncementsPortlet_tabs2=foobar
- Append to the URL and Navigate
- e.g.
http://localhost:8080/widget/web/guest/testwidget/-/com_liferay_announcements_web_portlet_AnnouncementsPortlet?_com_liferay_announcements_web_portlet_AnnouncementsPortlet_tabs1=read&_com_liferay_announcements_web_portlet_AnnouncementsPortlet_tabs2=foobar
- e.g.
- Notice the selected tab is still 'Read'
- Create a widget page: iframe
- Navigate to iframe page
- Add Iframe widget
- View Iframe widget > Configuration > Setup
- Set Source URL to the extracted Announcements widget URL
- e.g.
http://localhost:8080/widget/web/guest/testwidget/-/com_liferay_announcements_web_portlet_AnnouncementsPortlet
- e.g.
- Click Save
- Set Source URL to the extracted Announcements widget URL
- View Iframe widget > Configuration > Sharing
- Copy the URL in the src attribute
- e.g.
http://localhost:8080/widget/web/guest/iframe/-/com_liferay_iframe_web_portlet_IFramePortlet_INSTANCE_feQmegAff0kG
- URL:
http://localhost:8080/widget/web/guest/iframe/-/<portlet-id>
- portlet-id:
com_liferay_iframe_web_portlet_IFramePortlet_INSTANCE_feQmegAff0kG
- URL:
- Note: This URL directly navigates to the created Iframe widget
- e.g.
- Copy the URL in the src attribute
- View Iframe widget > Configuration > Setup
- Navigate to the Iframe widget via the extracted URL
- Notice the Announcement widget is shown and the selected tab is 'Unread'
- Prepare URL parameter for tabs1 (Take note of the underscores):
?_<iframe-portlet-id>_iframe__com_liferay_announcements_web_portlet_AnnouncementsPortlet_tabs1=read
- Note: Replace <iframe-portlet-id> with the portlet-id identified in the previous step
- e.g.
?_com_liferay_iframe_web_portlet_IFramePortlet_INSTANCE_feQmegAff0kG_iframe__com_liferay_announcements_web_portlet_AnnouncementsPortlet_tabs1=read
- e.g.
- Note: Replace <iframe-portlet-id> with the portlet-id identified in the previous step
- Append to the URL and Navigate
- e.g.
http://localhost:8080/widget/web/guest/iframe/-/com_liferay_iframe_web_portlet_IFramePortlet_INSTANCE_feQmegAff0kG?_com_liferay_iframe_web_portlet_IFramePortlet_INSTANCE_feQmegAff0kG_iframe__com_liferay_announcements_web_portlet_AnnouncementsPortlet_tabs1=read
- e.g.
- Notice the selected tab is now 'Read'
- Prepare URL parameter for tabs2 (Take note of the underscores):
&_<iframe-portlet-id>_iframe__com_liferay_announcements_web_portlet_AnnouncementsPortlet_tabs2=foobar
- Note: Replace <iframe-portlet-id> with the portlet-id identified in the previous step
- e.g.
&_com_liferay_iframe_web_portlet_IFramePortlet_INSTANCE_feQmegAff0kG_iframe__com_liferay_announcements_web_portlet_AnnouncementsPortlet_tabs2=foobar
- e.g.
- Note: Replace <iframe-portlet-id> with the portlet-id identified in the previous step
- Append to the URL and Navigate
- e.g.
http://localhost:8080/widget/web/guest/iframe/-/com_liferay_iframe_web_portlet_IFramePortlet_INSTANCE_feQmegAff0kG?_com_liferay_iframe_web_portlet_IFramePortlet_INSTANCE_feQmegAff0kG_iframe__com_liferay_announcements_web_portlet_AnnouncementsPortlet_tabs1=read&_com_liferay_iframe_web_portlet_IFramePortlet_INSTANCE_feQmegAff0kG_iframe__com_liferay_announcements_web_portlet_AnnouncementsPortlet_tabs2=foobar
- e.g.
Expected Results
The 'Read' tab is selected
Actual Results
The 'Unread' tab is selected
- is caused by
-
LPS-96846 iframe duplicates browser requests with SPA
- Closed