We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15197
    • 65 Posts
    I’m trying to use the wp configuration archives on a MODx blog set-up. It worked alright when it went to the default (createdon), but doesn’t seem to be working with pub_date. And, no, I’m not using MySQL 5.0.51, but it’s even older, 5.0.45. This site is using MODx 1.0.3.

    Here’s my Ditto call on the target page:

    <h1>Posts from [+wp_month+] [+wp_year+]</h1>
    [!Ditto? &id=`wp` &parents=`2` &tpl=`ditto_blog` &extenders=`summary,dateFilter,tagging` &dateSource=`pub_date` &tagData=`documentTags` &tagDelimiter=`, ` &total=`all`!]

    This part works well once the archive link goes to the correct month.

    Here’s my Reflect call in the blog sidebar:

    [[Reflect? &config=`wordpress` &targetID=`63` &dittoSnippetParameters=`parents:2` &dateFilterSource=`pub_date` &sortBy=`pub_date` &id=`wp` &getDocuments=`1`]]

    With this snippet call, it seems to build the monthly archive links for months that have posts based on ’createdon’. When I change $dateFilterSource to &dateSource, it doesn’t seem to find any posts and reverts back to Dec.1969, probably the oldest year programmed into the snippet.

    Can anyone see what I’m missing?

    Thanks!
      • 7231
      • 4,205 Posts
      I have the same problem with reflect. All other date fields work except pub_date. Did you find a fix for this?
        [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&#39;t know what it is.
        Do you, Mr. Jones? - [bob dylan]
        • 15197
        • 65 Posts
        No, I haven’t. We’ve been working on the design aspects of that site so had time to wait and see if anyone responded here. I’m going to need to use the same function on one I’ll be working on this weekend, though. Maybe having a 2nd person needing this addressed will prompt someone to help out? Please? smiley
          • 37210
          • 131 Posts
          :( I need this too.

          I am hoping to filter Reflect items by ’pub_date’ instead of ’createdon’.

          This is essential only because under one of our Reflect containers, we are creating weblinks which point to numerous resources within the site. These resources are under several different containers in the site tree.

          The big problem is, the ’createdon’ time for the weblinks are all from THIS MONTH because I’ve just created them. The only way I can think of getting around this, is to filter the Reflect items by ’pub_date’. The ’pub_date’ of each resource can then be back-dated.

          At least that’s what I was hoping laugh

          Oh geez...I needs help,
          Sarah
            • 36592
            • 970 Posts
            Use &dittoSnippetParameters=`parents:2|sortBy:pub_date` and &dateSource=`pub_date`.
            [[Reflect? &config=`wordpress` &targetID=`63` &dittoSnippetParameters=`parents:2|sortBy:pub_date` &dateSource=`pub_date` &id=`wp` &getDocuments=`1`]]
            
              • 37210
              • 131 Posts
              Hi tkfm,

              That worked! That was too easy.

              Thanks