We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33149
    • 28 Posts
    I am a complete newbie, so be gentle!

    I am trying to set up my site as a blog using the tutorial in Documentation.

    I am using Ditto in place of NewsListing. I would like to display 5 posts. My main site page will be the blog page also. Not sure if I need to adjust the startid to accomplish this.

    I put this call in my document -

    [!Ditto? summarize=`5`!]

    And get this error -

    « MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « PHP Parse Error »

    PHP error debug
    Error: array_values() [function.array-values]: The argument should be an array
    Error type/ Nr.: Warning - 2
    File: /home/.gollysybianheater/yliceb/ylice.net/manager/includes/document.parser.class.inc.php(748) : eval()’d code
    Line: 372

    Parser timing
    MySQL: 0.0561 s (7 Requests)
    PHP: 0.0572 s
    Total: 0.1133 s

    Any idea what could be wrong?
      • 25663 MODX Staff
      • 12,272 Posts
      Look in the code for the parameter telling it which document to start at. You need to explicitly set that I think. (&startID)
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 18397
        • 3,250 Posts
        If you are using Ditto 1.0.2 that error means no documents were found. You need to set the startID to the folder containing your blog entries.
          • 33149
          • 28 Posts
          Thanks! That is probably what it is. I don’t have any content yet. I’m just building the site.
            • 17429
            • 18 Posts
            Using 1.0.2, is it possible to avoid this error? What I’m trying to do is show a list of child pages relative to the current document. I’m using the following Ditto call:

            [[Ditto? &startID=`[*id*]` &tpl=`genericLink` &tplArch=`genericLink` &summarize=`1000` &sortBy=`pageTitle` &sortDir=`ASC` &descendentDepth=`1` &emptyText=`` ]]

            The desired output is a list of child pages of the current page, or nothing if there are no child pages. If there are child pages, this seems to work great. But if there are no children, then the MODx parser crashes. Am I making this much more complicated than it needs to be?? (I have a habit of doing that embarrassed)

            Thanks!


            Found my answer here: http://modxcms.com/forums/index.php/topic,7245.0.html

            Sorry to clutter the boards!