We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 244
    • 4 Posts
    Hello,

    There’s something fishy going on with Ditto and Reflect 2.1 on this website (http://www.stephanschultz.com/stephan-schultz-gigs.html) I’m building.
    Both Ditto and Reflect work like a charm and do exactly what I want them to do, which is great, but there’s a slight imperfection which bothers me:

    Placeholders like [+start+], [+stop+], [+total+], [+currentPage+], [+totalPages+], [+month+], [+year+] etc. remain empty.

    Here’s the chunk containing the Ditto and Reflect call:
    [!Ditto? &display=`2` &paginate=`1` &paginateAlwaysShowLinks=`1` &parents=`58` &tpl=`GigOverview` &dateSource=`gigDate` &dateFormat=`%d-%m-%Y` &filter=`gigDate,[!timeFilter!],3` &orderBy=`gigDate ASC`!] 
    
    <p>Showing [+start+] - [+stop+] of [+total+] Articles | Page [+currentPage+] of [+totalPages+]</p>
    
    <p>[+previous+] [+pages+] [+next+]</p>
    
    [!Reflect?config=`wordpress` &targetID=`68` &filter=`gigDate,[!timeFilter!],4` &getDocuments=`1` &dateSource=`gigDate` &tplContainer=`ArchiveTpl` &dittoSnippetParameters=`parents:58` &id=`wp`!]


    This gives the following result:
    Showing - of Articles | Page of

    The timeFilter snippet in the filter parameter is used to display documents with a current or future date only. (I’m aware of the fact that this can also be accomplished using @EVAL time(); but switching to this method doesn’t fix the placeholders-problem.)

    The problem also appears on the Reflect landingpage which contains the following chunk:
    <p>[+wp_month+]  [+wp_year+]</p>
    
    <p>[!Ditto? &id=`wp` &extenders=`dateFilter` &dateSource=`gigDate` &filter=`gigDate,[!timeFilter!],4` &parents=`58` &dateFormat=`%d-%m-%Y` &tpl=`GigOverviewArchive`!]</p>

    When I preview the page ’month’ and ’year’ remain empty.

    Is anybody familiar with this problem?

      • 16278
      • 928 Posts
      Do you have the PHx plugin installed and active? If so, you need to change the caching arrangement: make the Ditto call uncached cached, and make the document containing it non-cacheable in its Page Settings.
      wink KP
      (This and other Ditto notes at http://www.pogwatch.com/ditto)

      [edited 10 sep 09 to correct highlighted; fingers didn’t follow brain. Pogwatch info was always correct]
        • 244
        • 4 Posts
        Thanks for the advice kp52. You appear to be right about PHx causing this anomaly. (When PHx is disabled, pagination works fine.) The Ditto calls were already made uncached. Your suggestion to make pages containing the Ditto call non-cacheable doesn’t appear to help.

        Perphaps I should just disable PHx and start converting my PHx calls to snippets.  undecided
          • 33337
          • 3,975 Posts
          Make the page uncached, but make Ditto calls cached.
            Zaigham R - MODX Professional | Skype | Email | Twitter

            Digging the interwebs for #MODX gems and bringing it to you. modx.link
            • 244
            • 4 Posts
            Thanks for the suggestion but this worsens the situation.
            With the Ditto calls cached and the page uncached the web page displays an error message: ’The Ditto object is invalid. Please check it.’
              • 473
              • 70 Posts
                • 14491
                • 15 Posts
                I’m having this same trouble too. Disabling phx for ditto and reflect using &phx=`0` doesn’t help. Both the ditto call and reflect call are uncached. The page is also set up as uncached.

                If I get rid of the id that connects the ditto and reflect snippets, the pagination works, but reflect obviously doesn’t.
                  • 16278
                  • 928 Posts
                  Disabling phx for ditto and reflect using &phx=`0`
                  This isn’t the same as disabling the PHx plugin. Ditto has its own copy of PHx code which works fine with pagination and uncached Ditto calls. The clash comes about when you install the full PHx plugin, and that’s where many people have confirmed that the recipe is Ditto call cached, page non-cacheable to make pagination (and debugging) work. I have very little experience with Reflect, so I couldn’t say whether it adds new aspects to the problem.
                  undecided KP