yodeski / mvc-mini-profiler

Automatically exported from code.google.com/p/mvc-mini-profiler
0 stars 0 forks source link

initPopupView() can call undefined Sys.WebForms.PageRequestManager.getInstance(); #76

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install MiniProfiler to ASP.NET Website
2. Include MicrosoftAjax.js file in web page
3. The initPopupView() will call undefined 
Sys.WebForms.PageRequestManager.getInstance();

What is the expected output? What do you see instead?

The initPopupView() should also check that Sys.WebForms.PageRequestManager is 
defined.

What version of the product are you using? On what operating system?

MiniProfiler 1.7

Please provide any additional information below.

The Includes.js files contains check for the Sys object from Microsoft AJAX 
library in the initPopupView() function.
If the web page includes MicrosoftAjax.js the Sys object is defined but the 
Sys.WebForms.PageRequestManager does not exist. Calling getInstance() function 
on this method causes exception to be thrown and MiniProfiler's popup window 
won't function correctly.

Exception stacktrace:

Uncaught TypeError: Cannot read property 'PageRequestManager' of undefined
initPopupViewmini-profiler-includes.js:342
initmini-profiler-includes.js:372
(anonymous function)Map:21
f.extend._Deferred.e.resolveWithjquery-1.6.2.min.js:16
f.extend._Deferred.e.donejquery-1.6.2.min.js:16
f.e.fn.e.readyjquery-1.6.2.min.js:16
f.e.fn.e.initjquery-1.6.2.min.js:16
f.ejquery-1.6.2.min.js:16
yepnope.completeMap:20
Emini-profiler-yepnope.1.0.1.js:1
Bmini-profiler-yepnope.1.0.1.js:1
c.onreadystatechange.c.onloadmini-profiler-yepnope.1.0.1.js:1

Original issue reported on code.google.com by jozef.izso on 28 Jul 2011 at 3:30

GoogleCodeExporter commented 9 years ago
I have made the fix described and tested it using the steps to reproduce and it 
is working correctly.

The revision can be found here
https://code.google.com/r/mhbuck-mvc-mini-profiler/source/detail?r=216d58bd75936
e37cad68ef96c73774ad5fc34f3

Original comment by MHB...@gmail.com on 28 Jul 2011 at 8:03

GoogleCodeExporter commented 9 years ago
When will this change be available via NuGet? I really want to use this tool 
extensively, but am not able to do so because of this JS problem! Please 
release this on NuGet ASAP!!!

Original comment by dhwanils...@gmail.com on 2 Aug 2011 at 7:03

GoogleCodeExporter commented 9 years ago
Small addition to the patch:
http://code.google.com/p/mvc-mini-profiler/issues/detail?id=82
Otherwise profiler will still fail

Original comment by bogdan.w...@gmail.com on 3 Aug 2011 at 12:49

GoogleCodeExporter commented 9 years ago
Those patches looks great. Thanks for fixing the issue.

Original comment by jozef.izso on 3 Aug 2011 at 12:52

GoogleCodeExporter commented 9 years ago
Issue 82 has been merged into this issue.

Original comment by nrcraver on 14 Aug 2011 at 12:30

GoogleCodeExporter commented 9 years ago
Has this been merged in to the trunk? If so, we should push a new NuGet package.

Original comment by sc...@hanselman.com on 25 Aug 2011 at 5:41

GoogleCodeExporter commented 9 years ago
just patched this in ... nuget later today

Original comment by sam.saff...@gmail.com on 26 Aug 2011 at 2:07