Issue
-
Adding the below script to any page through any Web content display can reproduce the issue in vanilla.
<a href="#" onClick="showWltNotification('Your Request failed to process', 'danger');"> Link here </a>
<aui:script>function showWltNotification(message, type) {
message = message || '<liferay-ui:message key="wlt-your-request-failed-to-complete" />';
type = type || 'danger';
AUI().use('liferay-notification', function(){
new Liferay.Notification({
closeable: true,
delay: {
hide: 5000,
show: 0,
},
duration: 500,
message,
render: true,
title: '',
type
});
});
}
</aui:script>
We are getting the error in the title in the browser console.
Environment
- 2024.q1.2
Resolution
- Use instead Liferay.Util.openToast
- see https://liferay.atlassian.net/browse/LPD-44043