Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Richard Kingston 46 posts 69 karma points
    Mar 06, 2015 @ 14:38
    Richard Kingston
    0

    Not setting the Created Date

    Hi,

    I'm importing from a CSV, data that looks like this:

    "Created","Alias","Name","Content","Category"
    "2015-03-05 10:58:38","banners-bands-and-bitter-pills-comes-to-town","Banners, Bands and Bitter Pills comes to Barnsley","HTML CONTENT HERE","News"

    In the settings for the Created field, I'm specifying the date format yyyy-MM-dd HH:mm:ss but when I review the import (which seems to work great), the Created date just shows the date and time that I ran the import.

    I'm using CMS Import 3.0.1 with Umbraco v7.2.2 Assembly 1.0.5529.18522 which I appreciate isn't marked as a supported platform yet but thought it best to highlight it and make sure I'm not just doing something wrong.

    Thanks

    Rich

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Mar 09, 2015 @ 05:50
    Richard Soeteman
    0

    Hi Richard,

    It could be a caching issue maybe? Since Umbraco will always handles the create date I uses a Database call to update the date field directly. Could you try to see if it's fixed after an IIS reset? I assume you don't use any events?

    Best,

    Richard

  • Richard Kingston 46 posts 69 karma points
    Mar 09, 2015 @ 10:25
    Richard Kingston
    0

    Hi Richard,

    Unfortunately not. I've imported just 10 items this morning and then closed down the solution / IISEXPRESS instance and restarted both. The dates remain as today though.

    A quick peak in the database at the cmsContentXML table confirms it:

    <News id="1295" parentID="1214" level="3" creatorID="0" sortOrder="8" createDate="2015-03-09T09:16:51" updateDate="2015-03-09T09:16:51" nodeName="Barnsley Council’s 2015-17 Budget approved" urlName="barnsley-council-s-2015-17-budget-approved" path="-1,1050,1214,1295" isDoc="" nodeType="1225" creatorName="Richard Kingston" writerName="Richard Kingston" writerID="0" template="1231" nodeTypeAlias="News">    <bodyContent><![CDATA[<p>Today... HTML CONTENT ...</p>]]></bodyContent>    <openmail><![CDATA[Open Mail]]></openmail>  </News>
    

    The date on that particular item should be 2015-02-26 12:13:46.

    Rich

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Mar 09, 2015 @ 12:44
    Richard Soeteman
    0

    Hi Richard,

    You are right. I have tested with unpublished data, but the publish action overwrites the value. Work around for now could be to not publish the data that is being imported. I will see what I can do about this.

    Best,

    Richard

  • Richard Kingston 46 posts 69 karma points
    Mar 09, 2015 @ 14:51
    Richard Kingston
    0

    Hi Richard,

    You're absolutely right. With the "Publish automatically" box unchecked, it sets the creation date correctly. Last edited date reflects today which is appropriate too.

    I can then just simply mass publish inside Umbraco.

    Thanks for your help.

    Rich

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Mar 16, 2015 @ 13:39
    Richard Soeteman
    0

    Hi Rich,

    The release that contains the fix is available now. (3.1.1)

    Best,

    Richard

  • Richard Kingston 46 posts 69 karma points
    Mar 31, 2015 @ 18:24
    Richard Kingston
    0

    Thanks Richard, that's great!

Please Sign in or register to post replies

Write your reply to:

Draft