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.
Today, Firebug reported the following error:
uncaught exception: [Exception... "Could not convert JavaScript argument arg 0 [nsIDOMViewCSS.getComputedStyle]" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: http://localhost/sites/all/modules/jquery_update/replace/jquery.js?1 :: anonymous :: line 808" data: no]
This type of error happens when jQuery tries to get the position of a hidden element (see http://bugs.jquery.com/ticket/2528). In this case, the hidden element turned out to be the space between the closing div-tag and the html comment in </div> <!-- /.view -->
on line 94 of zen/templates/views-view.tpl.php. A quick search revealed 20 occurrences of this pattern. I have removed all of them; patch attached.
I don't know if there is a coding standard which demands this kind of spaces, but if there is, I think it should be changed.
Comment | File | Size | Author |
---|---|---|---|
zen-whitespace-comment.patch | 5.22 KB | marcvangend |
Comments
Comment #1
JohnAlbinI've never seen this error, but the space is there purely because it slightly easier to read the code, IMO.
But an actual bug trumps a stylistic preference.
Fixed. http://drupal.org/cvs?commit=501154
Comment #2
JohnAlbinComment #3
JohnAlbinFixed. http://drupal.org/cvs?commit=501242