We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8383
    • 6 Posts
    Hi
    I created small snippet to let visitors create documents.
    I use ditto to display those documents.
    Ditto isn’t refreshing the list of documents until I save something in the manager. I can see the docuemtns created in the document tree but ditto doesn’t show them.
    I tried $modx->clearCache() in the snippet that adds the documents.
    Also tried &clearcache=`1` when calling ditto
    I’m calling ditto using [!!]
    So... not sure what can I do to solve this problem.

    Thankyou
      • 8383
      • 6 Posts
      Just found NewsPublisher snippet.
      Still would like to know what I need to do for ditto to see new documents as I may need it later

      Thanks
        • 7231
        • 4,205 Posts
        Are the new documents ’published’? Otherwise it is most likely a cache issue (modx not ditto).
          [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

          Something is happening here, but you don't know what it is.
          Do you, Mr. Jones? - [bob dylan]
          • 22303 MODX Staff
          • 10,725 Posts
          Quote from: eastdacc at Sep 18, 2008, 08:25 PM

          Just found NewsPublisher snippet.
          Still would like to know what I need to do for ditto to see new documents as I may need it later

          Thanks
          Newspublisher includes code which exemplifies clearing the cache. $modx->clearCache() is not a public API function -- it actually only clears the current page’s cache file, not the siteCache which catalogs all of the documents that Ditto sees.
            • 15861
            • 24 Posts
            I’d have to agree with what dev_cw said. From my (limited) experience, it is probably either:


            • The documents are not published.
            • Your Ditto call is not using the no-cache version of the call. So, instead of [[Ditto...]] it should be [! Ditto... !]

            Hope that helps next time.
              • 31133
              • 22 Posts
              I am having exactly the same problem.

              Even If I go to the manager and I refresh the page, then the new documents shows up!

              I have all my documents notcacheable. I am nearly 100% that is not a cache problem.

              I have several websites with NewsPublisher and it’s the first time I find this problem.

              If somebody has the solution.
                • 31133
                • 22 Posts
                NewsPublisher has a parameter ClearCache which resolves the problem.