We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25338
    • 5 Posts
    i used standard ditto implementation as follow:
    [[Ditto? &tpl=`DittoTemplate` &startID=`2` &summarize=`3` &commentsChunk=`FormBlogComments`]]
    and it came out that "&tpl is blank or you have a typo in the chunk name, please check it".
    I tried the default template. Any ideas?
      nice to meet MODx.
      • 18397
      • 3,250 Posts
      MARKSVIRTUALDESK Reply #2, 20 years ago
      Are you saying that this call fails as well?

      [[Ditto? &startID=`2` &summarize=`3` &commentsChunk=`FormBlogComments`]]
        • 25338
        • 5 Posts
        well yes...it says:
        « 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: D:\user\roc\website\web.broctany.com\manager\includes\document.parser.class.inc.php(705) : eval()’d code
        Line: 372

        Parser timing
        MySQL: 0.0026 s s (3 Requests)
        PHP: 0.1301 s s
        Total: 0.1326 s s
          nice to meet MODx.
          • 7923
          • 4,213 Posts
          In some ditto version, that parse error appeared if there was no documents to return, but that has been fixed. Is this the case?


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 824
            • 44 Posts
            Hey All, (Again)

            Seems i must be a total numpty when it comes to ditto, but i am having problems at the moment, and they are confusing.

            I am currently running 0.9.5 RC3, but have previously used 0.9.2 and had similar problems.

            I call ditto in a template variable called Sidebar (allows for different sidebar content lol) using the following call (tried a custom one this is a variation of the default.

            [[Ditto? &tpl='DittoTemplate' &startID='3' &summarize='3']]


            I have a chunk called "DittoTemplate" with the following contents (Direct rip from the basic, as i was running out of ideas)

            <div class="ditto_summaryPost">
            <h3><a href="[~[+id+]~]">[+title+]</a></h3>
            <div>[+summary+]</div>
            <p>[+link+]</p>
            <div style="text-align:right;">by <strong>[+author+]</strong> on [+date+]</div>
            </div>


            Now in the sidebar the only error i always get is "&tpl is blank or you have a typo in the chunk name, please check it.", but i have checked over and over, and there is not a typo in the chunkname etc. I have had trouble with this for some time.

            the site is at the moment on http://sandbox.alan-graham.co.uk/

            I am really confused as it should work, unless i am making a simple mistake.

            the 0.9.5RC3 is a clean install for development at the moment, and i am unsure as to why it wont work. For a while i had similar issues on RC2 and some reason it just started work.


            Thanks for the help, i didnt bother starting a new topic as it is just a fork of this.

            btw: i do have a page underneath the start id page so it cant be that (or can it)


              • 26435
              • 1,193 Posts
                 Judging by the code you pasted into this thread, you are using single quotes ( ’ ) instead of backticks ( ` ) {usually above the tab key on a standard keyboard}.

                 By typing &tpl=’DittoTemplate’ (using single quotes), You are telling Ditto to look for a chunk called {{’DittoTemplate’}} instead of {{DittoTemplate}} which probably doesn’t exist... which is why Ditto is throwing that error at you wink

              is this the case, or just a typo in your forum posting? If it is the case, you must use backtics `.  And you don’t need to feel like a "Numpty"! grin This is a very common mistake.

              -sD-
              Dr. Scotty Delicious, Scientist.
                Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
                All of the above... in no specific order.


                I send pointless little messages
                • 824
                • 44 Posts
                embarrassed Ok then seems a slight mistake, that would be why then, seems the " ` " are important. Thanks for that. Solves all my problems. It seems it is, might have to put a quick comment in the top of ditto to remind us all.

                Thanks again Scotty, and well it has been anoying me for some time, well now i know what the problem is.