Page 1 of 1

[fixed] SWFobject 2 + Mootools craches IE6

Posted: Wed Jul 23, 2008 5:41 pm
by louisk
i found a (kind of) major bug... but it isn't any ones bad.
CMSMS adds the tag at the top of the every page. But when you have flash on your page using the new SWFobject 2 in combination with the MooTools 1.2 java script framework, Internet Explorer craches completely :o
This error presumably will also occur with older versions of SWFobject and/or MooTools and other combinations of java scripts.

The fix is to add a small pies of code that closes the base tag () only in Internet Explorer.

Open the file plugins/function.metadata.php and go to line 44 where it says $result .= "\n\n";

Just add replace it with this line: $result .= "\n\n";

And the problem is fixed.

I suggest adding this change to the distributed file just in case people run into this problem (as it's pretty hard to find anything on the net about this problem)

Re: [fixed] SWFobject 2 + Mootools craches IE6

Posted: Tue Jun 09, 2009 10:39 am
by soundZ
Hello louisk,

thanks a lot for that hint! Your workaround works realy fine, but I think it's not valid in the end  ;)
A clean and valid version without conditional comments would be the following:

line 44 in plugins/function.metadata.php:

Code: Select all

$result .= "\n<base href=\"".$config['root_url']."/\"></base>\n";
It's a little bit unusal notation in XHTML for empty Tags, but it's OK and valid. And the truly astonishing fact about this solution is: you save 27 bytes in your code!  ;D  ;D  ;D