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

    I'm struggling with a strange behavior when accessing document dates with getResources:

    This is my call:
    [[getResources?
      &parents=`77`
      &includeContent=`1`
      &showHidden=`1`
      &includeTVs=`1`
      &processTVs=`1`
      &tpl=`Neuigkeit`
      &sortby=`menuindex`
      &sortdir=`ASC`
    ]]


    This is my chuck:
    <div>
       <div class="recent-posts">
          <article class="post">
             <div class="date">
                <span class="day">[[*publishedon:strtotime:date=`%d`]]
                </span>
                <span class="month">[[*publishedon:strtotime:date=`%b`]]
                </span>
             </div>
    		 <h4>[[+tv.UE1]]</h4>
    		 CreateOn: [[*createdon]]<br/>
    		 Editon: [[*editedon]]<br/>
    		 PubDate: [[*pub_date]]<br/>
    		 Published: [[*published]]<br/>
    		 PublishedOn: [[*publishedon]]<br/>
             [[+tv.TXT1]]
          </article>
       </div>
    </div>


    And that's what I get:
    <div>
        <div class="recent-posts">
            <article class="post">
                <div class="date">
                    <span class="day">
                    </span>
                    <span class="month">
                    </span>
                </div>
                <h4>Relaunch</h4>
                CreateOn: 2015-11-04 16:37:21<br/>
                Editon: 2015-12-09 15:14:50<br/>
                PubDate: 0<br/>
                Published: 1<br/>
                PublishedOn: 0<br/>
                <p>Curabitur non nulla sit amet nisl tempus convallis quis ac lectus.</p>
            </article>
        </div>
    </div>


    This is realy odd because [[*publishedon]] is 0 and [[*createdon]] as well [[*editedon]] are wrong dates. The TVs are processed correctly.

    Any ideas what I'm doing wrong?

    This question has been answered by claytonk. See the first response.

    • discuss.answer
      • 5430
      • 247 Posts
      Did you mean to call these as local values [[*createdon]] instead of placeholders for returned values [[+createdon]]? This would be returning the values from the resource on which the getResources snippet is called, not the dates from the resource returned.
        • 43968
        • 25 Posts
        omg - what a shame, sure + instead of * and everything is fine ;-)

        thanks!

        regards, mike