Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Clean Site installed, on front page, right click anywhere, inspect element
Javascript errors keep incrementing on the following error
"Uncaught TypeError: Cannot read property 'top' of undefined"
Comment | File | Size | Author |
---|---|---|---|
jserrors.PNG | 47.46 KB | mxlav |
Comments
Comment #1
sylus CreditAttribution: sylus commentedI can't reproduce this on any of my sites.
Can you give exact steps to reproduce. No steps to small.
Do you have any custom modules?
Is the front page the default?
Can you reproduce this with simplytest?
Was Drush used to install?
Comment #2
mxlav CreditAttribution: mxlav commentedAlso get errors in IE8
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)
Timestamp: Thu, 12 Dec 2013 19:55:06 UTC
Message: 'offset().top' is null or not an object
Line: 9
Char: 91307
Code: 0
URI: http://7.28.135.63/wetkit-1.0-clean/profiles/wetkit/libraries/wet-boew/d...
Comment #3
sylus CreditAttribution: sylus commentedDid you import the demo content?
Comment #4
mxlav CreditAttribution: mxlav commentedSteps are straight forward...
Install WET 1.0 via browser (postgress backend)
Navigate to Home page
Inspect Element
get JS errors
Note1, If I disable aggregation, the error doesn't keep incrementing, only get it once
Note2, doesn't seem to happen on the admin theme.
Comment #5
mxlav CreditAttribution: mxlav commentedno demo content imported
Comment #6
sylus CreditAttribution: sylus commentedThis could be because the megamenu is empty (if you didn't run demo import) so the WET-BOEW library is trying to load content in the megamenu when there is none. Can you run the demo import install and see if the error goes away I believe it will! :)
I will look at this myself without demo import.
Comment #7
sylus CreditAttribution: sylus commentedComment #8
mxlav CreditAttribution: mxlav commentedImported all content, no more errors.
Comment #9
sylus CreditAttribution: sylus commentedFixed this issue by wrapping the menubar in an if statement so won't render the menubar div if menu links aren't present.
Tested and confirmed menu bar does not render when no content and js errors are gone.
Thanks!
Committed: http://drupalcode.org/project/wetkit_omega.git/commit/fdf2891