MorfeoShow SlideShow Module IE 6, 7 and 8 JS Bug fix

  • No avatar image
  • domand
  • Posts: 1
  • Joined: Sun Oct 05, 2008 8:14 pm

Poston Sat Nov 21, 2009 1:37 am domand said:

Hi Folks,

I have some troubles with Morfeoshow Slidshow (mod_mfslideshow) module in IE 6,7 and 8, where I get the error KB927917:

Code: Select all
Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; GTB6; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30729)
Timestamp: Thu, 20 Nov 2009 02:01:32 UTC

Message: HTML Parsing Error: Unable to modify the parent container element before the child element is closed (KB927917)
Line: 0
Char: 0
Code: 0


Original code (modules/mod_mfslideshow/tmpl/default.php):

Code: Select all
<?php
/**
* @version      $Id: mod_mfslideshow\tmpl\default.php 2009-05-08 waseem $
* @package      Joomla 1.5
* @copyright   Copyright (C) 2007 - 2009 Waseem Sadiq. All rights reserved.
* @license      GNU/GPL, see LICENSE.php
* @author      Waseem Sadiq - bulletprooftemplates.com
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/

// no direct access
defined('_JEXEC') or die('Restricted access');
$flashcontentdiv = 'flashcontent-'.rand(1000, 9999);
$nav = ($params->get('nav') ? 'true' : 'false');
$mov = ($params->get('mov') ? 'true' : 'false');
$shuffle = ($params->get('shuffle') ? 'true' : 'false');
$overstretch = ($params->get('overstretch') ? 'true' : 'false');
?>
<script type="text/javascript" src="<?php echo JURI::root(); ?>components/com_morfeoshow/src/js/swfobject.js"></script>
   

            <div id="<?php echo $flashcontentdiv;?>" align="middle">
                        <a href="http://www.macromedia.com/go/getflashplayer">
                           "Get the Flash Player"</a>
                           "to see this gallery."
                     </div>   
         <script type="text/javascript">            
         var s1 = new SWFObject("<?php echo JURI::root(); ?>components/com_morfeoshow/src/imagerotator.swf", "rotator", "<?php echo $params->get('width'); ?>","<?php echo $params->get('height'); ?>","7");
            s1.addParam("wmode", "transparent");
            s1.addVariable("file","<?php echo JURI::root(); ?>images/morfeoshow/<?php echo $params->get('galleryFolder'); ?>/xml/imagerotator.xml");
            s1.addVariable("width","<?php echo $params->get('width'); ?>");
            s1.addVariable("height","<?php echo $params->get('height'); ?>");
            s1.addVariable("transition","<?php echo $params->get('trans'); ?>");            
            s1.addVariable("shownavigation","<?php echo $nav; ?>");   
            s1.addVariable("kenburns","<?php echo $mov; ?>");
            s1.addVariable("rotatetime","<?php echo $params->get('speed'); ?>");
            s1.addVariable("shuffle","<?php echo $shuffle; ?>");                     
            s1.addVariable("screencolor","0x<?php echo $params->get('bkgnd'); ?>");
            s1.addVariable("usefullscreen","false");
            s1.addVariable("overstretch","<?php echo $overstretch; ?>");                     
            s1.write("<?php echo $flashcontentdiv;?>");
            </script>


This problem occurs on a mix between Jooma itself (core), your template code plus MorfeoShow Slideshow Module (mod_mfslideshow), according some posts that i've read.

I fixed this issue changing the way that flash is inserted in html.

I didn't have so much time to fix this issue appropriately, then I will show a quick workaround:

Fixed code (tested in FF3x, IE6~8, Opera10x and Chrome, W3C valid):

Code: Select all
<?php
/**
* @version      $Id: mod_mfslideshow\tmpl\default.php 2009-05-08 waseem $
* @package      Joomla 1.5
* @copyright   Copyright (C) 2007 - 2009 Waseem Sadiq. All rights reserved.
* @license      GNU/GPL, see LICENSE.php
* @author      Waseem Sadiq - bulletprooftemplates.com
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/

// no direct access
defined('_JEXEC') or die('Restricted access');
$flashcontentdiv = 'flashcontent-'.rand(1000, 9999);
$nav = ($params->get('nav') ? 'true' : 'false');
$mov = ($params->get('mov') ? 'true' : 'false');
$shuffle = ($params->get('shuffle') ? 'true' : 'false');
$overstretch = ($params->get('overstretch') ? 'true' : 'false');
?>

<div id="<?php echo $flashcontentdiv;?>" align="center">
  <object type="application/x-shockwave-flash"
          data="<?php echo JURI::root(); ?>components/com_morfeoshow/src/imagerotator.swf"
          width="<?php echo $params->get('width'); ?>"
          height="<?php echo $params->get('height'); ?>">         
    <param name="movie" value="<?php echo JURI::root(); ?>components/com_morfeoshow/src/imagerotator.swf" />
    <param name="quality" value="high" />
    <param name="menu" value="false" />
    <param name="allowscriptaccess" value="always" />
    <param name="allowfullscreen" value="false" />   
    <param name="flashvars" value="file=<?php echo JURI::root(); ?>images/morfeoshow/<?php echo $params->get('galleryFolder'); ?>/xml/imagerotator.xml&amp;width=<?php echo $params->get('width'); ?>&amp;height=<?php echo $params->get('height'); ?>&amp;transition=<?php echo $params->get('trans'); ?>&amp;shownavigation=<?php echo $nav; ?>&amp;kenburns=<?php echo $mov; ?>&amp;rotatetime=<?php echo $params->get('speed'); ?>&amp;shuffle=<?php echo $shuffle; ?>&amp;screencolor=0x<?php echo $params->get('bkgnd'); ?>&amp;usefullscreen=false&amp;overstretch=<?php echo $overstretch; ?>" />
  </object>
</div>   


BTW, I hope so this can help someone.

Re: MorfeoShow SlideShow Module IE 6, 7 and 8 JS Bug fix

  • No avatar image
  • omkar
  • Posts: 1
  • Joined: Wed Dec 09, 2009 11:39 pm

Poston Thu Dec 10, 2009 12:01 am omkar replied:

I had the same issue with morfeoshow, it would work ok under firefox/chrome but would fail with ie6/7... here is what I did

Open plugins\content\morfeoshow.php
Look for
<script type="text/javascript" src="'.JURI::root(true).'/components/com_morfeoshow/src/js/swfobject.js"></script>

Move this like to just above where the swfObject is defined.

Do the same thing to components\com_morfeoshow\tpl\imagerotator\imagerotator.php or any other module you may be using under the tpl folder.

This is caused because the getElement method which is called within swfobject is executed before the actual html object inside which its embedded is closed.
Attachments
morfeoshow.zip
sample changes
(9.89 KiB) Downloaded 280 times

Re: MorfeoShow SlideShow Module IE 6, 7 and 8 JS Bug fix

  • User avatar
  • waseem
  • Site Admin
  • Posts: 127
  • Joined: Wed Apr 30, 2008 1:21 pm

Poston Sat Jan 09, 2010 5:03 am waseem replied:

Hi Guys,

Just a quick note to thank you both for these internet explorer fixes. The module download has now been updated with the fixes you both provided.

Peace,

Waseem

Re: MorfeoShow SlideShow Module IE 6, 7 and 8 JS Bug fix

Poston Sat Feb 27, 2010 12:16 pm kudzaidotnet replied:

Hello. Can you please let me know if there's something I may have done wrong. I'm having the same problem mentioned where Morfeoshow does not work in IE (i'm on IE 8); however it works great on chrome and firefox. I'm using morfeo show's picasa option. The site is still in development but below is the link. I followed your instructions, and also tried copying your zip file files to replace mine, but still getting the same error. Thanks:

http://bit.ly/cX7voZ


Return to Extensions

Who is online

Users browsing this forum: No registered users and 1 guest