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

    Very strange error:

    array_values(): The argument should be an array

    Basically, I am creating a ditto page that generates my latest news folder with the id of 3:

    [[Ditto? &tpl=`DittoTemplate` &startID=`3`]]

    Here is my folder structure:

    News (2)
    - Archived News (4)
    - Latest News (3)

    If I change my code to read:

    [[Ditto? &tpl=`DittoTemplate` &startID=`2`]]

    i.e. to generate the Whole News folder, it works?

    Hope somebody can help out a newbie.

    Thanks/.
      http://www.blend.uk.com | Web Design by Blend
    • Hi lw-d,

      Do you have any documents published under the Latest News folder?

      Generally, the ’ ... should be an array’ error happens when the array hasn’t been created to pass into the array_values (for example, no documents being found). Just an idea, as I’m not fully up to speed on how Ditto would handle these exceptions ... wink

      Hope that helps,
      Garry

        Garry Nutting
        Senior Developer
        MODX, LLC

        Email: [email protected]
        Twitter: @garryn
        Web: modx.com
        • 17717
        • 433 Posts
        Thanks, I have moved the latest news folder to the root since I do not have any archived news at the minute, I will return to this thread once I do. In short, its working now since I have simplified it.

        Thanks
        Lee
          http://www.blend.uk.com | Web Design by Blend
          • 18397
          • 3,250 Posts
          This is a glitch in the No documents found message in Ditto 1.0.2. The fix is a simple one-liner and is posted in the main Ditto support thread.
            • 17717
            • 433 Posts
            Thanks Mark, will take a look. I am actually looking at another thread of yours relating to implementing dustin diaz’s contact form with modx.

            Your a helpful feller smiley

            Thanks
            Lee
              http://www.blend.uk.com | Web Design by Blend
              • 18397
              • 3,250 Posts
              Thanks wink