We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29237
    • 5 Posts
    Hi there,

    I’ve been working on deploying a new site with Modx and Ditto, as I like the flexibility of both. Yet I cannot get Ditto to parse. First, I thought it might be a bad install of ditto, so I replaced all the files, and replaced the snippet call, yet no matter what I do, when I insert a Ditto call to a document, it fails to output anything.

    I’d like any suggestions on what might be causing this, or if anyone else had had the same problem and found a solution?

    At the simplest level, I have a page which with no content at all correctly displays the menu bar and side bar stuff.
    I added to it the ditto call: [[Ditto? &parents=`0`&tpl=`ul_ditto`]]
    "ul_ditto" is a chunk with "[+content+]" in it, and nothing else. (although omitting &tpl doesn’t change the problem)
    There are only 6 documents currently in the install, 1, 2, 3, and 6 are all in the root, 4 is a container containing just 5. changing the parent to `4` doesn’t help either.

    Please help.
      • 36592
      • 970 Posts
      What happens if you change your Ditto call from cached ( [[...]] ) to uncached ( [!...!] ) ?
        • 29237
        • 5 Posts
        Nothing much, still doesn’t parse
          • 36592
          • 970 Posts
          Quote from: Talismancer at Jun 19, 2008, 06:37 PM

          I cannot get Ditto to parse.
          when I insert a Ditto call to a document, it fails to output anything.
          Do you mean "nothing displayed" or "display something like ’no documents found’ " or "display the Ditto call itself" ?
          Which problem do you have ?
            • 29237
            • 5 Posts
            No HTML output at all.

            Link: http://www.ulthuan.net/index.php?id=6

            ID 4 is just the theme on it’s own if you want to see roughly what’s not happening.
              • 7231
              • 4,205 Posts
              In the manager check the event log in Tools > Event Log for any clues. To me it seems like the snippet is not working or there is an open tag which causing the problem. A common error is caused by either not having or having double php tags in the snippet code <?php ... ?>

              Also make sure that the snippet’s flder is uploaded to the correct directory on the server. It should be assets/snippets/ditto (notice the lowercase d in the folder name).

              Also you can remove the Ditto call to test to see if that is the problem.
                [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                Something is happening here, but you don&#39;t know what it is.
                Do you, Mr. Jones? - [bob dylan]
                • 29237
                • 5 Posts
                OK, I’ve removed and replaced the ditto files and snippet again, partly for my own sanity. Correctly uploaded to the right place (including noting the lowercase d), and ensuring there’s only one set of <?php ?> tags. This has not changed the problem at all.

                The event log doesn’t have any entries beyond my initial error forgetting to change permissions on the config while installing.

                Removing the ditto call generates a page identical to http://www.ulthuan.net/index.php?id=4, as the ditto call is the only thing on the page that’s not template generated. Incidentally, changing the template to either the default Minimal one, or to Blank doesn’t affect the result.

                I’m now wondering if this could be related to my original ModX install. Is it worth me re-installing ModX to see if that’s a problem?
                  • 7455
                  • 2,204 Posts
                  did you try calling ditto just like [[Ditto]] ?
                    follow me on twitter: @dimmy01
                    • 29237
                    • 5 Posts
                    calling just [[Ditto]], or [!Ditto!] doesn’t change the problem.

                    (BTW, thanks to everyone with ideas, comments and suggestions, regardless, as they’re proving it’s not just me being stupid (or may prove at some point it *is*). All help is greatly appreciated)
                      • 7231
                      • 4,205 Posts
                      Here are some thoughts:
                      1) Activate the Ditto debuger by adding &debug=`1` to your ditto call.

                      2) Where are you adding the ditto call? In the content window? Directly in the template? If you are putting it in the content window could this be a loop since the ditto tpl contains the content placeholder then the call would be parsing itself (just a wild guess here)?

                      3) change &parents to &documents=`1,2,3` and see what happens.
                        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                        Something is happening here, but you don&#39;t know what it is.
                        Do you, Mr. Jones? - [bob dylan]