Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Shiraj 47 posts 125 karma points
    Jul 29, 2013 @ 11:51
    Shiraj
    0

    Cogworks menu doesnt render

    Hi,

    I have installed the pakcage and used as described in Umbraco 6.1.3.But my menu deosnt render.

    Here is my code in masterpage

    <!-- menu -->
                   <div id="navcontainer">
                  <umbraco:Macro startingLevel="2" recurse="1" selectBranches="1" maxMenuDepth="999" ulBaseClass="vertical" branchClass="branch" selectedClass="selected" securityTrimming="1"  Alias="[COG]Navigation" runat="server"></umbraco:Macro>
                    </div>
                    <!-- end menu -->

    Nothing is rendering and output is this

    <div id="navcontainer-default">

    <div id="navcontainer"> </div>
    </div>
    Any ideas?
    Thanks

     

  • Berit 9 posts 26 karma points
    Aug 15, 2013 @ 10:52
    Berit
    0

    I have the same problem in Umrbraco v6.1.3. Does someone know if there is a solution for this?

    thanks
     

     

  • Claushingebjerg 939 posts 2574 karma points
    Oct 02, 2013 @ 15:21
    Claushingebjerg
    0

    Same in 6.1.6... Any solution?

  • René 327 posts 852 karma points
    Oct 10, 2013 @ 11:09
    René
    0

    Hi I´m running Umbraco v6.1.6 (Assembly version: 1.0.5021.24867) and i can´t get the Cogworks - Flexible Navigation to render.

    aspx.page Begin PreInit    
      Start: PreInit 0.000037 0.000037
      End: PreInit 0.000249 0.000211
    aspx.page End PreInit 0.000808 0.000560
    aspx.page Begin Init 0.000825 0.000017
      Start: Render Macro: [COG]Navigation, type: XSLT, cache: 0) 0.000923 0.000098
    renderMacro Render Macro: [COG]Navigation, type: XSLT, cache: 0) 0.000946 0.000024
      Start: Executing XSLT: [COG]Navigation.xslt 0.000969 0.000022
    umbracoMacro Xslt node adding search start (startingLevel,'1') 0.001009 0.000040
    umbracoMacro Xslt node adding search start (recurse,'1') 0.001036 0.000027
    umbracoMacro Xslt node adding search start (selectBranches,'1') 0.001052 0.000016
    umbracoMacro Xslt node adding search start (maxMenuDepth,'99') 0.001066 0.000015
    umbracoMacro Xslt node adding search start (ulBaseClass,'nav') 0.001081 0.000014
    umbracoMacro Xslt node adding search start (branchClass,'') 0.001108 0.000027
    umbracoMacro Xslt node adding search start (selectedClass,'current') 0.001126 0.000018
    umbracoMacro Xslt node adding search start (forceNode,'') 0.001143 0.000017
    umbracoMacro Xslt node adding search start (expandChildren,'1') 0.001158 0.000015
    umbracoMacro Xslt node adding search start (forceHome,'1') 0.001184 0.000027
    umbracoMacro Xslt node adding search start (securityTrimming,'1')

     

    Here is the debug result, it looks like it should work.

    Any ideeas..

    René

  • Jan Bengtsson 64 posts 107 karma points
    Oct 11, 2013 @ 09:39
    Jan Bengtsson
    0

    Hi, I've got exactly the same problem as René. It would be really great if someone (from Cogworks?) could help us with this critical problem.
    Thanks
    /Jan

     

  • Claushingebjerg 939 posts 2574 karma points
    Oct 11, 2013 @ 09:45
    Claushingebjerg
    0

    Its really strange since its pure xslt, and as far as i know there hasn't been any change to xslt in V6?!?!?!

  • René 327 posts 852 karma points
    Oct 12, 2013 @ 08:56
    René
    0

    Hi

    I have been looking at this and it is a bit strange.

    When i Visualize XSLT - Cog Navigation it works

    enter image description here

    Any ideas???

    Rene

  • René 327 posts 852 karma points
    Oct 12, 2013 @ 15:41
    René
    0

    Hi again

    It is a bit strange. Here is the output from the Cog Navigation, I do not know where the div come from.

    <div title="Macro Tag: '[COG]Navigation'" style="border: 1px solid #009;"></div>
    

    Here is the markup for the macro

    <umbraco:Macro 
            startingLevel="0" 
            recurse="1" 
            selectBranches="1" 
            maxMenuDepth="99" 
            ulBaseClass="nav" 
            branchClass="" 
            selectedClass="current" 
            forceNode="" 
            expandChildren="1" 
            forceHome="1" 
            securityTrimming="1" 
            Alias="[COG]Navigation" 
            runat="server">
            </umbraco:Macro>    
    

    I have tryed to uninstalle Cog Navigation and install again.

    Here is the information from the CogWorks Navigetion

    Package name Cogworks - Flexible Navigation Package version 1.0 Author Tim Saunders Package repository Umbraco package Repository Package readme This is the Umbraco 4.5+ version. it contains support for the new 4.5 schema.

    Any suggestions?

    Kindly René

  • René 327 posts 852 karma points
    Oct 12, 2013 @ 22:33
    René
    0

    Hi again 

    Now i have tryed on a new install of Umbraco 6.1.6 - With the same result.

    Any ideas would be great.

    A simpel demo with 3 menues, all XSLT

    • Cog Menu
    • Level 1 menu
    • Level 2 Menu


    The content three

     

    The XSLT Files


    This is the source view off the simple site (Nothing for Cog navigation) - The other 2 XSLT Navigation is rendered fine

    Any Ideas

     

    Have a nice sunday

    René

  • Chriztian Steinmeier 2800 posts 8790 karma points MVP 8x admin c-trib
    Oct 13, 2013 @ 14:48
    Chriztian Steinmeier
    0

    Hi René,

    I noticed above that you had startingLevel to zero — that will not render any menus, since there is no level zero node in Umbraco (<root> is level="-1" and top-level nodes are at level="1")

    I'm plowing through the XSLT to see if I can find anything that would cause the problems others are having here...

    /Chriztian

  • René 327 posts 852 karma points
    Oct 13, 2013 @ 18:31
    René
    0

    Hi Chriztian

    I have tested with level 1 and -1, nothing renderes in the COG Menu

    Here is the out put with level 1 (Nothing rendere)

       <umbraco:Macro 
            startingLevel="1" 
            recurse="1" 
            selectBranches="1" 
            maxMenuDepth="99" 
            ulBaseClass="" 
            branchClass="" 
            selectedClass="" 
            forceNode="" 
            expandChildren="1" 
            forceHome="1" 
            securityTrimming="1" 
            Alias="[COG]Navigation" 
            runat="server">
        </umbraco:Macro>
    <p> ---- MENU COG START ---- </p>
       
       
       
      <p> ---- MENU COG END ---- </p>
       
      <p> ---- MENU LEvel 1 STANDARD START ---- </p>
       
      <ul><li><a href="/1.aspx" class="selected">1</a></li><li><a href="/2.aspx">2</a></li><li><a href="/3.aspx">3</a></li><li><a href="/4.aspx">4</a></li><li><a href="/5.aspx">5</a></li></ul>
      <p> ---- MENU STANDARD END ---- </p>
      <p> ---- MENU level 2 STANDARD START ---- </p>
       
      <ul><li><a href="/1/11.aspx">11</a></li><li><a href="/1/12.aspx">12</a></li><li><a href="/1/13.aspx">13</a></li></ul>
      <p> ---- MENU STANDARD END ---- </p>
       
      1

    Here is the output with level -1

    <p> ---- MENU COG START ---- </p>
       
       
       
      <p> ---- MENU COG END ---- </p>
       
      <p> ---- MENU LEvel 1 STANDARD START ---- </p>
       
      <ul><li><a href="/1.aspx" class="selected">1</a></li><li><a href="/2.aspx">2</a></li><li><a href="/3.aspx">3</a></li><li><a href="/4.aspx">4</a></li><li><a href="/5.aspx">5</a></li></ul>
      <p> ---- MENU STANDARD END ---- </p>
      <p> ---- MENU level 2 STANDARD START ---- </p>
       
      <ul><li><a href="/1/11.aspx">11</a></li><li><a href="/1/12.aspx">12</a></li><li><a href="/1/13.aspx">13</a></li></ul>
      <p> ---- MENU STANDARD END ---- </p>


    <umbraco:Macro 
            startingLevel="-1" 
            recurse="1" 
            selectBranches="1" 
            maxMenuDepth="99" 
            ulBaseClass="" 
            branchClass="" 
            selectedClass="" 
            forceNode="" 
            expandChildren="1" 
            forceHome="1" 
            securityTrimming="1" 
            Alias="[COG]Navigation" 
            runat="server">
        </umbraco:Macro>
  • René 327 posts 852 karma points
    Oct 15, 2013 @ 08:34
    René
    0

    Hi 

    Is there anything new on this one. 

    Chritzian, could you produce the error?

    René

  • Robert Lewis 29 posts 94 karma points
    Oct 15, 2013 @ 14:08
    Robert Lewis
    0

    Hi Rene

    Have you tried setting the variables in the xslt manually to see if it works?

    Replace macro/startingLevel with 2, macro/recurse with 1 etc.

    Cheers

    Rob

     

  • René 327 posts 852 karma points
    Oct 15, 2013 @ 21:53
    René
    0

    Hi Rob 

    I have tried and it works. 

    Now the navigation is rendered, so there is som troubles with umbraco and getting the data from the macro.

    <!--This sets the level that the nav starts at and tells us if we should recurse through child elements-->
    <xsl:variable name="startDepth" select="1" />
    <xsl:variable name="recurse" select="1" />
    <xsl:variable name="selectBranches" select="1"></xsl:variable>
    <xsl:variable name="maxMenuDepth" select="99"></xsl:variable>
    <xsl:variable name="forceNode" select="0"></xsl:variable>
    <xsl:variable name="walkChildren" select="1"></xsl:variable>
    <xsl:variable name="forceHome" select="1"></xsl:variable>
    <xsl:variable name="securityTrimming" select="1"></xsl:variable>
    <!--Alternate page title variable in here-->
    
    <!--Styles for the navigation-->
    <xsl:variable name="ulBaseClass" select="0"></xsl:variable>
    <xsl:variable name="branchClass" select="0"></xsl:variable>
    <xsl:variable name="selectedClass" select="0"></xsl:variable>
    <p> ---- MENU COG START ---- </p>
    <ul class="0 lv1">
    <li class="0 hasChildren"><a href="/" class="0">page1</a></li>
    <li class="hasChildren"><a href="/1.aspx">1</a><ul class="lv2">
        <li class="hasChildren"><a href="/1/11.aspx">11</a><ul class="lv3">
            <li><a href="/1/11/111.aspx">111</a></li>
            <li><a href="/1/11/112.aspx">112</a></li>
    </ul>
    </li>
    <li><a href="/1/12.aspx">12</a></li>
    <li><a href="/1/13.aspx">13</a></li>
    </ul>
    </li>
    <li><a href="/2.aspx">2</a></li>
    <li><a href="/3.aspx">3</a></li>
    <li><a href="/4.aspx">4</a></li>
    <li><a href="/5.aspx">5</a></li>
    </ul>
    <p> ---- MENU COG END ---- </p>
    
    <p> ---- MENU LEvel 1 STANDARD START ---- </p>
    <ul><li><a href="/1.aspx">1</a></li><li><a href="/2.aspx">2</a></li><li><a href="/3.aspx">3</a></li><li><a href="/4.aspx">4</a></li><li><a href="/5.aspx">5</a></li></ul>
    <p> ---- MENU STANDARD END ---- </p>
    <p> ---- MENU level 2 STANDARD START ---- </p>
    <ul />
    <p> ---- MENU STANDARD END ---- </p>
    Page 1
    A

    Rene

  • Phill 115 posts 289 karma points
    Oct 17, 2013 @ 20:35
    Phill
    2

    Hi there,

    I had this same issue and was able to get the menu to work by changing the [COG]Navigation.xslt file:

    Before:

    <xsl:choose>
    <xsl:when test="$forceNode">

    After (this works for me):

    <xsl:choose>
    <xsl:when test="$forceNode > 0">

    Seems the simple first test to check for a value is always returning true for me. When I tested to make sure it was a value above 0 (which it would need to be in order to be an actual node) it worked like it was before I upgraded to version 6.1.6.

    Cheers,

    phill

  • Chriztian Steinmeier 2800 posts 8790 karma points MVP 8x admin c-trib
    Oct 21, 2013 @ 09:08
    Chriztian Steinmeier
    0

    OK, that really starts looking as if there's been a change in the way the <macro> document gets created from the parameters. Especially it seems that unspecified parameters are converted into either zero or some kind of 'null' string... (Otherwise, the simple test="$forceNode" wouldn't return true())

    Could you (René and Phill) try the age old copy-of trick to get some data for us? That is, setup the macro as you usually do with some parameters not specified (e.g. leave the forceNode - aka "Selected Page" - param empty), then do this inside the root template (<xsl:template match="/">) before everything else:

    <textarea rows="8" cols="40"><xsl:copy-of select="/macro" /></textarea>
    

    I'm very curious as to see what gets in there for the missing parameters...

    /Chriztian

    UPDATE: Added UI name of the forceNode param

  • René 327 posts 852 karma points
    Oct 21, 2013 @ 10:51
    René
    0

    Hi Christzian

    Here is the output.

    <macro>
    <startingLevel>1</startingLevel>
    <recurse>1</recurse>
    <selectBranches>1</selectBranches>
    <maxMenuDepth>99</maxMenuDepth>
    <ulBaseClass></ulBaseClass>
    <branchClass></branchClass>
    <selectedClass></selectedClass>
    <forceNode></forceNode>
    <expandChildren>1</expandChildren>
    <forceHome></forceHome>
    <securityTrimming>1</securityTrimming>
    </macro>

    This is the settings

       <umbraco:Macro 
            startingLevel="1" 
            recurse="1" 
            selectBranches="1" 
            maxMenuDepth="99" 
            ulBaseClass="" 
            branchClass="" 
            selectedClass="" 
            forceNode="" 
            expandChildren="1" 
            forceHome="" 
            securityTrimming="1" 
            Alias="[COG]Navigation" 
            runat="server">
        </umbraco:Macro>
  • Chriztian Steinmeier 2800 posts 8790 karma points MVP 8x admin c-trib
    Oct 21, 2013 @ 11:06
    Chriztian Steinmeier
    1

    Hi René,

    Thanks - I've been debugging a little myself, and I've tried this on an older 4.11.x version - the problem is that empty parameters are now always present in the macro XML - whereas, in the older versions, they only ocurred if they had an actual value - before, if you had an empty string, it wouldn't add the

    So the way we usually have been checking this in XSLT was to just look for the node - now, it seems that the XSLT needs to be updated to make sure there's an id in there... the test="$forceNode > 0" as Phill suggested will do that - best option would probably be to refactor some of the code to do all the conversions in the variables section to make the variables act like they did before, but depending on how they're used throughout the code that needs to be tested a little more.

    /Chrizitan

Please Sign in or register to post replies

Write your reply to:

Draft