Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...dnn is not defined errordnn is not defined error
Previous
 
Next
New Post
9/17/2014 4:15 PM
 

Hello all,

For some reason the script in SimpleTokens.txt is generating the error "Uncaught ReferenceError: dnn is not defined".  This seems to stem from the line dnn.addIframeMask($this[0]); in this script:

<script type="text/javascript">
(function($){
$(document).ready(function(){
$(".nav-tabs > li a").on("mouseover", function(event){
var $this = $(this).parent().find(">ul");
if($this.length == 0) return;
dnn.addIframeMask($this[0]);
});
$(".dropdown").attr("aria-haspopup", "true");
$(".dropdownactive").attr("aria-haspopup", "true");
$(".dropdown-menu").attr("aria-haspopup", "false");
});
})(jQuery);
</script>

No changes have been made to this file other than specifying "nav-tabs".

Any help is greatly appreciated.

Thanks,

Dave

 
New Post
9/25/2014 4:00 PM
 
thats very strange -dnn.addIframemask comes from dnn.js which is essentially included on every page (except for installwizard/upgradewizard AFAIK) - can you view the source of your page and verify that dnn.js is reference (and if so, if it is only referenced once)

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
9/26/2014 1:40 PM
 

I've checked, and for some reason dnn.js is NOT loading on this site. It's the first new portal we've created since moving to 7.3.2.

What normally loads dnn.js? Can I add something to the template to force it to load?

Thanks!

 
New Post
9/26/2014 2:22 PM
 

it's registered by around 13 different things, from controls to modules. I believe up until 7.3.0 it was included on every page request even though it wasn't needed (we fixed that as part of http://www.dnnsoftware.com/wiki/page/dnn-7-3-developer-quick-start#Platform_performance_enhancements_0 )

the correct API to register is as follows (either will do)

JavaScript.RegisterClientReference(control.Page, ClientAPI.ClientNamespaceReferences.dnn); JavaScript.RegisterClientReference(control.Page, ClientAPI.ClientNamespaceReferences.dnn_dom);

however as you're using simple.txt it's not that easy as you need script - if you include it as a src file then if anything also registers it that will cause an exception. So the best approach is to include it within whatever ascx you're using e.g. use a dnn:DnnJsInclude


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
9/26/2014 2:22 PM
 
BTW it's probably a good idea to log this as an issue with as much detail as possible to support.dnnsoftware.com

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...dnn is not defined errordnn is not defined error


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out