We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18397
    • 3,250 Posts
    Ditto 1.0.2 is a bug/performance release and is an essential update.

    WARNING: This update is only compatible with the latest version of MODx as it uses several new API functions.

    Documentation: http://modxcms.com/ditto_documentation.html

    Download: http://modxcms.com/Ditto-1.0.2-0.html
      • 16610
      • 634 Posts
      I have a problem with Ditto that makes me crazy. Can anyone confirm this kind of behaviour?

      If I make a new document with NewsPublisher that document doesn’t show directly in Ditto snippet. But after I edit and save any document also the newest document shows in Ditto. My Ditto snippet call is [!Ditto? &startID=`11` &summarize=`3`!]

      Exactly same situation with old NewsListing works fine even if placed on same page as Ditto snippet. In this case NewsListing shows new document immediately but Ditto doesn’t.
        Mikko Lammi, Owner at Maagit
        • 7923
        • 4,213 Posts
        Could it be that Newspublisher doesn’t set some date field or something the way that modx sets it when creating/saving a document..


          "He can have a lollipop any time he wants to. That's what it means to be a programmer."
          • 25663 MODX Staff
          • 12,272 Posts
          There are some edited/published oddities in the save_content.processor.php file that might be the cause of this. I just committed a fix for it in subversion for bug # 406 I think.
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 16610
            • 634 Posts
            Quote from: rthrash at Jul 11, 2006, 02:53 PM

            There are some edited/published oddities in the save_content.processor.php file that might be the cause of this. I just committed a fix for it in subversion for bug # 406 I think.

            OK, thanks for confirming this. Looks like my problem and this bug #406 are related.
              Mikko Lammi, Owner at Maagit
              • 18397
              • 3,250 Posts
              Upon further investigation it appears that the issue lies with the cache. Ditto 1.0.2 uses a new modx array called documentMap which is generated in the cache processor to facilitate easier locating of documents. It is used in Ditto to get all the children of a given document (far faster than the older SQL method as this is already generated by the system). Unless you set NewsPublisher to clear the cache on publish, the array will not be updated, and hence Ditto will be unable to get the documents. So, simply turn on the option in NewsPublisher to clear the cache.
                • 16610
                • 634 Posts
                Quote from: Mark at Jul 12, 2006, 11:27 PM

                So, simply turn on the option in NewsPublisher to clear the cache.

                Thank you Mark! This helps a lot smiley
                  Mikko Lammi, Owner at Maagit
                  • 16610
                  • 634 Posts
                  By the way, little typo in Ditto snippet on line 157:
                  $descendentDepth = (isset($descendentDepth))? $descendentDepth : 10;

                  Should be 1 instead of 10 according to documentation.
                    Mikko Lammi, Owner at Maagit
                    • 18397
                    • 3,250 Posts
                    Thanks for catching that. FYI, I actually renamed the descendentDepth parameter in the next release simply to depth.
                      • 14946
                      • 3 Posts
                      Is it possible to add at least a one-paragraph description to the Ditto documentation saying just what it does and what it is for?

                      As a newbie (to MODx, but not to computers or the Internet - I’m a software engineer for 30 years, and involved with the Intrernet since before it was called the Internet...) I haven’t a clue from the documentation of what it is used for.

                      Am I just clueless?

                      Just a simple, "Ditto is...".

                      Maybe that question can be answered here, and then incorporated into the documentation.

                      This discussion is closed to further replies. Keep calm and carry on.