Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uncaught ReferenceError: liferay is not defined

Hello Everyone! I'm getting this Error from my Console. Here is my Screenshot:

enter image description here

Liferay.on("endNavigate", (function(e) {
    dropdownMegaMenu(),
    secondaryNavMobile()
}
)),


Liferay.on("endNavigate", (function(e) {
    $(".banner-prompt-display").length && $(".banner-prompt").delay(2e3).slideDown("slow", (function() {}
    ))
}
));

enter image description here

How can i remove this error from my console? i would be very happy if anyone can able to fix this issues. Thank you!!

like image 429
Nazmul Hossain Pappu Avatar asked Apr 26 '26 13:04

Nazmul Hossain Pappu


1 Answers

If your only purpose is to remove that error from console, you can add

console.clear();

at the end of your JavaScript file, where you have used Liferay keyword. It would clear all the logs and error from your console.

like image 59
SAIF AHMED ANIK Avatar answered Apr 28 '26 04:04

SAIF AHMED ANIK



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!