Search code examples
javascript.netasp.net-mvc-3mvc-mini-profileryepnope

MVC-Mini-Profiler Error: yepnope is not defined


I am using the mvc-mini-profiler to profile my MVC site. It runs fine on my local machine, but when i publish to my hosting server, the profiler doesn't load, and i get the following error:

yepnope is not defined
yepnope([ 

As far as I can tell, the problem lies in the profiler trying to use yepnope before yepnope has been loaded. Is there a way around this, maybe by forcing a check to see if yepnope has been loaded before executing the miniprofile render command? Here are the relevant lines from the page's generated source

<script type="text/javascript" src="/mini-profiler-yepnope.1.0.1.js"></script>
<script type="text/javascript">
yepnope([
{ test: window.jQuery, nope: '/mini-profiler-jquery.1.6.1.js' }, 

And for completeness, the calls in my _layout file

<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js" type="text/javascript"></script>
@MiniProfiler.RenderIncludes(position: RenderPosition.Left, showTrivial: false, showTimeWithChildren: false)

Solution

  • In case anyone else has this problem, it has been submitted to their google code project. It is a known issue, and they are working on it.

    Issue Page if you want to track it