We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14786
    • 57 Posts
    i have this snippet call
    [[Ditto? &startID=`2` &paginate=`0` &trunc=`0` &tpl=`events_tpl` &tplLastRow=`events_tpl_last` &sortBy=`pub_date` &sortDir=`ASC`]]

    when i create a new document in the folder it doesn’t display it on the website page until I clear the site cache?
      • 18397
      • 3,250 Posts
      [!--------!]
        • 14786
        • 57 Posts
        no effect

        [!Ditto? &startID=`2` &paginate=`0` &trunc=`0` &tpl=`events_tpl` &tplLastRow=`events_tpl_last` &sortBy=`pub_date` &sortDir=`ASC`!]
          • 18397
          • 3,250 Posts
          If you are creating the document via newsPublisher you need to have &clearcache set to 1.
            • 14786
            • 57 Posts
            I’m not creating a document through newspublisher. All I have is a container with the snippet

            [!Ditto? &startID=`2` &paginate=`0` &trunc=`0` &tpl=`events_tpl` &clearcache=`1` &tplLastRow=`events_tpl_last` &sortBy=`pub_date` &sortDir=`ASC`!]

            and a bunch of documents in that container. When I go to the page ?id=2 then I see these documents listed via the above snippet. If I go into the manager, duplicate one of the documents in container id=2 then go back to the website and refresh the page ?id=2 then i see no change. If I go to the manager and click "Clear Cache" then go back to the website and refresh the page ?id=2 I will see the extra document I duplicated.

            I tried adding the &clearcache so

            [!Ditto? &startID=`2` &paginate=`0` &trunc=`0` &tpl=`events_tpl` &clearcache=`1` &tplLastRow=`events_tpl_last` &sortBy=`pub_date` &sortDir=`ASC`!]

            still has no effect.

            I am running Ditto 1.0.2 and MODx 0.9.5
            Upgrading either is not an option
              • 18397
              • 3,250 Posts
              Make sure that the document you duplicated had the clear cache checkbox checked.

              Why is upgrading not an option? 9/10 times the bugs people are experiencing have been fixed in the newer version. Plus you can have the new and the old Ditto snippets installed simultaneously.

              P.S. &clearcache was referring to NewsPublisher not Ditto.
                • 14786
                • 57 Posts
                okay so duplicating a document with clear cache checkbox checked doesnt clear the cache

                upgrading is not an option because the site has already been launched and any extra work to tweek the site to work with the new versions is not in project scope.

                i have one snippet called Ditto and have not made any changes to the MODx platform so if there are new and old ditto snippets installed or whatever they came with the initial install package and were not added by me
                  • 18397
                  • 3,250 Posts
                  Does creating a new document with the clear cache checkbox checked clear the cache?

                  RE: Multiple Ditto versions : I was saying you can install Ditto 2 side by side with Ditto 1 if need be.
                    • 14786
                    • 57 Posts
                    saving the document with clear cache checked clears the cache yes
                      • 18397
                      • 3,250 Posts
                      "okay so duplicating a document with clear cache checkbox checked doesnt clear the cache"

                      So this is the problem then. Duplicating a document does not clear the cache. Try creating a new document, ensuring the checkbox is checked, and looking at the Ditto output. If it works, then there is a bug in the MODx code for duplicating documents.