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 ...How to enforce that dnn.js is being loaded?How to enforce that dnn.js is being loaded?
Previous
 
Next
New Post
7/23/2014 7:59 AM
 
When I am not logged in as Admin, I get this JavaScript error: "Uncaught TypeError: Cannot read property 'attachEvent' of undefined" in dnncore.js

I think that is because dnn.js is not being loaded so dnn.dom is not defined. The page only loads dnn.jquery.js and dnncore.js. However, when I log in as Admin then the page loads a whole lot of other dnn* script files - for the Admin UI I guess - and the error does not occur.

I never bothered with controlling which dnn* scripts are being loaded and it just worked. What can I do to make sure the client API is being loaded properly?

I am not using bundling / optimization features.
 
New Post
7/23/2014 3:04 PM
 
I can fix the error by using

<script runat="server">
    protected override void (EventArgs e)
    {
        DotNetNuke.Framework.JavaScriptLibraries.JavaScript.RegisterClientReference(this.Page, DotNetNuke.UI.Utilities.ClientAPI.ClientNamespaceReferences.dnn);
    }
</script>

But I think this should not be necessary, something else probably hinders the scripts from being loaded automatically. I have no idea what that could be.

If I could, I would not use any CMS again, ever.
 
New Post
7/23/2014 6:59 PM
 
Normally, it should not be necessary.  I recently found that some skin objects register the need for the dnn.js file (specifically, the search skin object).  However, if this skin object is not included on the page, then the dnn.js is not loaded.  This is definitely a bug.

Joe Brinkman
DNN Corp.
 
New Post
9/4/2014 12:38 PM
 
I get this error as well.

I found out that it doesn't occur on every page, but only on some pages! I use Active Forums and the error (+ the missing dnn.js) occurs on all forum views except when viewing a specific post. I.e. it is not cause by a skin issue.

Do you know if this is logged in Jira as an formal issue to be fixed?

It is mentioned here, but as far as I understand it is ignored / considered not to be an issue: https://dnntracker.atlassian.net/brow...

 
New Post
9/4/2014 1:11 PM
 
PS: The workaround solved the problem for now. Thanks timvdh! Now I hope for a more permanent fix :)
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...How to enforce that dnn.js is being loaded?How to enforce that dnn.js is being loaded?


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