*UPDATE: As of December 1st, when version 1.1 is released, this issue is fixed.

I’ve just installed StatTraq, a popular Wordpress plugin for tracking your site’s statistics. I like it and I can’t wait to see the first ‘real’ results after a month or so has passed.

But the problem is – Internet Explorer 7 just won’t load the page if you’ve got StatTraq running. I was getting a blank page and a “Internet Explorer cannot open this page” error. No code errors, no warnings, nothing, as if the site is unavailable.

So I searched around a bit and found this post by Avery J. Parker with a small clue in it :) Avery wrote:

…carried this error at the bottom of the page (ONLY in IE7 by the way…) “Fatal error: Call to undefined function:() in /var/www/html/radiotv/wp-content/plugins/stattraq.php on line 90″

Around line 90, there’s a function for browser detection and Internet Explorer 7 wasn’t on the list. I guess IE7 didn’t like that very much, heh. Anyways, all you need to do to fix the problem is:

  1. Open ’stattraq.php’ file that resides in your ‘wp-content/plugins’ folder
  2. Go to line 80/81 and replace:
    if(strpos($ua, 'MSIE 6')!==false || -->
    strpos($ua, 'MSIE6')!==false)
    $ver = 6;

    with:

    if(strpos($ua, 'MSIE 7')!==false || -->
    strpos($ua, 'MSIE7')!==false)
    $ver = 7;
    else if(strpos($ua, 'MSIE 6')!==false || -->
    strpos($ua, 'MSIE6')!==false)
    $ver = 6;

    *note: –> means that this is not the end of the line, line breaks at ‘$ver = …’

  3. Save the file and you’re done.
  4. Check the page in Internet Explorer 7 and be happy if everything works :)

It worked for me, but if it doesn’t do the trick for you, please leave a comment.

I’ve posted a comment on StatTraq’s page so this will hopefully be fixed in the next version.

4 Responses to “Got problems with Internet Explorer 7 and StatTraq? Here’s a solution.”

You can follow any responses to this entry through the RSS 2.0 feed.

  1. GravatarP M Said

    There is a new version of Stat traq that is coming out this week. The new version will have this change in it.

  2. GravatarWebsite issues, forum issues, bannings, new rules.. oh my! Said

    Kramer auto Pingback[...] http://skyphe.org/2006/11/19/got-problems...That fixes the ie7 issue [...]

  3. Gravataranime_evolution: IE 7 Said

    Kramer auto Pingback[...] on line 90(Reply to this) (Parent) (Thread) halkeye 2007-03-01 02:07 am UTC (link) http://skyphe.org/2006/11/19/got-problems...(Reply to this) (Parent) rconiv 2007-03-01 01:39 am UTC (link) Sometimes the initial webpage will [...]

  4. GravatarHausbau Erfahrungen » Blog Archive » Hausbaublogleser ausgesperrt - Ein Fertighaus entsteht: Bauen / Umziehen / Einrichten / Wohnen... Said

    Kramer auto Pingback[...] und zu viel Arbeit bei zu wenig Zeit zerfloss, lieferte mir mein treuer Leser auch gleich noch die Lösung: Ein Statistiktool für WordPress (StatTraq) macht die Schwierigkeiten und grenzte den [...]

Leave a Reply