[SOLVED] Slimbox and FLV player on one page conflicts in IE7

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

[SOLVED] Slimbox and FLV player on one page conflicts in IE7

Post by Jensensen »

Hi folks,

today my friends an me were wondering about a strange error:

There are two CPs on the page: image <div> with Lightbox switched on and FLV player.
All browser on linux, win or mac display the page with no problem.

But sometimes, e.g. after --> reload or when you go back to this page IE7 acts really strange.
It loads the page but stops abrupt and shows an error window:
ERROR: "Page can not be loaded"!!! [YOU STILL CAN SEE PAGE BEHIND] And then the screen switches immediately to a blank page!!!

When I disable one CP, either image <div> or FLV player, the page loads well.
Seems to be an interaction conflict of swfobject.js, mootools.js and slimbox.js.

Has anyone noticed this error (IE7 bug???) as well, any experiences, any suggestions?
Thank you.
Last edited by Jensensen on Wed 30. Jan 2008, 05:21, edited 1 time in total.
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Re: Slimbox and FLV player on one page conflicts in IE7

Post by Jensensen »

Well, so far I did run several tests, even locally and remote with static pages as well, checking error-logs and so on.

One reason seems to [could] be the order in which the JS libraries

1) occure in the page code and/or!!!
2) are loaded from the server [this vary {see server logs}!!!]

You can click the address directly, go back or --> reload!! more than 3 times and there are [mostly] no problems
with this order

Code: Select all

  <script src="template/inc_js/mootools/mootools.js" type="text/javascript"></script>
  <script src="template/inc_js/swfobject/swfobject.js" type="text/javascript"></script>
  <script src="template/slimbox/js/slimbox.js" type="text/javascript"></script>
but then --> after the fourth reload OR typing the adress OR when you go back --> IE7 crashes.


This are the error screens on my f---n windows machine:

Image

Image

Image
line 193 --> this is slimbox.js

Code: Select all

window.addEvent('domready', Lightbox.init.bind(Lightbox));
Have a look on what the web developer tools in IE7 shows:

view --> original {code}
Image

view --> DOM (page)
Image

KEEP IN MIND:
/changelog.txt
...
2007-08-28
[FIX] >>language="javascript" defer="defer"<< removed from Flash Video Player <script> tag - seems to make problems on IE.
...
it IS still there --> [DOM page view]:

Code: Select all

<SCRIPT id="ie_ready" src="javascript:void(0)" defer></SCRIPT>
BUT this time it has its origin in --> mootools.js
{check code}

anyway, without this [was tested] --> nothing works...


I even tried with a static page and A LOT OF --> CRLF {windoof line breaks] after:
<script src="template/inc_js/mootools/mootools.js" type="text/javascript"></script> on the page...

Yes, indeed!! [as IE7 DOM page view shows!!]

Code: Select all

<SCRIPT id="ie_ready" src="javascript:void(0)" defer></SCRIPT>
appears below --> other script tags!!!

In this case ----> you can --> [at least] reload half a dozen --> before this error occurs !!!
but unless you hack the code you can't reach this... :cry:


My suggestion so far: don't use both: slimbox and FLV media player on ONE page....

Any --> hints!! or solution would be strongly appreciated...
need help for this... [light{slim}box and flv media player on one page]
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Re: Slimbox and FLV player on one page conflicts in IE7

Post by DeXXus »

User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Re: Slimbox and FLV player on one page conflicts in IE7

Post by Jensensen »

Hey DeXXus,

THANK YOU VERY MUCH for directing my attention to this!!
There I could find a solution:

Really strange:
SWFObject conflicts with mootools
It [sometimes] can be fixed simply by putting ---> defer=”defer”.

SINCE THERE IS NO 'defer' in newer versions of 'swfobject.js' another WORKING fix can be found here:
http://www.rednas.be/news/43/swfobject- ... -error-fix
USE
<script type="text/javascript">
window.addEvent('domready', function(){
var so = new SWFObject("movie.swf","mymovie","400","200","8", "#336699");
so.write("flashcontent");
});
</script>

INSTEAD OF

<script type="text/javascript">
var so = new SWFObject("movie.swf", "mymovie", "400", "200", "8", "#336699");
so.write("flashcontent");
</script>


THIS WORKS FINE!!!!!
but, hey, this need some hacks:

/include/inc_front/content/cnt25.article.inc.php


line 166 change --> add below:

Code: Select all

	$fmp_data['script']  = '  <script type="text/javascript">'.LF.SCRIPT_CDATA_START.LF; // language="javascript" defer="defer"
	$fmp_data['script']	.= "  window.addEvent('domready', function(){".LF;

line 226 change --> add above:

Code: Select all

	$fmp_data['script']	.= LF.'  });';
	$fmp_data['script']	.= LF.SCRIPT_CDATA_END.LF.'  </script>';
Two days later I'm very :D :D again...
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
User avatar
Oliver Georgi
Site Admin
Posts: 9907
Joined: Fri 3. Oct 2003, 22:22
Contact:

Re: [SOLVED] Slimbox and FLV player on one page conflicts in IE7

Post by Oliver Georgi »

but the hack is NOT the solution - you always have to be sure that Mootools is loaded otherwise OnDomReady is not accessible.

OK, here is the fixed file (I hope). It always loads Mootools for FlashPlayer too.
http://phpwcms.org/snapshot/20080201_CPfix1.zip

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
culda_a
Posts: 521
Joined: Tue 28. Feb 2006, 01:39
Contact:

Re: [SOLVED] Slimbox and FLV player on one page conflicts in IE7

Post by culda_a »

Ok now the error is not apear again but now the flv file is not apear I get this error:
No JavaScript - no Flash Media!
I have just apply the patch offer by oliver, I use phpwcms 1.3.5
ImagePackging design,labels, catalogs,postcards,
User avatar
Oliver Georgi
Site Admin
Posts: 9907
Joined: Fri 3. Oct 2003, 22:22
Contact:

Re: [SOLVED] Slimbox and FLV player on one page conflicts in IE7

Post by Oliver Georgi »

You will need to have Mootools installed at the right place: template/inc_js/mootools/mootools.js
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
culda_a
Posts: 521
Joined: Tue 28. Feb 2006, 01:39
Contact:

Re: [SOLVED] Slimbox and FLV player on one page conflicts in IE7

Post by culda_a »

it is in the right place: /public_html/template/inc_js/mootools/mootools.js
ImagePackging design,labels, catalogs,postcards,
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Re: [SOLVED] Slimbox and FLV player on one page conflicts in IE7

Post by Jensensen »

[x]
Last edited by Jensensen on Sat 20. Sep 2008, 17:39, edited 1 time in total.
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
culda_a
Posts: 521
Joined: Tue 28. Feb 2006, 01:39
Contact:

Re: [SOLVED] Slimbox and FLV player on one page conflicts in IE7

Post by culda_a »

I don't use wma with flash player I use with multimedia content, so the problem is that now the flash player is not play anymore flv files

here is a imge of the content how is set:

Image
ImagePackging design,labels, catalogs,postcards,
User avatar
Oliver Georgi
Site Admin
Posts: 9907
Joined: Fri 3. Oct 2003, 22:22
Contact:

Re: [SOLVED] Slimbox and FLV player on one page conflicts in IE7

Post by Oliver Georgi »

For me it is still working very well.

So check if Mootools is really loading!!! And that you have JavaScript enabled!

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
culda_a
Posts: 521
Joined: Tue 28. Feb 2006, 01:39
Contact:

Re: [SOLVED] Slimbox and FLV player on one page conflicts in IE7

Post by culda_a »

For me it is still working very well.

So check if Mootools is really loading!!! And that you have JavaScript enabled!

Oliver
The Java Script is enabled, the mootools is on the right place /public_html/template/inc_js/mootools/mootools.js

I\m not a programer how can I check if is loadind the mootools?
Last edited by culda_a on Sat 2. Feb 2008, 20:01, edited 1 time in total.
ImagePackging design,labels, catalogs,postcards,
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Re: [SOLVED] Slimbox and FLV player on one page conflicts in IE7

Post by Jensensen »

on that page you PM me you still have an --> ERROR:
</script>
</head>
</html>

<link rel="stylesheet" href="template/slimbox/css/slimbox.css" type="text/css" media="screen" />
<script src="template/inc_js/mootools/mootools.js" type="text/javascript"></script>

<script src="template/slimbox/js/slimbox.js" type="text/javascript"></script>
<script src="template/inc_js/swfobject/swfobject.js" type="text/javascript"></script>
<script src="template/inc_js/AC_WriteActiveX.js" type="text/javascript"></script>
</head>
<body id="myid_13">
<script language="javascript" src="include/inc_js/AnchorPosition.js" type="text/javascript"></script>
<script language="javascript" src="include/inc_js/date.js" type="text/javascript"></script>
<script language="javascript" src="include/inc_js/CalendarPopup.js"></script>

<script language="javascript" src="include/inc_js/PopupWindow.js"></script>
<script language="javaScript" src="include/inc_js/overlib.js"></script>
<script language="javascript" src="include/inc_js/datarequestor-1.6.js"></script>
<script language="javascript" src="include/inc_module/mod_qcal/inc_js/qcal.js"></script>
culda_a wrote:...The Java Script is enabled, the mootools is on the right place /public_html/template/inc_js/mootools/mootools.js
but not in the page code!!!
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
User avatar
Oliver Georgi
Site Admin
Posts: 9907
Joined: Fri 3. Oct 2003, 22:22
Contact:

Re: [SOLVED] Slimbox and FLV player on one page conflicts in IE7

Post by Oliver Georgi »

Yepp page has many problems - but maybe also one of the other JavaScripts kicks Mootools to heaven!

It's hard to say why this happens - but first create a nearly valid DOM so that Mootools can find the right DIV.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
culda_a
Posts: 521
Joined: Tue 28. Feb 2006, 01:39
Contact:

Re: [SOLVED] Slimbox and FLV player on one page conflicts in IE7

Post by culda_a »

The error is corected but the problem with the flash player content is not solved, I have try to put the original files from the snapshot cnt23.article.inc and cnt25.article.inc is working in firefox but with IE is not, I have apply the patch from oliver and is not working allso not in firefox this time
ImagePackging design,labels, catalogs,postcards,
Post Reply