We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24981
    • 109 Posts
    Please delete: This problem was caused by having 2 copies of the Snippet!

    Hi,

    I have tried the original snippet code v1.2 and both the above beta versions 2.0 of the scripts with the following call:

    [!Wayfinder?startId=`[[UltimateParent]]` &hereClass=`` &selfClass=`current` &outerClass=`sidemenu`!]

    I have also tried swapping the cached and uncached calls around.

    The menu displays correctly on all pages at level 1, ie. shows a section menu for the sub-pages.

    BUT when I click on any of the sub-pages I get an error>

    MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « Execution of a query to the database failed - Unknown column 'Array' in 'where clause' »
          SQL: SELECT sc.parent FROM bgsbgs_urbanmodx.modx_site_content sc LEFT JOIN bgsbgs_urbanmodx.modx_document_groups dg on dg.document = sc.id WHERE (sc.id=Array AND sc.published=1 AND sc.deleted=0) AND (sc.privateweb=0) LIMIT 1


    Anyone else experienced this?

    Richard
      • 33372
      • 1,611 Posts
      The original version of UltimateParent had a bug in it that returned an array instead of the specific id value. That looks like what you problem is. Check the repository for the patched code.
        "Things are not what they appear to be; nor are they otherwise." - Buddha

        "Well, gee, Buddha - that wasn't very helpful..." - ZAP

        Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
        • 25483
        • 741 Posts
        Quote from: pan!c at Feb 17, 2007, 06:52 AM

        Hi,

        first thanks for this nice snippet!

        But I have a light problem realizing my menu structure with it:

        I am trying to create 3 level menu with three blocks and have problems with &topLevel :

        A B C <- horizontal menu
        C1 C2 C3 <- horizontal sub menu

        C2a <- verstical 2. sub menu
        C2b

        for A, B, C I have
        [!Wayfinder?startId=`0` &hereClass=`current` &level=`1` &outerClass=`mainnav`!]


        for C1, C2, C3 I have
        [!Wayfinder? &startId=`[[UltimateParent?]]` &level=`1` &hideSubMenus=`1` &hereClass=`current` &outerClass=`submenu` !]


        for C2a, C2b I have
        [!Wayfinder? &startId=`[[UltimateParent?  &topLevel=`2`]]` &hideSubMenus=`1` &hereClass=`current` &outerClass=`submenu2` !]


        I only want C2a, C2b to appear if I select C2 or C2a, C2b
        But with the wayfinder code above the folowing happens:
        If I select C -> C1, C2, C3 appear in the second sub menu box. But this should be empty!

        Any help on this would be greate. Thanks!
        padexx


        How could this be fixed? I have the same problem at the moment!
          with regards,

          Ronald Lokers
          'Front-end developer' @ h2o Media