• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS made Simple Czech Site Zur deutschsprachigen Supportseite Site francophone Sitio en Castellano CMSMS - Magyarország CMSMS -  ???????
Pages: [1]
  Print  
Author Topic: [fixed] SWFobject 2 + Mootools craches IE6  (Read 4700 times)
0 Members and 1 Guest are viewing this topic.
louisk
Forum Members
**

Karma: 0
Offline Offline

Posts: 88


« on: 23 Jul 2008, 13:41 »

i found a (kind of) major bug... but it isn't any ones bad.
CMSMS adds the <base> 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 Shocked
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 (</base>) only in Internet Explorer.

Open the file plugins/function.metadata.php and go to line 44 where it says $result .= "\n<base href=\"".$config['root_url']."/\" />\n";

Just add replace it with this line: $result .= "\n<base href=\"".$config['root_url']."/\" /><!--[if IE]></base><![endif]-->\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)
Logged
soundZ
New Member


Karma: 0
Offline Offline

Posts: 6


« Reply #1 on: 09 Jun 2009, 06:39 »

Hello louisk,

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

line 44 in plugins/function.metadata.php:
Code:
$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!  Grin  Grin  Grin
Logged
Pages: [1]
  Print  
 
Jump to: