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.
What happens if you change your Ditto call from cached ( [[...]] ) to uncached ( [!...!] ) ?
Nothing much, still doesn’t parse
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.
did you try calling ditto just like [[Ditto]] ?
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)
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.