-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 7.0.X, 7.1.X, 7.2.X, Master
-
Fix Version/s: 7.0.0 DXP FP82, 7.0.10.12 DXP SP12, 7.0.X, 7.1.10 DXP FP12, 7.1.X, Master
-
Component/s: Product Menu
-
Branch Version/s:7.1.x, 7.0.x
-
Backported to Branch:Committed
-
Fix Priority:3
-
Git Pull Request:
All of the code inside of aui:script tags in JSPs related to the Product Menu get executed twice. This can lead to potential issues since scripts in tags are not meant to run twice.
Steps to Reproduce
1. Go into the source code to https://github.com/liferay/liferay-portal/blob/master/modules/apps/product-navigation/product-navigation-product-menu-web/src/main/resources/META-INF/resources/portlet/view.jsp
2. Add the line
console.log("Hello World");
to the first line in the aui:script tag within the JSP and deploy the module.
3. Start Liferay and log in, then log out.
4. Open the browser's developer tools to the console.
5. Log back in
Expected Results: Hello World only prints once in the console on each page load
Actual Results: When performing a page load through SPA (so when the navigation to the page is not the initial navigation), Hello World will print out more than once, indicating the script is being run more than once.