掲示板
Minifier crashing
Hi Forums,
i have problems with the minifier. I'm trying to deploy an GWT-based widget to the portal. Unfortunateley, the minifier chokes on the generated js file (I'm pretty sure it's syntactically correct as its from GWT compiler).
The top of trace is:
FYR, the request being made is
http://localhost:8080/contentbrowser/ContentBrowser/ContentBrowser.nocache.js?browserId=other&minifierType=js&languageId=en_US&t=1302882380000
I tried to put the following line
com.liferay.portal.servlet.filters.minifier.MinifierFilter=false
into liferay-portal-6.0.6/tomcat-6.0.29/webapps/ROOT/WEB-INF/classes/portal-ext.properties to no avail.
Any idea how to turn js minification off? GWT js is already minified.
Thanks,
Paul
i have problems with the minifier. I'm trying to deploy an GWT-based widget to the portal. Unfortunateley, the minifier chokes on the generated js file (I'm pretty sure it's syntactically correct as its from GWT compiler).
The top of trace is:
15:47:06,694 ERROR [MinifierFilter:136] java.lang.NullPointerException
java.lang.NullPointerException
at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:78)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:126)
at com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.doFilter(PortalClassLoaderFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
FYR, the request being made is
http://localhost:8080/contentbrowser/ContentBrowser/ContentBrowser.nocache.js?browserId=other&minifierType=js&languageId=en_US&t=1302882380000
I tried to put the following line
com.liferay.portal.servlet.filters.minifier.MinifierFilter=false
into liferay-portal-6.0.6/tomcat-6.0.29/webapps/ROOT/WEB-INF/classes/portal-ext.properties to no avail.
Any idea how to turn js minification off? GWT js is already minified.
Thanks,
Paul
Hi Paul,
Could you post the full stacktrace so we can see the cause of the error?
You may also need to set this property to disable minifier in stripfilter:
If that doesn't work, you can try disabling stripfilter as well:
Could you post the full stacktrace so we can see the cause of the error?
You may also need to set this property to disable minifier in stripfilter:
#
# The strip filter will attempt to cache inline minified CSS and JavaScript
# content. Set this property configure the maximum pieces of cached content.
# Set this property to 0 to disable caching of inline minified content.
#
minifier.inline.content.cache.size=0
If that doesn't work, you can try disabling stripfilter as well:
com.liferay.portal.servlet.filters.strip.StripFilter=false
Hi Amos,
thanks for your reply.
I gisted the full exception: https://gist.github.com/926099
The browser gets an HTTP OK 200, but empty content when doing the request I stated above.
Where would I put these settings you mention, also in portal-ext.properties?
Tahnks,
Paul
thanks for your reply.
I gisted the full exception: https://gist.github.com/926099
The browser gets an HTTP OK 200, but empty content when doing the request I stated above.
Where would I put these settings you mention, also in portal-ext.properties?
Tahnks,
Paul
Amos Fong:
Hi Paul,
You may also need to set this property to disable minifier in stripfilter:
I set both properties you mentioned in webapps/ROOT/WEB-INF/classes/portal-ext.properties and restarted the server, but I'm getting the same errors.
BTW, I've just noticed something very strange:
If I copy the the file to another location, or change it's name, it's working!
http://localhost:8080/ContentBrowser-portlet/ContentBrowserPortlet/ContentBrowserPortlet.nocache.js?browserId=other&minifierType=js&languageId=en_US&t=1302882380000
and
http://localhost:8080/ContentBrowser-portlet/ContentBrowserPortlet/ContentBrowser.nocache.js?browserId=other&minifierType=js&languageId=en_US&t=1302882380000
both did work. Is there some string interpolation gone wrong here? Really puzzled.
If I copy the the file to another location, or change it's name, it's working!
http://localhost:8080/ContentBrowser-portlet/ContentBrowserPortlet/ContentBrowserPortlet.nocache.js?browserId=other&minifierType=js&languageId=en_US&t=1302882380000
and
http://localhost:8080/ContentBrowser-portlet/ContentBrowserPortlet/ContentBrowser.nocache.js?browserId=other&minifierType=js&languageId=en_US&t=1302882380000
both did work. Is there some string interpolation gone wrong here? Really puzzled.
I will upload a zip archive of the exploded war, in case someone wants to check it.
13年前 に Amos Fong によって更新されました。
RE: Minifier crashing (回答)
Liferay Legend 投稿: 2047 参加年月日: 08/10/07 最新の投稿
Maybe you need to clear your caches? (Browser cache and tomcat temp/work folders)
I used different browser and curl, so there should be no cache. I removed temp and work, but it didn't work. I reinstalled portal tomcat bundle and copied webapp over, and now it works?! Probably some configuration I did earlier leading to this - I'm unable to pin it down.
Most important it works now . Thank you for your help.
Paul
Most important it works now . Thank you for your help.
Paul
11年前 に Massimiliano Assante によって更新されました。
RE: Minifier crashing
Junior Member 投稿: 53 参加年月日: 10/03/04 最新の投稿
had the same problem with a GWT widget too, it turned out the problem was in my .gwt.xml, the rename-to attribute value of <module> for some unknown reason must be lowercase, example <module rename-to='mywidgetname'>
11年前 に Massimiliano Assante によって更新されました。
RE: Minifier crashing
Junior Member 投稿: 53 参加年月日: 10/03/04 最新の投稿Massimiliano Assante:
had the same problem with a GWT widget too, it turned out the problem was in my .gwt.xml, the rename-to attribute value of <module> for some unknown reason must be lowercase, example <module rename-to='mywidgetname'>
Just a quick update on this, it seems that also having the gwt-module name and the portlet class name the same would make the Minifier crashing.