-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 7.2.X, Master
-
Fix Version/s: 7.2.10 DXP FP4, 7.2.X, 7.3.0 CE GA1, 7.3.10 DXP GA1, Master
-
Component/s: AMD Module Loader
-
Labels:
-
Branch Version/s:7.2.x
-
Backported to Branch:Committed
-
Fix Priority:3
-
Git Pull Request:
In certain configurations (CDN, or proxy path + custom context, or CDN + proxy path + custom context), Javascript resources fail to load.
Steps to reproduce 1
- Setup a bundle to point to itself as the CDN
cdn.host.http=http://localhost:8080
- Start Liferay
- Open the browser console, switch to the Network tab
- Navigate to http://localhost:8080/?js_fast_load=1
Expected behavior is that there are no URLs with an error. Actual behavior is that many combo URLs have an error.
Steps to reproduce 2
- Rename the Liferay context to "liferay" (rename webapps/ROOT to webapps/liferay, rename conf/Catalina/localhost/ROOT.xml to conf/Catalina/localhost/liferay.xml)
- Setup an Apache reverse proxy that routes the path "/proxy" to "ajp://127.0.0.1:8009" and rewrites the cookie paths (so that login works correctly)
NameVirtualHost On <Proxy "balancer://localhost"> BalancerMember "ajp://127.0.0.1:8009" </Proxy> <VirtualHost *:80> ProxyPreserveHost On ProxyPass "/proxy" "balancer://localhost" stickysession=JSESSIONID ProxyPassReverse "/proxy" "balancer://localhost" stickysession=JSESSIONID ProxyPassReverseCookiePath "/liferay" "/proxy/liferay" ProxyPassReverseCookiePath "/" "/proxy/" </VirtualHost>
- Update portal-ext.properties so that Liferay knows that we have a portal proxy path.
portal.proxy.path=/proxy
- Start Liferay
- Open the browser console, switch to the Network tab
- Navigate to http://localhost/proxy/liferay/web/guest/home?js_fast_load=0
- Navigate to http://localhost/proxy/liferay/web/guest/home?js_fast_load=1
Expected behavior is that there are no URLs with an error. Actual behavior is that many regular URLs have errors when js_fast_load=0 and many combo URLs have an error when js_fast_load=1.
Steps to reproduce 3
- Follow all the setup steps from "Steps to reproduce 2"
- Also setup the bundle to point to itself as the CDN
cdn.host.http=http://localhost
- Start Liferay
- Open the browser console, switch to the Network tab
- Navigate to http://localhost/proxy/liferay/web/guest/home?js_fast_load=0
- Navigate to http://localhost/proxy/liferay/web/guest/home?js_fast_load=1
Expected behavior is that there are no URLs with an error. Actual behavior is that many regular URLs have errors when js_fast_load=0 and many combo URLs have an error when js_fast_load=1.