Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Disable lodash in Liferay 7.1
In Liferay 7.1, we can disable lodash and increase performance of every pages.Do you know if we can do that with no consequences? If yes, why lodash is active by default?
There is a consequence when deactivating Lodash, at least in version 7.1.2 GA3. The forms stop working in the backend, it causes an error js.
Regards
Regards
Thanks for your answer. I have try in our website and it seems ok for Forms with fixpack 11.Do you know what is wrong with form because it seems ok for us.
The error occurs when trying to edit a form. The editing screen is not displayed and a javascript error appears.
Maybe it is solved in the version you are commenting on...
Regards
Maybe it is solved in the version you are commenting on...
Regards
Hey Eric,
That depends. From Liferay, we tried to remove all of our usages on Lodash. Other than missing some usages (like that of forms), it should be safe from out of the box features. The consequence of disabling Lodash is that if you have code depending on it, it will fail to work, so wether it will have or not consequences is pretty much a very specific question that only you can answer.
As I stated before, disabling Lodash should be safe from a platform's point of view, because we no longer depend on it. Since we can't tell if you need it or not, we keep it enabled in 7.1 to make sure we don't break existing code and installations. We disable it by default in 7.2 because you can then make the choice of updating your code or enabling Lodash.
In summary, if you know you don't depend on Lodash, it should be safe for you to disable it. We can't make that decision by default on 7.1 because it would mean introducing a huge breaking change.
Do you know if we can do that with no consequences?
That depends. From Liferay, we tried to remove all of our usages on Lodash. Other than missing some usages (like that of forms), it should be safe from out of the box features. The consequence of disabling Lodash is that if you have code depending on it, it will fail to work, so wether it will have or not consequences is pretty much a very specific question that only you can answer.
why lodash is active by default?
As I stated before, disabling Lodash should be safe from a platform's point of view, because we no longer depend on it. Since we can't tell if you need it or not, we keep it enabled in 7.1 to make sure we don't break existing code and installations. We disable it by default in 7.2 because you can then make the choice of updating your code or enabling Lodash.
In summary, if you know you don't depend on Lodash, it should be safe for you to disable it. We can't make that decision by default on 7.1 because it would mean introducing a huge breaking change.
Chema's is the good answer 
I was just trying to expose the problem we encountered in a project when we tried to deactivate it.
Regards...

I was just trying to expose the problem we encountered in a project when we tried to deactivate it.
Regards...
One week later... we must reactivate lodash. :-(
There is a problem when users want to edit the properties of a picture of a web content in backoffice.
I will open a ticket for this because this lib has 3 high vulnerabilities :

And is very slow :
There is a problem when users want to edit the properties of a picture of a web content in backoffice.
I will open a ticket for this because this lib has 3 high vulnerabilities :

And is very slow :

Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™