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

    I am getting a strange output issue using latest Ditto/Reflect combo.

    Using the Wordpress style archive feature - all is well and is working as it should. Except when you hit for instance ’August 2008’ on the generated archive list and get taken to the list of articles in that month the date is being output twice.

    Here is the call for Reflect with Wordpress style archives:

    [!Reflect?config=`wordpress` &targetID=`8` &getDocuments=`1` &dittoSnippetParameters=`parents:3`&id=`wp`!]

    The targets page call:

    <h2>[+wp_month+] [+wp_day+] [+wp_year+]</h2>
    [!Ditto? &id=`wp` &extenders=`dateFilter,summary` &parents=`3` &tpl=`tgblog`!]

    The ’tgblog’ chunk:

    <div class="ditto_item" id="ditto_item_[+id+]">
    <h1 class="ditto_pageTitle"><a href="[~[+id+]~]">[+pageheading+]</a></h1>
    <div class="ditto_documentInfo">
    <p>by <strong>Joe Bloggs</strong> on [+date+]</p></div>
    <div class="ditto_introText"><p>[+summary+] | <a href="[~[+id+]~]">read more</a></p></div>
    </div>

    And the HTML output of those is:

    <start code snippet>

    August 2008 <<<<<< THIS IS THE ISSUE - APPEARS FROM NOWHERE

    <h2>August 2008</h2>
    <div class="ditto_item" id="ditto_item_11">
    <h1 class="ditto_pageTitle"><a href="blog/what-do-they-teach-kids-today.html">What do they teach kids today?</a></h1>
    <div class="ditto_documentInfo">
    <p>by <strong>Bob Harvey</strong> on 28-Aug-08 18:29</p></div>
    <div class="ditto_introText"><p>When I first went to school (no, don’t laugh!) we learned to read and write. Learning to read was all phonics-based and writing started with pencils and then progressed to dipper- pens. | <a href="blog/what-do-they-teach-kids-today.html">read more</a></p></div>
    </div>

    </end code snippet>

    Notice the extra August 2008 with no markup around it?

    Now is this me or a Ditto/Reflect issue?

    Probably one for Mark this....

    Help!
      • 36592
      • 970 Posts
      Doesn’t it come from this part ?
      <h2>[+wp_month+] [+wp_day+] [+wp_year+]</h2> 
      
        • 36527
        • 120 Posts
        Hi tkfm,

        Nope - it is outputting the August 2008 (or any other month) twice, I shall make it more clear with more sample code output as rendered by the browser:

        <start code snippet>

        <div id="content">
        <div id="content-left">
        August 2008 >>>>>>>>>>>>>>>>>>>>>>>>>>>> This is the erroneous date that is output for some reason!
        <h2>August 2008</h2>
        <div class="ditto_item" id="ditto_item_11">
        <h1 class="ditto_pageTitle"><a href="blog/what-do-they-teach-kids-today.html">What do they teach kids today?</a></h1>
        <div class="ditto_documentInfo">
        <p>by <strong>Bob Harvey</strong> on 28-Aug-08 18:29</p></div>

        <div class="ditto_introText"><p>When I first went to school (no, don’t laugh!) we learned to read and write. Learning to read was all phonics-based and writing started with pencils and then progressed to dipper- pens. | <a href="blog/what-do-they-teach-kids-today.html">read more</a></p></div>
        </div>

        <end of code snippet/>

        Does this make it more clear?

        I cannot see anything in the Ditto or Reflect code - although I am a designer not a programmer.
          • 36527
          • 120 Posts
          Update - removed the ditto template chunk to take it back to basics following the Ditto WP config docs and still no joy.

          The ’double date’ issue is still there.

          If your about Mark - could you shed any ideas on this as it has to go live at the end of the week smiley
            • 36527
            • 120 Posts
            Right - just re-installed the ditto/reflect snippets and folders etc and it is now all ok smiley