Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
William Gosse
'noticeEl' is null or not an object
January 13, 2011 6:53 AM
Answer

William Gosse

Rank: Regular Member

Posts: 202

Join Date: July 4, 2010

Recent Posts

Seeing the following javascript error on Liferay 6 EE in IE 8. If anyone has an idea of the cause please enlighten me.

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB6.6; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MDDS; Tablet PC 2.0; .NET4.0C)
Timestamp: Thu, 13 Jan 2011 14:48:48 UTC


Message: 'noticeEl' is null or not an object
Line: 5
Char: 72
Code: 0
URI: http://crushpro.staging.corporatecrush.com/alerts-manager
Patrick M Hurley
RE: 'noticeEl' is null or not an object
January 13, 2011 1:20 PM
Answer

Patrick M Hurley

Rank: New Member

Posts: 3

Join Date: July 14, 2008

Recent Posts

I get the same error regardless of browser if I select a blank default theme freshly created and deployed without any modifications. If I return to the Classic theme, all returns to normal.
Amos Fong
RE: 'noticeEl' is null or not an object
January 14, 2011 12:42 AM
Answer

Amos Fong

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1855

Join Date: October 7, 2008

Recent Posts

Hi guys,

This is a bug that has been fixed in the next version. Your account manager might be able to give a patch, otherwise it's a really simple fix inside bottom.jsp.
Corné Aussems
RE: 'noticeEl' is null or not an object
January 16, 2011 9:17 AM
Answer

Corné Aussems

Rank: Liferay Legend

Posts: 1289

Join Date: October 3, 2006

Recent Posts

Hi Amos,
Since i do not yet have access to the EE Jira.

Could you share the ticketnumer ?

thx in advance.
Jatin Panchal
RE: 'noticeEl' is null or not an object
January 16, 2011 11:26 PM
Answer

Jatin Panchal

Rank: New Member

Posts: 15

Join Date: July 26, 2010

Recent Posts

Hi Amos,

I am also facing this issue. So can you plese tell that in bottom.jsp what changes I need to make to get this issue fixed.

Thanks in Advance.
Jatin Panchal
Sandeep Nair
RE: 'noticeEl' is null or not an object
January 16, 2011 11:39 PM
Answer

Sandeep Nair

Rank: Liferay Legend

Posts: 1705

Join Date: November 5, 2008

Recent Posts

Please find the attached bottom.jsp. Create a jsp hook and place it there.
Attachments: bottom.jsp (6.6k)
Amos Fong
RE: 'noticeEl' is null or not an object
January 17, 2011 12:50 AM
Answer

Amos Fong

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1855

Join Date: October 7, 2008

Recent Posts

Looks like Sandeep has it. Essentially look for the script block:

1        <script type="text/javascript">
2            var noticeEl = document.getElementById('expiration-notice');
3
4            var closeButton = noticeEl.getElementsByTagName('input');
5
6            closeButton.onclick = "document.getElementById('expiration-notice').style.display = 'none';";
7        </script>


and move inside this if statement:

1<c:if test="<%= ((lifetimeDays == 30) && (expirationDays < 7)) || ((lifetimeDays > 30) && (expirationDays < 30)) %>">


@Corné
Sorry I don't think there is a JIRA ticket for this.
Corné Aussems
RE: 'noticeEl' is null or not an object
January 17, 2011 12:46 AM
Answer

Corné Aussems

Rank: Liferay Legend

Posts: 1289

Join Date: October 3, 2006

Recent Posts

Thanks Amos,

Never mind the .... ticket.
This is even better.
Jatin Panchal
RE: 'noticeEl' is null or not an object
January 17, 2011 1:53 AM
Answer

Jatin Panchal

Rank: New Member

Posts: 15

Join Date: July 26, 2010

Recent Posts

Thanks a lot Sandeep and Amos.

I have successfully resolved this issue.

After using this code I can't get this error back in firebug but it is still coming in browser's error console(Tools-->Error Console).

So,Any idea about this??

I have already clear my browser's cache and cookies. Also,restart the server by deleting temp and work of my tomcat.

Regards,
Jatin Panchal
Corné Aussems
RE: 'noticeEl' is null or not an object
January 17, 2011 2:07 AM
Answer

Corné Aussems

Rank: Liferay Legend

Posts: 1289

Join Date: October 3, 2006

Recent Posts

Did you clear the messages in the console ?!
Jatin Panchal
RE: 'noticeEl' is null or not an object
January 17, 2011 2:26 AM
Answer

Jatin Panchal

Rank: New Member

Posts: 15

Join Date: July 26, 2010

Recent Posts

Hi All,

This error was coming because of improper folder structure of my created hook.

Now the error is gone..

Again Thanks to all for your quick response.

Regards,
Jatin