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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Edit Role module worked, Not and it was broken, and Manifest file fixed itEdit Role module worked, Not and it was broken, and Manifest file fixed it
Previous
 
Next
New Post
2/14/2008 1:38 PM
 

Here's one for you. I was developing a module. Said module needed to register Javascript. I did this:

                modPath = this.ModulePath;
                if (!Page.ClientScript.IsClientScriptIncludeRegistered("calendarDateInput"))
                {
                    Page.ClientScript.RegisterClientScriptInclude("calendarDateInput", modPath + "calendarDateInput.js");
                }

This worked. I went home. I came back in. NOW it changed behavior. If I was logged in with a role with Edit capabilities on the page, the Javascript was registered correctly, and the module submit button worked and everything was cool. If I wasn't logged in, or was logged in as a user without Edit capabilities, not only was my JS not registered, but clicking the submit button wouldn't even work. This, of course left me confused.

Viewing source, I noticed a difference in the generated names of elements on the page based on being logged in, and not being logged in with an Edit role. Logged in, I'd see names like this:

name="dnn$ctr380$ViewOpenBook$OB_Search"
and NOT logged in or without edit:
name="dnn$ctr380$ViewOpenBook$ViewOpenBook$OB_Search"

Odd. Something was saying "Caching problem" to me, so I cleared my browser cache: no go. I cleared my DNN cache: no go. I tried turning OFF DNN Cache: no go. All of my code was the same as the functioning code before, and so I double checked it. All good. I saw there was a cache setting in manifest which was set to 60. I changed this to 0. Still no good. Finally, I deleted the module definition from DNN, and then reimported it.

Now when I add my module to a page everything is working again.

My question is WHY DID THIS HAPPEN, AND WHY DID THIS FIX IT? (Caps just to emphasize my actual question after all that setup)

 

=====

 

As an aside, I have two questions about best practices:

Is the way I am getting the path of the module the best way? (modPath = this.ModulePath)

What all is supposed to be in the manifest file? IE should my CSS and Javascript files be listed, and images, and all that?

 

Any help is appreciated. I am asking this question because should this occur in a production environment, it would be a huge problem and I want to make sure I know WHY it happened so I can prevent it in the future if this is only a matter of me being stupid somehow.

Michael

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Edit Role module worked, Not and it was broken, and Manifest file fixed itEdit Role module worked, Not and it was broken, and Manifest file fixed it


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