Issue
- Unable to Edit any options in Site settings. That is from:
- The home page, not able to edit and select the layout/theme.
- Also, from Control Panel-> Sites-> Select site-> Edit was not able to change the theme or any other options.
- In the browser console, the error throw was
“http://10.2.11.32:8080/html/js/liferay/available_languages.jsp?browserId=firefox&themeId=classic&colorSchemeId=01&minifierType=js&languageId=en_US&b=6210&t=1504595895000” was blocked due to MIME type mismatch (X-Content-Type-Options: nosniff).[Learn More] welcome"
Environment
- Liferay Portal 6.2
- JBoss EAP 7.0
- Liferay DXP 7.0
Resolution
- This issue only reproduces when GZIP filter is disabled in the portal-ext.properties, that is "com.liferay.portal.servlet.filters.gzip.GZipFilter= false"
- By default, the value of this property is true in the portal.properties.
-
# If the user can unzip compressed HTTP content, the GZip filter will
# zip up the HTTP content before sending it to the user. This will speed up
# page rendering for users that are on dial up.
com.liferay.portal.servlet.filters.gzip.GZipFilter=true - Commenting/removing this property from portal-ext.properties resolves the issue. Below are steps to remove/comment the property.
1. Shut down the server.
2. Comment out/ remove the above property from portal-ext.properties.
3. Clear the tmp folder from the standalone folder.
4. Restart the server.
Additional Information
- The observed behaviour was reported in LPS-54266 and is Fixed in Liferay DXP 7.0 from Fix-pack de-22 onward.
- This issue is related to MIME type and the observed behaviour is specific to JBoss Application Server, where JBoss overrides the response header (Content-type) set in the JSP files, and then browsers (ex. Chrome) refuse to interpret the javascript.