In FF3.6 IE6, IE7 and IE8 (other browsers not tested yet) the following error appears on pages using flowplayer:

Line: 58 (for IE6, IE7)
Line: 57 (for FF3.6, IE8)
Char: 5
Error: 'console' is not defined
Code: 0
URL: http://-website domain-/sites/all/modules/swftools/flowplayer3/swftools_flowplayer3.js?D

This is the line pointed to:

  console.log($(this).attr('class'));

Does anyone know how I could prevent this?

Comments

RedTop’s picture

I'm quite sure the answer must be in this code somewhere, but I'm crap at javascript...

if (!window.console || !console.firebug)
{
    var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
    "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];

    window.console = {};
    for (var i = 0; i < names.length; ++i)
        window.console[names[i]] = function() {}
}

http://code.google.com/p/fbug/source/browse/branches/firebug1.5/lite/fir...

See this discussion:
http://stackoverflow.com/questions/2061339/ignore-firebug-console-when-n...

Stuart Greenfield’s picture

Status: Active » Fixed

Oops - that was a debug line that I've left in my mistake.

It's not present in the 6.x-3.x-dev package (at least, I don't think it is).

You can safely delete that line from /sites/all/modules/swftools/flowplayer3/swftools_flowplayer3.js.

Setting as fixed as this is a minor issue and it is already correct in the more recent releases.

But thanks for posting anyway!

RedTop’s picture

Thanks for the quick fix! :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

grasmash’s picture

I'm also experiencing this error, but I have 6.x-3.0-beta4 and I do not see that code in the specified file. Might something else be causing the problem?

grasmash’s picture

Status: Closed (fixed) » Active

Also, the error breaks JS in other active module. Marking as active.

grasmash’s picture

My bad, commenting out this line did fix the problem. However, the line should be removed from the dev version.

kthull’s picture

Confirming! And what a relief! I was out of my mind.