Copied to clipboard

Flag this post as spam?

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


  • Claire Botman 48 posts 77 karma points
    Jan 05, 2010 @ 17:16
    Claire Botman
    0

    backdating posts or importing posts

    I understand that there is currently no import feature for blog4umbraco, so I am attempting to add backdated posts.  What I've done is altered the blog, datefolder document types to allow manual creation of date folders.  Then added my date folders & finally created blog posts within them.

    Now the posts show up allright but they're dated with the create date not the folder date.  I've tried altering the createdate in the database (cmsContentXml) for the records in question, also tried clearing the cache by deleting umbraco.config, but no luck, the create date still shows up as today.

    I'm sure I've done something similar a couple of months ago on another site with an earlier version of blog4umbraco, but now I'm really stuck. 

    Any advice please?

  • Chris Houston 533 posts 977 karma points MVP admin c-trib
    Jan 05, 2010 @ 18:23
    Chris Houston
    0

    Hi Claire,

    I had to do exactly the same thing as you in december for a client of mine upgrading from v3 to v4 and I am pretty sure I did exactly as you have done.

    Have you tried to un-publish and re-publish?

    It sounds like a caching issue.

    Cheers,

    Chris

     

  • Jason Prothero 416 posts 1226 karma points c-trib
    Jan 05, 2010 @ 18:38
    Jason Prothero
    0

    I've had this problem as well.  Always uses the create date instead of the publish date.  I'll be digging into this soon as a client coming up will need this functionality.

    Also, scheduling didn't work when I was testing it.  Should that work?

     

     

  • Jesper Ordrup 1000 posts 1478 karma points MVP
    Jan 05, 2010 @ 19:02
    Jesper Ordrup
    3

    The date of content probably matches the create date in most cases but not all. And it's not likely to be the last published date either if you just updated a spelling error.

    How about adding a field "post date" that is editable. It could default to createdate. This would ensure that you could:

    • change a date for a post that was created earlier but wants to be posted as of today
    • change dates of imported posts
    • ensure correct date to scheduled posts

    This would mean that most places where the date is used in the package needs to be updated. All xslt files and the datefolder events too I guess.

    /Jesper

     

  • Don Ross 5 posts 25 karma points
    Jan 05, 2010 @ 21:21
    Don Ross
    0

    **NEWBIE**  I also need to back date posts for the last 4 years.  Is there any easy way to perform this action in blog4Umbraco?  It is important to the client that the old posts exist in the correctly dated file structure within the blog.  Any help would be greatly appreciated!

    Don

  • Claire Botman 48 posts 77 karma points
    Jan 06, 2010 @ 02:52
    Claire Botman
    0

    Thanks Chris for the unpublish hint.  After much mucking around I'm now halfway there, but still struggling.

    I find that if I create the folder/blog post but not publish it, then change the createDate in umbracoNode table, then publish, the date shows up allright on the blog post itself. 

    However I'm still having trouble with the archive pages.  The backdated month shows up on the archive list, but the month's page lists entries from that month of *this* year as well as the backdated year, and the dates under the older posts use the later date, not the date I changed before.

    There are createDate & updateDate fields in umbracoNode and in ContentXml tables.  Don't like modifying the database & wish I could figure out what's the minimum required to get this happening.  Even so it's still a big job to manually add the contents of even a small blog.

    This is turning out to be quite a pickle.  Going to have to take a break from it & come back to it later. 

    Does anyone know if there there any plans to provide an import or backdating functionality, as it sure seems like something that would be very useful! 

  • Dan 1250 posts 3747 karma points admin c-trib
    Jan 08, 2010 @ 12:03
    Dan
    0

    + 1 for being able to change the date of posts.  It doesn't seem possible currently to enter historical posts to a new blog currently, which has been crucial in both projects I've tried to use this for so far.

  • Richard Soeteman 3875 posts 12037 karma points MVP
    Jan 08, 2010 @ 20:33
    Richard Soeteman
    0

    Hi

    It's a bit complex problem. To change the create date is pretty easy. You can set the CreateDateTime property on the Document object for that using the API. Only problem is that this doesn't solve the archive case. The tree folder structure that Blog4Umbraco is using is based on the create document event and you don't have access to the CreateDateTime property when this occurs.

    I was thinking about this problem for umbImport and came up with an Idea to create a dummy import folder. Imported documents could be stored then in this folder and when it's imported an after Import event can be used to to move the document to the correct Datefolder. This is just a theory, but I think this should work. I'll create a blogpost/package about this some time.

    Cheers,

    Richard

     

     

  • Paul Blair 466 posts 731 karma points
    Jan 09, 2010 @ 00:34
    Paul Blair
    1

    instead of displayign the createdatetime you can use the folder's to get the date:

      // yyyy-mm-dd

       <xsl:value-of select="umbraco.library:FormatDateTime(concat(./../../../@nodeName,'-',./../../@nodeName,'-',./../@nodeName) , 'd MMM yyyy')" />

    Then if you create the folders manually it will format the date based ont he fodler structure

  • Evan Jardine 108 posts 168 karma points
    Jan 12, 2010 @ 02:26
    Evan Jardine
    0

    I've also been trying to upgrade my blog, with some frustration...

    I have used Richards umbImport with a custom rss data adapter, http://www.richardsoeteman.net/2009/04/16/CreateACustomDataAdapterForUmbImportPart1.aspx

    This method imports all of the content with the correct 'createdDate' but you still have to manually edit the dateFolder structure and fix up the tags and media items. 

    I'm looking at importing with this method to a temp folder then using a dashboard usercontrol to create a datefolder/post content structure somehow...

    Cheers

    Evan

  • Evan Jardine 108 posts 168 karma points
    Jan 12, 2010 @ 02:27
    Evan Jardine
    0

    I've also been trying to upgrade my blog, with some frustration...

    I have used Richards umbImport with a custom rss data adapter, http://www.richardsoeteman.net/2009/04/16/CreateACustomDataAdapterForUmbImportPart1.aspx

    This method imports all of the content with the correct 'createdDate' but you still have to manually edit the dateFolder structure and fix up the tags and media items. 

    I'm looking at importing with this method to a temp folder then using a dashboard usercontrol to create a datefolder/post content structure somehow...

    Cheers

    Evan

  • Richard Soeteman 3875 posts 12037 karma points MVP
    Jan 12, 2010 @ 12:19
    Richard Soeteman
    0

    HI Evan,

    Unfortunately I have no influence on the Date structure of Blog4Umbraco when importing data. So your dashboard solution is the best option. I will come up with a new Custom dataAdapter  special for Blog4Umbraco in the future that is using the same approach.

    Cheers,

    Richard

  • Ismail Mayat 4511 posts 10059 karma points MVP 2x admin c-trib
    Jan 12, 2010 @ 12:54
    Ismail Mayat
    0

    Guys,

    I recently had to back date some blog posts/date folders. I took a copy of Richards excellent content maintanance package and added option to set create date.  If anyone wants it then post here and i will put up download link

    Regards

    Ismail

  • Evan Jardine 108 posts 168 karma points
    Jan 12, 2010 @ 22:41
    Evan Jardine
    0

    Made some slow progress with my solution...It is partially working but still needs a lot of work.

    Ismail, It would be good to see your approach. 

    Richard - I'm looking at customising the Blog4Umbraco Date structure in the Event Handler.  Time is my enemy at the moment :)

    Regards
    Evan

  • Ismail Mayat 4511 posts 10059 karma points MVP 2x admin c-trib
    Jan 13, 2010 @ 10:27
    Ismail Mayat
    0

    Evan,

    You can download my updated version from http://www.box.net/shared/sfdrerea5g" target="_blank">here its a zip file with source, the compiled dll is in the bin directory.  To install just copy over the dll to bin and the usercontrol to usercontrols and overwrite existing.

    On the dashboard control there is create date text box just add new date to that then update.  Ps I have been using dd/mm/yyyy format, in my web.config I have in globalization tag culture="en-GB" for different date cultures guess that tag would need to be updated. It was a quick hack I did for a client who needed to back date quite a few posts.

    Regards

    Ismail

  • Evan Jardine 108 posts 168 karma points
    Jan 14, 2010 @ 01:44
    Evan Jardine
    0

    Thanks Ismail, that works great.

    I also found this post which may be helpful,

    http://our.umbraco.org/forum/using/ui-questions/5774-Editable-date-for-Blog4Umbraco-1x-%28short-how-to%29

    Cheers
    Evan

  • Jesper Ordrup 1000 posts 1478 karma points MVP
    Jan 19, 2010 @ 11:51
    Jesper Ordrup
    2

    Hi all,

    Earlier in this thread I suggested using a custom property "postdate" that you could have full control over. But my suggestion didn't get any comments/votes so it might have been a bad one :-)

    If you think it's a bad suggestion I would very much like to know what your thoughts are on this as I'm going to use "postdate" on a large implementation. Are there any disadvantages?

    This is what I wrote:

    The date of content probably matches the create date in most cases but not all. And it's not likely to be the last published date either if you just updated a spelling error.

    How about adding a field "post date" that is editable. It could default to createdate. This would ensure that you could:

    • change a date for a post that was created earlier but wants to be posted as of today
    • change dates of imported posts
    • ensure correct date to scheduled posts

    This would mean that most places where the date is used in the package needs to be updated. All xslt files and the datefolder events too I guess.

     

    /Jesper

  • Richard Soeteman 3875 posts 12037 karma points MVP
    Jan 19, 2010 @ 14:52
    Richard Soeteman
    0

    Hi Jesper, voted your answer up :).

    Think your suggestion should be implemented in Blog4Umbraco,for now it's nice to know you can modify the createdate property using the API. With UmbImport 1.0.3 you can map against the createdate. 

    But this will not solve all the issues. Currently the datefolder is attached to the document Create event. This must be changed to the document.before save event to solve all the issues.

    Cheers,

    Richard  

  • Robert J. Bullock 386 posts 404 karma points
    Jan 28, 2010 @ 21:42
    Robert J. Bullock
    0

    I successfully imported my blog posts with the correct create date and everything, but they're not going into date folders. Is that a disconnect between Blog4Umbraco and UmbImport? Are the blog posts only placed in date folders when first created, not re-published?

  • Jesper Ordrup 1000 posts 1478 karma points MVP
    Jan 29, 2010 @ 09:28
    Jesper Ordrup
    0

    Hi Robert,

    Yes - the blogposts are only placed in datefolders when created (document_new). But I guess that this is really a question about umbImport using the API or not? 

    Richard, thanx for the vote. Care to comment on the above?

    /Jesper

  • Greg Berlin 818 posts 634 karma points
    Feb 09, 2010 @ 06:39
    Greg Berlin
    0

    Hey all,

    Just to add my 2c worth.. i think the PostDate property is a good idea, however for blogs its usefulness is limited as you would need to manually change the date folders too for everything to stay in sync... so probably not ideal.

    Richard, was it you that created the package that allowed you to create a new blog post, and specify a date, and it then went and created the date folders and create date accordingly?  If not, perhaps we should dig that out and modify it to work with the new blog package...

    I'm pretty keen to start my blog fresh with the new package, but need a way to bring my old posts in, so hoping to find a solution... an upgrade path or script would have been nice..  ( poke @ core team :P )

     

  • Jukka-Pekka Keisala 75 posts 179 karma points
    Feb 24, 2010 @ 08:45
    Jukka-Pekka Keisala
    0

    Bump!

  • Andrew Lansdowne 39 posts 120 karma points
    Apr 26, 2010 @ 12:14
    Andrew Lansdowne
    0

    Note that I manually backdated some posts by doing the following:

    1. change the create date in the umbracoNode table
    2. enable DateFolder to be created under Blog and DateFolder, and enable Blog Post to be created under DateFolder
    3. Create date folders under the Blog page for each month/date you need
    4. Move the posts into the right folders.
    5. Publish blog and all children

    Worked a treat.

    However I did notice that the Monthly Archive seems to not work at all! The XSLT seems to list all blog items (ignoring date) regardless of which month folder you are looking at. To fix this I edited BlogListPosts.xslt and removed all instances of "ancestor-or-self::node [@nodeTypeAlias = 'Blog']/" - This makes it loop through only children of the month folder you are viewing.

    Andy

  • webangelo 107 posts 190 karma points
    Apr 26, 2010 @ 14:12
    webangelo
    0

    I discussed a solution for automatically back dating posts on my blog, including some code.

    http://deeper.webangelo.net/2010/4/9/blog4umbraco-post-date.aspx

    A similar solution (but changed to streamline the automatic folder creation) has been submitted to codeplex for possible inclusion in the next release.

    --Chris

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies