Yii2 website not display correct at IE while ok at chrome/firefox

Dear All,

Issue:One of my site cannot display normally at IE browser while it can display normally at chrome/firefox.

The IE log details as below. It sound like jquery not ready. Do any one can give a hand for it?

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; MS-RTC LM 8; .NET4.0C; .NET4.0E)

Timestamp: Wed, 15 Jul 2015 03:22:40 UTC

Message: Object doesn't support this property or method

Line: 3451

Char: 4

Code: 0

URI: http://localhost/demo/v2/assets/3196ea4/jquery.js


jQuery.ready.promise = function( obj ) {

	if ( !readyList ) {

		readyList = jQuery.Deferred();

		// Catch cases where $(document).ready() is called after the browser event has already occurred.

		// We once tried to use readyState "interactive" here, but it caused issues like the one

		// discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15

		if ( document.readyState === "complete" ) {

			// Handle it asynchronously to allow scripts the opportunity to delay ready

			setTimeout( jQuery.ready );

		} else {

			// Use the handy event callback

			document.addEventListener( "DOMContentLoaded", completed, false );  //<<---This line error if I check 3451 line in jquery.js

			// A fallback to window.onload, that will always work

			window.addEventListener( "load", completed, false );



	return readyList.promise( obj );



Message: 'jQuery' is undefined

Line: 44

Char: 1

Code: 0

URI: http://localhost/demo/v2/assets/bfc4288e/yii.js

Message: 'jQuery' is undefined

Line: 17

Char: 3

Code: 0

URI: http://localhost/demo/v2/assets/4b19aee1/js/bootstrap-notify.js

Message: Bootstrap's JavaScript requires jQuery

Line: 8

Char: 3

Code: 0

URI: http://localhost/demo/v2/assets/944f61b5/js/bootstrap.js

Message: 'jQuery' is undefined

Line: 10

Char: 1

Code: 0

URI: http://localhost/demo/v2/assets/83fe1114/js/dropdown-x.js

Message: Object expected

Line: 219

Char: 1

Code: 0

URI: http://localhost/demo/v2/


Scott Huang

From the error messages, it looks like the jquery is not loaded, and bootstrap require jquery as a dependency for most of its components to work.

Try and download the latest version of jquery and make sure you load it before all the other components.

You can go to developer tools and on the network tab, inspect whether the jquery is loading.

@Skapeyi, it should be caused by Jquery. Just not sure how to manual resolve it.

document.addEventListener( "DOMContentLoaded", completed, false );

I think that is browser itself issue or this version Jquery(in Yii 2.0.4) do not consider IE compatibility


The issue resolved after I change jQuery to version 1.11.3