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

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesEnable Skin Widgets and jQuery RegistrationEnable Skin Widgets and jQuery Registration
Previous
 
Next
New Post
8/25/2011 9:13 AM
 
Hi guys/gals,

I've come across a very weird situation and I'm wondering if I'm misunderstanding something about 'Enable Skin Widgets' and jQuery Registration.

In a module of mine, I'm making a call to DotNetNuke.Framework.jQuery.RequestRegistration() but jQuery only gets injected if the 'Enable Skin Widgets' setting under 'Admin - > Site Settings - > Appearance' is turned on. As soon as I turn it off then no more jQuery, at least not for anon users. It was my understanding that these weren't related.

Can anyone clear this up for me? I searched fixed bugs but didn't some across anything.


Richard Edwards
www.dnnstuff.com
Quality DotNetNuke Modules, Unrivaled Support (since 2004)
All 6 modules for as low as $49
 
New Post
8/25/2011 9:48 AM
 
what version of DotNetNuke are you using - the enable skin widget's part is meant to be additive and not take away -the current code looks like this:

 //register DNN SkinWidgets Inititialization scripts

 if (PortalSettings.EnableSkinWidgets)

{

 jQuery.RequestRegistration();

 ClientAPI.RegisterStartUpScript(Page, "initWidgets", string.Format( "<script type=\"text/javascript\" src=\"{0}\" ></script>",

ResolveUrl("~/Resources/Shared/scripts/initWidgets.js")));

}



so as you can see it requests registration meaning jquery will be there on any page -if another module also requests registration it wont matter as its been done already. The symptoms you describe suggest that the requestregistration call in your module may not be working (or may be working too late e.g. in an event handler rather than the init/load event in the module)

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
8/25/2011 10:59 AM
 
Thanks Cathal,

I'm actually doing it in Page_PreRender so I thought it should still work. Perhaps that's too late in the order. I'll do some testing to see if that's the cause.

Thanks again.



Richard Edwards
www.dnnstuff.com
Quality DotNetNuke Modules, Unrivaled Support (since 2004)
All 6 modules for as low as $49
 
New Post
8/25/2011 10:50 PM
 
Page_PreRender is never the best place to alter system level settings since actions that happen in OTHER controls at the Pre_Render stage may have already occurred.

I would move the registration to Page_Init or Page_Load.

Westa
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesEnable Skin Widgets and jQuery RegistrationEnable Skin Widgets and jQuery Registration


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