We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26982
    • 75 Posts
    I’m hoping this has a simple explanation, but I’ve been going mad trying to debug it!
    I am using DItto 2.0.2 with MODx 0.9.6 RC1

    My document structure is:
    Root->Products-><various manufacturer names>-><various product ranges>
    eg: One manufacturer is called "Ebara" and its folder ID is 50, and it contains 6 child documents, each of which is a product range (of pumps).
    Within the parent page (id=50), I am using the following ditto call:
    [!Ditto? parents=`50` &display=`all` &depth=`1` &sortBy=`pagetitle` &sortDir=`ASC` &tpl=`ditto_menu` &tplCurrentDocument=`ditto_menu_selected`! &debug=`1` !]

    You can see the output in the righthand sidebar, here: http://www.polypump.co.uk/ebara_pumps.html

    The same output should be shown when any of those ditto-generated links are clicked.
    However, the same ditto call on those pages doesn’t return any documents.
    eg: http://www.polypump.co.uk/ebara_2cdx_range.html

    I have enabled "debug" on all those links and would be very grateful for some help.

    Thanks,

    /\dam
      • 18397
      • 3,250 Posts
      Now that is bizzare. I’ll run some tests locally based on the debug info and get back to you.
        • 26982
        • 75 Posts
        Sorry to be a pain sad. I can PM you a manager login if that’s any use.

        Is this possibly a MODx 0.9.6 RC1 issue, and nothing to do with Ditto?
        The only difference between the call that works and the ones that don’t (as far as I can tell) is that the ones that don’t are from a level below the parent.

        Incidentally, I upgraded the version of Ditto that was shipped because the older version just crashed when no documents could be found (the "invalid arg in foreach()" bug). In other words, the version that was shipped displayed the same problem too.

        Thanks for any advice,

        /\dam
          • 18397
          • 3,250 Posts
          A manager login would be helpful, yes.
            • 18397
            • 3,250 Posts
            Swap
            [!Ditto? parents=`50` &display=`all` &depth=`1` &sortBy=`pagetitle` &sortDir=`ASC` &tpl=`ditto_menu` &tplCurrentDocument=`ditto_menu_selected`! &debug=`1` !]
            

            for this:
            [!Ditto?parents=`50` &display=`all` &depth=`1` &sortBy=`pagetitle` &sortDir=`ASC` &tpl=`ditto_menu` &tplCurrentDocument=`ditto_menu_selected`&debug=`1` !]
            


            You can see this working on http://www.polypump.co.uk/66

            Note, if you plan on using that same Ditto call across all of the documents in that folder you might want to look into putting that into a chunk as well as @INHERIT bindings.
              • 26982
              • 75 Posts
              Argh, where did that extra "!" come from?! I was sure I copy/pasted the call from the page that worked! sad.
              I didn’t realise the space between "ditto" and the question mark was wrong either.

              Many thanks for taking the time to help, it is most appreciated.

              /\dam
                • 18397
                • 3,250 Posts
                Glad everything is working now. smiley