留言板

Disable minifier only for file or portlet (Liferay 5.2)

Aurélien Julé,修改在6 年前。

Disable minifier only for file or portlet (Liferay 5.2)

New Member 帖子: 4 加入日期: 17-9-25 最近的帖子
Hello,

We are using Liferay 5.2 and we're actually in trouble with the minifier.
I've got a lot of syntax errors on pdf.js (Mozilla).
I tried to manually minify (cause there is no minified version provided) the file to stop the Liferay minifier but without success.
I know that it is possible to disable the minifier for the whole portal but I'm not interested by this option.
Is there a way to disable the minifier but only for a file or portlet ?

Thanks in advance and have a good day.
thumbnail
Andrew Jardine,修改在6 年前。

RE: Disable minifier only for file or portlet (Liferay 5.2)

Liferay Legend 帖子: 2416 加入日期: 10-12-22 最近的帖子
Hi Aurelien,

Is the JS file (pdf.js) added to your theme? or are you trying to use it by adding it to the portlet? (Sorry, it's not clear from your post exactly where you are placing it emoticon)
Aurélien Julé,修改在6 年前。

RE: Disable minifier only for file or portlet (Liferay 5.2)

New Member 帖子: 4 加入日期: 17-9-25 最近的帖子
Hi Andrew,

Thanks for your answer.

Your right, sorry for that.
The file is included from the portlet.xml in a <header-portlet-javascript> tag.
thumbnail
Andrew Jardine,修改在6 年前。

RE: Disable minifier only for file or portlet (Liferay 5.2)

Liferay Legend 帖子: 2416 加入日期: 10-12-22 最近的帖子
hmm -- it's been an eternity since I worked with 5.2 so maybe my memory is off, but I thought only files that were in the theme were minified (based on the portal-ext settings).

Are you sure that they file is being minified?
Aurélien Julé,修改在6 年前。

RE: Disable minifier only for file or portlet (Liferay 5.2)

New Member 帖子: 4 加入日期: 17-9-25 最近的帖子
Yes, Liferay is trying to minify my file.

I think that I figured out. The js and css files called from portlet.xml are minified as the files called from the portal.
But the files called from the .jsp files are not minified by the Liferay's minifier.
So the solution for me is to call the js files impacted by the minifier errors from the .jsp files.
thumbnail
Andrew Jardine,修改在6 年前。

RE: Disable minifier only for file or portlet (Liferay 5.2)

Liferay Legend 帖子: 2416 加入日期: 10-12-22 最近的帖子
Good to know -- thanks for sharing that. I wonder if there is another option for you. 5.2 is an archaic version of the product. There are so many great improvements with the later versions. Is there no option to upgrade the product to a newer version? Not only would you benefit from all the patches, security fixes, performance improvements, etc but it might also allow you to use the minifier.
Aurélien Julé,修改在6 年前。

RE: Disable minifier only for file or portlet (Liferay 5.2)

New Member 帖子: 4 加入日期: 17-9-25 最近的帖子
Yes, an upgrade is already planned and some other product that we are working on are already running Liferay 6.2.
Thanks for your investment on my topic ;)