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
    As usual, please test and report any bugs here. Thanks!

    Changes from 2.0 Beta 1:


    [2007-1-19: REVISION 0000]

    [FIXED] Tag filter only enables if tags are specified
    [FIXED] No results display with custom formats

    [2007-1-22: REVISION 0000]

    [FIXED] Limit = 0 error handling
    [FIXED] Pagination division by 0 error
    [FIXED] Empty $_GET tags
    [NEW] Reflect can now get its own documents by running Ditto
    [NEW] seeThroughUnpub = 0 performance drastically increased
    [CHANGED] $ditto->getDocuments now returns an array with numeric, not string, keys


    Still to do before release:

    Make sure that the Ditto call feeding Reflect gets all of the fields in the Reflect template
    Modify the snippet so it re-uses prefetched data again

    Most likely pushed back:

    Conditional templating ... it can be done via PHx at the moment albeit with some restrictions

    You can checkout a copy from SVN here: http://svn3.cvsdude.com/ditto/codebase/branches/2.0/
    You can file bugs here: http://mirror3.cvsdude.com/trac/ditto/codebase
    Or via a weblink @ http://www.modxcms.com/ditto
      • 11975
      • 2,542 Posts
      Hi Mark,

      could you post the files as an attachement.

      I can’t access the SVN using svnx client.

      thx.

      :-)
        Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
        • 25663 MODX Staff
        • 12,272 Posts
        I’d really like to see this tested outside of the core dev team.
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 18397
          • 3,250 Posts
          "could you post the files as an attachement. "

          I actually don’t have access to an SVN client at the moment. I should later today.

          "I’d really like to see this tested outside of the core dev team."

          Beta 3 will be the public beta release as soon as "Still to do before release" are finished. These items shouldn’t take more than an hour or two. So its just a matter of finding the time.

          NOTE: The correct URL for Ditto 2.0 SVN is http://svn3.cvsdude.com/ditto/codebase/branches/2.0/
            • 11975
            • 2,542 Posts
            Hi Mark,

            Perhaps these comments will not be up to date since I’ve not yet tested the new beta.

            If you’re trying to apply a filter where values contains a comma, the parseFilter function will get the wrong filter mode.

            I guess it should be useful to add a filter delimiter which is not a comma itself (or let people set the tagDelimter and filterArgsDelimiter).

            Invalid filter example:

            &filter=`typeRecette,entrees,dessert,7`

            To fix this I’ve changed the explode argument to ":"
            So filters looks like this
            &filter=`typeRecette:entrees,dessert,:7`

            :-)


              Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
              • 18397
              • 3,250 Posts
              Ok, Ditto now re-uses prefetched data when needed. Please give the latest version a try. I’ll post a zip in the morning... hopefully....
                • 25663 MODX Staff
                • 12,272 Posts
                Mark you listed a few things for a public beta. Any word on them. Based on your comment above I’ve got:

                Still to do before release:
                Make sure that the Ditto call feeding Reflect gets all of the fields in the Reflect template
                Modify the snippet so it re-uses prefetched data again

                Most likely pushed back:
                Conditional templating ... it can be done via PHx at the moment albeit with some restrictions
                  Ryan Thrash, MODX Co-Founder
                  Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                  • 18397
                  • 3,250 Posts
                  Exactly.
                    • 11975
                    • 2,542 Posts
                    Hi Mark,

                    I guess there is an issue with $ditto->prefetch.
                    In my case when filter are on the parser send back an error (array_merge, second argument is not an array)

                    It seems to me that trouble comes from the key in the array. $ditto->prefetch["resource"].
                    The line involved is this one in the snippet code
                    $resource[$x] = array_merge($resource[$x],$ditto->prefetch["resource"][$start+$x]);

                    When filter are active the keys are no more incremental so there are missing keys.

                    hope that makes sense.

                    :-)


                    the $ditto->prefetch datas


                    [resource] => Array
                    (
                    [2] => Array
                    (
                    [id] => 14021
                    [published] => 1
                    [typeRecette] =>
                    [tagsPhoto] => viandes
                    )

                    [3] => Array
                    (
                    [id] => 14020
                    [published] => 1
                    [typeRecette] =>
                    [tagsPhoto] => viandes
                    )

                    [6] => Array
                    (
                    [id] => 13908
                    [published] => 1
                    [typeRecette] =>
                    [tagsPhoto] => viandes
                    )

                    [7] => Array
                    (
                    [id] => 13909
                    [published] => 1
                    [typeRecette] =>
                    [tagsPhoto] => viandes
                    )

                    [8] => Array
                    (
                    [id] => 13910
                    [published] => 1
                    [typeRecette] =>
                    [tagsPhoto] => viandes
                    )

                    [12] => Array
                    (
                    [id] => 13914
                    [published] => 1
                    [typeRecette] =>
                    [tagsPhoto] => viandes
                    )



                      Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
                      • 18397
                      • 3,250 Posts
                      Beta 3 is now out