Support » Plugin: Slimstat Analytics » Javascript error 'Object does not support..' with IE7/IE6

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Jason Crouse

    (@coolmann)

    I’m sorry, but if you had cared to read the plugin’s homepage, you would have noticed that WP SlimStat is not compatible with those versions of Internet Explorer. Not even Microsoft supports IE6/IE7 anymore 😉

    Cheers,
    Camu

    The only IE related note I found on the plugin homepage is this:

    Browser Compatibility
    
    WP SlimStat uses HTML5 canvases to display its charts. This approach is not compatible with Internet Explorer 8 or older, so you're encouraged to upgrade your browser.

    End users and many companies don’t care about what Microsoft supports anymore or not, I observe a 20-30% share of IE6/IE7 on real world WordPress sites which have an international target-group.

    Adding a simple try..catch statement around the navigator.plugins code would solve the above described problem.

    Here is a quick-fix for interested readers:
    1. Replace wp-slimstat.js with dev/wp-slimstat.js
    2. Apply the following change, starting at line 66:

    _detect_single_plugin : function (plugin_name) {
    	var plugin, haystack, found, i, j;
    
    	try {	// added to avoid script error on older IE
    		if (navigator.plugins) {
    			for (i in navigator.plugins) {
    				haystack = '' + navigator.plugins[i].name + navigator.plugins[i].description;
    				found = 0;
    
    				for (j in SlimStat._plugins[plugin_name].substrings) {
    					if (haystack.indexOf(SlimStat._plugins[plugin_name].substrings[j]) != -1) {
    						found++;
    					}
    				}
    
    				if (found == SlimStat._plugins[plugin_name].substrings.length) {
    					return true;
    				}
    			}
    		}
    	} catch (e) {}	// added to avoid script error on older IE
    	return false;
    },

    Actually there is already a function _detect_single_plugin_ie() in WP Slimstat javascript (line 88) to detect plugins on old IE, but it is never used because the script fails before, because of above described problem…

    Plugin Author Jason Crouse

    (@coolmann)

    Good catch. I will implement this fix in my next release, thank you for your feedback 🙂

    Camu

    Plugin Author Jason Crouse

    (@coolmann)

    This has been fixed in version 2.8.4, which should be released later today 🙂 Please let me know if it works as expected.

    Cheers,
    Camu

    FYI, 2.8.4 works as expected, no more javascript error in IE6/IE7.

    Plugin Author Jason Crouse

    (@coolmann)

    YAY! Hey a vote for my plugin would be a nice way to say thank you!

    Cheers,
    Camu

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Javascript error 'Object does not support..' with IE7/IE6’ is closed to new replies.