• Resolved zeaks

    (@zeaks)


    I’ve been using gravatar hovercard code on my site.
    I noticed I get an error in IE with certain themes, 2010 weaver is one, for example.
    “Object doesn’t support this property or method line 331 char 3.” is the error.
    It works fine with twenty ten and on wordpress.com and webtoolscollection. I’m guessing it has something to do with java script conflicts, I’m totally lost in that area.

    https://ottopress.com/2010/gravatar-hovercards/ is the code I’m using.
    https://test.zeaks.org Is where I’m using it, no other plugins except for the recent comments are installed.

    Any help is appreciated.

Viewing 15 replies - 16 through 30 (of 31 total)
  • Thread Starter zeaks

    (@zeaks)

    Still get an error with that one in IE, works in FF fine though.

    Message: Object doesn’t support this property or method
    Line: 335
    Char: 3
    Code: 0
    URI: https://s.gravatar.com/js/gprofiles.js?g

    Appreciate the help btw

    Moderator James Huff

    (@macmanx)

    Oh, it’s getting the error from the js file!

    Well, line 335 is description = GProfile.get( 'aboutMe' ); which makes char 3 s, which still doesn’t help. ??

    I’m going to call for backup on this one. Hang tight.

    Moderator James Huff

    (@macmanx)

    FYI, I just dug out my PC and checked my blog in IE 8, same problem. So, I checked Otto’s site, same problem there too. Then, I checked wordpress.com, no problem there. At least you aren’t alone, but there’s definitely something they’re doing differently on wordpress.com.

    Thread Starter zeaks

    (@zeaks)

    I see the error on these forums in IE as well, but yeah wordpress.com blogs are fine, same with some themes. if I switch to twenty ten it works fine.

    I don’t know why, but I do know that my hovercard doesn’t load properly. Bah.

    Moderator James Huff

    (@macmanx)

    mrmist, you have to use your gravatar account’s primary email address. It’s a limitation in the profile API.

    bah, that defeats the purpose of having multiple addresses bound to it.

    Moderator James Huff

    (@macmanx)

    Yeah, apparently the majority use their different gravatars as different personas or identities, so having them all link back to the same profile would defeat that purpose. Fortunately, the Gravatar crew is working on an opt-in feature.

    Multiple identiies? Good gosh. I have enough trouble with one.

    On the .org forums, it seems like the issue is that jQuery isn’t being loaded in IE for some reason. Check out “View Source” for this page in IE and it’s missing the script tag for jQuery.

    Okay, figured it out. Turns out IE is flailing because of a global and local variable conflict. and the culprit is the description variable.

    Add this code to the your head or right before you echo the gravatar script:
    <script type="text/javascript">var description = '';</script>

    I tested through IE’s developer tools and that seems to fix the problem.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    jQuery isn’t loading here on .org unless you’re logged in. Dunno why, but I’ll sort it out.

    The description fix did work for me on ottopress.com. No idea why.

    And for those who care to know what the specific issue is:

    When you add a meta description tag on your page, i.e. <meta name="description" content="..." IE adds a global JavaScript variable called description, that returns the meta tag.

    One of the gravatar functions is using a description variable but not defining it as local scope. So IE thinks it should use the glboally defined description var. But IE apparently doesn’t like converting objects to strings, which is why it’s throwing the error.

    Thread Starter zeaks

    (@zeaks)

    Thanks everyone, works now

    Moderator James Huff

    (@macmanx)

    Thanks for sharing the fix with us, Mohammad!

Viewing 15 replies - 16 through 30 (of 31 total)
  • The topic ‘Hovercards on self hosted theme issue’ is closed to new replies.