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...Upgrading DNN P...Upgrading DNN P...Does dnn:NAV skin object still work? (DDRjQuery is undefined js error)Does dnn:NAV skin object still work? (DDRjQuery is undefined js error)
Previous
 
Next
New Post
11/2/2016 12:40 PM
 

I am trying to get an older skin to work with DNN 8.

Upon upgrade from 7.x to 8.0.0.4 I get a js error DDRjQuery is undefined.  I have narrowed this error down to the dnn:NAV skin object.  The error goes away when I comment this skin object and its definition out of the skin .ascx file.

I looked into this a bit and I found that DDRjQuery is defined in /DesktopModules/DDRMenu/js/DDRMenu.js but this file is not referenced.

The NAV skin object remains listed under Host, Extensions and there is also an example for its usage in the DDRMenu user guide but I am at a loss as to how else I could be setting it up in my skin and what could be wrong.  I also can't find a working example in any of the newer default skins that come with DNN.

Anybody have a working example?  Below is what I have.

<%@ Register TagPrefix="dnn" TagName="NAV" Src="~/Admin/Skins/Nav.ascx" %>

<dnn:NAV runat="server" id="dnnNAV" ProviderName="DDRMenuNavigationProvider" IndicateChildren="true" IndicateChildImageRoot="[SKINPATH]images/menu-arrow.png" IndicateChildImageSub="[SKINPATH]images/sub-menu-arrow.png" CSSNodeRoot="mainmenu-idle EMMainMenuItemOff EMMainMenuFont EMMainMenuFontSize" CSSNodeSelectedRoot="mainmenu-selected EMMainMenuItemOn EMMainMenuFont EMMainMenuFontSize" CSSNodeHoverRoot="mainmenu-selected EMMainMenuItemOn EMMainMenuFont EMMainMenuFontSize" CSSBreadCrumbRoot="mainmenu-breadcrumbactive EMMainMenuItemOn EMMainMenuFont EMMainMenuFontSize" CSSRightSeparator="mainmenu-separator" CSSNode="mainmenu-menuitem EMSubMenuItemOff EMMainMenuFont EMSubMenuFontSize" CSSContainerSub="mainmenu-submenu EMMainMenuFont EMSubMenuOpacity" CSSNodeHoverSub="submenu-menuitemsel EMSubMenuItemOn EMMainMenuFont" NodeLeftHTMLRoot="&lt;span class=&quot;tab-left trans-png&quot;&gt;&lt;img src=&quot;images/spacer.gif&quot;&gt;&lt;/span&gt;" NodeRightHTMLRoot="&lt;span class=&quot;tab-right trans-png&quot;&gt;&lt;img src=&quot;images/spacer.gif&quot;&gt;&lt;/span&gt;&lt;span class=&quot;tab-sep trans-png&quot;&gt;&lt;img src=&quot;images/spacer.gif&quot;&gt;&lt;/span&gt;">

<CustomAttributes>

<dnn:CustomAttribute Name="PathSystemImage" Value=""/>

</CustomAttributes>

</dnn:NAV>

 
New Post
11/3/2016 2:37 PM
 

I was incorrect about where DDRjQuery is instantiated.  In DNN 7 there used to be a script tag created in the body scripts placeholder as follows.

<script type="text/javascript">DDRjQuery=window.DDRjQuery||jQuery;</script>

Upon upgrade to DNN 8, this script tag disappeared.  When I manually put this script tag back into Default.aspx, the js error goes away and my menu is restored.  (It turns out my older skin had already upgraded to the DDRMenuProvider).

This script tag appears to be generated programmatically by DDRMenu in response to one of its template xml files.  https://searchcode.com/codesearch/vie...

What I am trying to figure out now is what template is being used by the NAV skin object.  MenuStyle is used to control template selection for a MENU skin object but I see no such thing for the NAV.

Maybe the a default is being used and that default changed between DNN 7 and 8?  Or maybe a defect was introduced into the template that is being used?

 
New Post
11/3/2016 4:03 PM
 

I believe I found the code that caused this behavior and it may be a bug.  https://github.com/dnnsoftware/Dnn.Pl...

In this revision, the author is allowing the DDR xml template to reference jQuery scripts without specifying the path.  The problem is that the DDRjQuery object is also given this capability in a different part of the code.  However, the revision overrides this capability and now any scripts tags in the xml template that have only a jsObject attribute without a path specified will be ignored.  This is why the code that instantiates the DDRjQuery object is no longer emitted.

I am attempting to determine the version that this bug was introduced so I will limit my upgrade to just before that version.

 
New Post
11/7/2016 11:27 AM
 

Because it looks like this bug is in the entire 8.x series and I need to upgrade to 8.x, my solution was to copy the default DNNMenu template to the skin folder and modify it.

I added a file called DDRjQueryFixed.js to the DNNMenu that contains the missing code.

DDRjQuery = window.DDRjQuery || jQuery;

Then I modified the DNNMenu-menudef.xml file with the following.

<script jsObject="DDRjQueryFixed">DDRjQueryFixed.js</script>

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Upgrading DNN P...Upgrading DNN P...Does dnn:NAV skin object still work? (DDRjQuery is undefined js error)Does dnn:NAV skin object still work? (DDRjQuery is undefined js 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