Foren

RE: allPortletsReady event does not fire

thumbnail
Hitesh Trivedi, geändert vor 10 Jahren.

allPortletsReady event does not fire

New Member Beiträge: 17 Beitrittsdatum: 24.01.14 Neueste Beiträge
hi,
i have following code

Liferay.on(
'allPortletsReady',
function() {
alert('ck bc');
var cols = document.getElementsByClassName('portlet-layout row-fluid');
cols[0].className = '';
var cols1 = document.getElementsByClassName('portlet-column portlet-column-only span12');
cols1[0].className = '';
}
);


but it will not give me alert after page load.....
give me solution for that...
thumbnail
André Bunse, geändert vor 10 Jahren.

RE: allPortletsReady event does not fire

Junior Member Beiträge: 65 Beitrittsdatum: 13.02.14 Neueste Beiträge
In my case the Notifications Portlet was the reason. It does'nt fire his onLoad event.

i create a fix quick for me in "/html/js/liferay/portlet.js":

in
Liferay.provide(
Portlet,
'onLoad'
after
var list = instance.list;
insert this
var index_not = arrayIndexOf(list, '2_WAR_notificationsportlet');
if(index_not > -1) { list.splice(index_not, 1); }

and everything works fine. Until now i have no time to analyze why, but the Notification Portlet
is there as part of the dockbar. Dockbar fire his event, but Notification not.

HTH
thumbnail
R. Reinmets, geändert vor 9 Jahren.

RE: allPortletsReady event does not fire

New Member Beiträge: 4 Beitrittsdatum: 29.07.10 Neueste Beiträge
I had the same problem today when my allPortlesReady event was not firing on some pages but the same portlet was working fine on another page. I was using Liferay 6.2 CE. In my case it was not working even though I had no other portlets on the pages.

The issue was having old unused embedded portlet preferences still connected to the page. I removed them from "Edit Page" section and the problem went away.

You can read the full summary of my findings here:
http://www.codeyouneed.com/liferay-allportletsready-event-firing/